summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Butzke2012-12-10 09:34:44 (EST)
committerKaren Butzke2012-12-10 09:34:44 (EST)
commitce2e5c4d84358e66d86dd48cde07b9a609e04e33 (patch)
treed4514eade516fd8bc456848a708ac9604a76d933
parent8938081bb4d9e724c80fa880f8f54d6c655e99d5 (diff)
downloadwebtools.dali-ce2e5c4d84358e66d86dd48cde07b9a609e04e33.zip
webtools.dali-ce2e5c4d84358e66d86dd48cde07b9a609e04e33.tar.gz
webtools.dali-ce2e5c4d84358e66d86dd48cde07b9a609e04e33.tar.bz2
JavaResourceAnnotatedElement.Kind renamed to JavaResourceAnnotatedElement.AstNodeType
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnum.java5
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnumConstant.java4
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryField.java4
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryMethod.java4
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryType.java11
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceEnum.java4
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceEnumConstant.java4
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceField.java4
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceMethod.java4
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourcePackage.java4
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceType.java11
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceTypeCompilationUnit.java7
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAnnotatedElement.java30
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/JaxbProject.java7
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java16
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlJavaTypeAdapter.java2
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java2
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java2
-rw-r--r--jaxb/tests/org.eclipse.jpt.jaxb.core.tests/src/org/eclipse/jpt/jaxb/core/tests/internal/context/GenericContextRootTests.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProject.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/EntityMappings.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/PropertyAccessor.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractEntityMappings.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmIdClassReference.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentAttribute.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJarFile.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericClassRef.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/VirtualJavaPersistentType.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentAttributeTests.java12
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentTypeTests.java12
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaAssociationOverrideTests.java20
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaAttributeOverrideTests.java14
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaBasicMappingTests.java56
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaCascadeTests.java22
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaColumnTests.java48
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaDiscriminatorColumnTests.java24
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEmbeddedIdMappingTests.java40
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEmbeddedMappingTests.java40
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEntityTests.java136
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaGeneratedValueTests.java14
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaIdMappingTests.java48
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaJoinColumnTests.java32
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaJoinTableTests.java52
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaManyToManyMappingTests.java56
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaManyToOneMappingTests.java46
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaMappedSuperclassTests.java14
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaNamedNativeQueryTests.java30
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaNamedQueryTests.java22
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaOneToManyMappingTests.java54
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaOneToOneMappingTests.java66
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaPrimaryKeyJoinColumnTests.java16
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaQueryHintTests.java12
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaSecondaryTableTests.java42
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaSequenceGeneratorTests.java18
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTableGeneratorTests.java48
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTableTests.java30
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTransientMappingTests.java24
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaVersionMappingTests.java28
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaAssociationOverride2_0Tests.java24
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaBasicMapping2_0Tests.java24
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaCascade2_0Tests.java6
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaCollectionTable2_0Tests.java40
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaElementCollectionMapping2_0Tests.java92
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEmbeddedIdMapping2_0Tests.java26
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEmbeddedMapping2_0Tests.java62
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEntity2_0Tests.java52
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaIdMapping2_0Tests.java24
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaManyToManyMapping2_0Tests.java72
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaManyToOneMapping2_0Tests.java42
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaOneToManyMapping2_0Tests.java82
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaOneToOneMapping2_0Tests.java50
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaPersistentType2_0Tests.java12
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaSequenceGenerator2_0Tests.java10
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaVersionMapping2_0Tests.java24
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/orm/GenericOrmOneToManyMapping2_0Tests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/orm/GenericOrmPersistentAttribute2_0Tests.java52
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaCollectionTableTests.java40
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaElementCollectionMappingTests.java86
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaEntityTests.java42
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaManyToManyMappingTests.java40
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaManyToOneMappingTests.java16
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaMappedSuperclassTests.java16
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaOneToManyMappingTests.java50
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaOneToOneMappingTests.java24
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_1JavaMappedSuperclassTests.java14
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_2JavaEntityTests.java6
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_2JavaMappedSuperclassTests.java10
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_3JavaMultitenancyTests.java24
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaBasicMappingTests.java18
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaCachingTests.java60
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaConvertTests.java10
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaConverterTests.java12
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaEmbeddableTests.java12
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaEntityTests.java16
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaIdMappingTests.java18
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaManyToManyMappingTests.java8
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaManyToOneMappingTests.java8
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaMappedSuperclassTests.java16
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaObjectTypeConverterTests.java30
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaOneToManyMappingTests.java32
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaOneToOneMappingTests.java28
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaStructConverterTests.java12
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaTypeConverterTests.java16
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLinkJavaVersionMappingTests.java18
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink1_1OrmPersistentAttributeTests.java30
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLink2_0OrmOneToManyMappingTests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmPersistentAttributeTests.java4
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/JpaArtifactFactory.java6
114 files changed, 1355 insertions, 1352 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnum.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnum.java
index 55b89e3..71590a5 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnum.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnum.java
@@ -16,7 +16,6 @@ import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.EnumDeclaration;
import org.eclipse.jpt.common.core.internal.plugin.JptCommonCorePlugin;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.core.resource.java.JavaResourceEnum;
import org.eclipse.jpt.common.core.resource.java.JavaResourceEnumConstant;
import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
@@ -48,8 +47,8 @@ final class BinaryEnum
}
- public Kind getKind() {
- return JavaResourceAnnotatedElement.Kind.ENUM;
+ public AstNodeType getAstNodeType() {
+ return AstNodeType.ENUM;
}
public void synchronizeWith(EnumDeclaration enumDeclaration) {
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnumConstant.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnumConstant.java
index 6b14f51..eb12f54 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnumConstant.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryEnumConstant.java
@@ -41,8 +41,8 @@ final class BinaryEnumConstant
// ******** JavaResourceAnnotatedElement implementation ********
- public Kind getKind() {
- return Kind.ENUM_CONSTANT;
+ public AstNodeType getAstNodeType() {
+ return AstNodeType.ENUM_CONSTANT;
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryField.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryField.java
index cb9f8d0..7c957a0 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryField.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryField.java
@@ -37,8 +37,8 @@ final class BinaryField
}
- public Kind getKind() {
- return Kind.FIELD;
+ public AstNodeType getAstNodeType() {
+ return AstNodeType.FIELD;
}
public void synchronizeWith(FieldDeclaration fieldDeclaration, VariableDeclarationFragment variableDeclaration) {
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryMethod.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryMethod.java
index bdafb49..f9931ee 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryMethod.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryMethod.java
@@ -55,8 +55,8 @@ final class BinaryMethod
}
- public Kind getKind() {
- return JavaResourceAnnotatedElement.Kind.METHOD;
+ public AstNodeType getAstNodeType() {
+ return AstNodeType.METHOD;
}
public void synchronizeWith(MethodDeclaration methodDeclaration) {
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryType.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryType.java
index 66d0ad3..a2dbaca 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryType.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryType.java
@@ -87,8 +87,8 @@ final class BinaryType
}
- public Kind getKind() {
- return JavaResourceAnnotatedElement.Kind.TYPE;
+ public AstNodeType getAstNodeType() {
+ return AstNodeType.TYPE;
}
@@ -405,12 +405,11 @@ final class BinaryType
return attribute.getTypeBinding();
}
InheritedAttributeKey key = new InheritedAttributeKey(attribute.getParent().getTypeBinding().getQualifiedName(), attribute.getName());
- if (attribute.getKind() == JavaResourceAnnotatedElement.Kind.FIELD) {
+ if (attribute.getAstNodeType() == JavaResourceAnnotatedElement.AstNodeType.FIELD) {
return this.inheritedFieldTypes.get(key);
}
- else /* attribute.getKind() == JavaResourceAnnotatedElement.Kind.METHOD */ {
- return this.inheritedMethodTypes.get(key);
- }
+ /* else attribute.getAstNodeType() == JavaResourceAnnotatedElement.AstNodeType.METHOD */
+ return this.inheritedMethodTypes.get(key);
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceEnum.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceEnum.java
index 010858f..295c6dd 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceEnum.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceEnum.java
@@ -109,8 +109,8 @@ final class SourceEnum
// ******** JavaResourceAnnotatedElement implementation ********
- public Kind getKind() {
- return Kind.ENUM;
+ public AstNodeType getAstNodeType() {
+ return AstNodeType.ENUM;
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceEnumConstant.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceEnumConstant.java
index 372e34e..8cdfc2a 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceEnumConstant.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceEnumConstant.java
@@ -66,8 +66,8 @@ final class SourceEnumConstant
// ******** JavaResourceAnnotatedElement implementation ********
- public Kind getKind() {
- return Kind.ENUM_CONSTANT;
+ public AstNodeType getAstNodeType() {
+ return AstNodeType.ENUM_CONSTANT;
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceField.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceField.java
index 97525d1..c8e417b 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceField.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceField.java
@@ -90,7 +90,7 @@ final class SourceField
// ******** JavaResourceAnnotatedElement implementation ********
- public Kind getKind() {
- return Kind.FIELD;
+ public AstNodeType getAstNodeType() {
+ return AstNodeType.FIELD;
}
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceMethod.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceMethod.java
index 60c97ee..0735f14 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceMethod.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceMethod.java
@@ -86,8 +86,8 @@ final class SourceMethod
// ******** JavaResourceAnnotatedElement implementation ********
- public Kind getKind() {
- return Kind.METHOD;
+ public AstNodeType getAstNodeType() {
+ return AstNodeType.METHOD;
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourcePackage.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourcePackage.java
index 0b98a90..63d12d4 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourcePackage.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourcePackage.java
@@ -64,8 +64,8 @@ public final class SourcePackage
// ******** JavaResourceAnnotatedElement implementation ********
- public Kind getKind() {
- return Kind.PACKAGE;
+ public AstNodeType getAstNodeType() {
+ return AstNodeType.PACKAGE;
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceType.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceType.java
index 12b1a9a..7642faf 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceType.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceType.java
@@ -212,8 +212,8 @@ final class SourceType
// ******** JavaResourceType implementation ********
- public Kind getKind() {
- return Kind.TYPE;
+ public AstNodeType getAstNodeType() {
+ return AstNodeType.TYPE;
}
// ***** superclass qualified name
@@ -796,12 +796,11 @@ final class SourceType
}
InheritedAttributeKey key =
new InheritedAttributeKey(attribute.getParent().getTypeBinding().getQualifiedName(), attribute.getName());
- if (attribute.getKind() == JavaResourceAnnotatedElement.Kind.FIELD) {
+ if (attribute.getAstNodeType() == JavaResourceAnnotatedElement.AstNodeType.FIELD) {
return this.inheritedFieldTypes.get(key);
}
- else /* attribute.getKind() == JavaResourceAnnotatedElement.Kind.METHOD */ {
- return this.inheritedMethodTypes.get(key);
- }
+ /* attribute.getAstNodeType() == JavaResourceAnnotatedElement.AstNodeType.METHOD */
+ return this.inheritedMethodTypes.get(key);
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceTypeCompilationUnit.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceTypeCompilationUnit.java
index 3fd9c50..4d25daa 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceTypeCompilationUnit.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceTypeCompilationUnit.java
@@ -20,6 +20,7 @@ import org.eclipse.jpt.common.core.AnnotationProvider;
import org.eclipse.jpt.common.core.JptResourceType;
import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceEnum;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.utility.jdt.AnnotationEditFormatter;
@@ -96,7 +97,7 @@ public final class SourceTypeCompilationUnit
public void resolveTypes() {
if (this.primaryType != null) {
AbstractTypeDeclaration td = this.getPrimaryTypeOrEnumDeclaration(this.buildASTRoot());
- if (this.primaryType.getKind().getAstNodeType() == ASTNode.TYPE_DECLARATION) {
+ if (this.primaryType.getAstNodeType() == AstNodeType.TYPE) {
((JavaResourceType) this.primaryType).resolveTypes((TypeDeclaration) td);
}
else {
@@ -126,7 +127,7 @@ public final class SourceTypeCompilationUnit
if (this.primaryType == null || (!typeMatchesASTNodeType(this.primaryType, td))) {
this.syncPrimaryType_(this.buildPrimaryType(td));
} else {
- if (this.primaryType.getKind().getAstNodeType() == ASTNode.TYPE_DECLARATION) {
+ if (this.primaryType.getAstNodeType() == AstNodeType.TYPE) {
((JavaResourceType) this.primaryType).synchronizeWith((TypeDeclaration) td);
}
else {
@@ -140,7 +141,7 @@ public final class SourceTypeCompilationUnit
* Must be non-null JavaResourceAbstractType and AbstractTypeDeclaration
*/
protected static boolean typeMatchesASTNodeType(JavaResourceAbstractType type, AbstractTypeDeclaration astType) {
- return type.getKind().getAstNodeType() == astType.getNodeType();
+ return type.getAstNodeType().matches(astType.getNodeType());
}
private void syncPrimaryType_(JavaResourceAbstractType astType) {
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 19d7f4e..dd4e8a4 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
@@ -184,9 +184,9 @@ public interface JavaResourceAnnotatedElement
boolean isAnnotatedWithAnyOf(Iterable<String> annotationNames);
/**
- * Return the element kind
+ * Return the element's ASTNode type
*/
- Kind getKind();
+ AstNodeType getAstNodeType();
/**
* Return the text range for the member's name.
@@ -205,48 +205,49 @@ public interface JavaResourceAnnotatedElement
TextRange getTextRange(String nestableAnnotationName);
/**
- * The kind of java element.
+ * The java element's ASTNode type. These are the only ASTNode types that
+ * our resource model supports
*/
- public enum Kind {
+ public enum AstNodeType {
/**
* Represents an annotatable package.
- * An {@link JavaResourceAnnotatedElement} of {@link Kind} PACKAGE may safely be cast as a
+ * An {@link JavaResourceAnnotatedElement} of {@link AstNodeType} PACKAGE may safely be cast as a
* {@link JavaResourcePackage}
*/
PACKAGE(ASTNode.PACKAGE_DECLARATION),
/**
* Represents a class or interface.
- * An {@link JavaResourceAnnotatedElement} of {@link Kind} TYPE may safely be cast as a
+ * An {@link JavaResourceAnnotatedElement} of {@link AstNodeType} TYPE may safely be cast as a
* {@link JavaResourceType}
*/
TYPE(ASTNode.TYPE_DECLARATION),
/**
* Represents an enum.
- * An {@link JavaResourceAnnotatedElement} of {@link Kind} ENUM may safely be cast as a
+ * An {@link JavaResourceAnnotatedElement} of {@link AstNodeType} ENUM may safely be cast as a
* {@link JavaResourceEnum}
*/
ENUM(ASTNode.ENUM_DECLARATION),
/**
* Represents a method.
- * An {@link JavaResourceAnnotatedElement} of {@link Kind} METHOD may safely be cast as a
+ * An {@link JavaResourceAnnotatedElement} of {@link AstNodeType} METHOD may safely be cast as a
* {@link JavaResourceMethod}
*/
METHOD(ASTNode.METHOD_DECLARATION),
/**
* Represents a type field.
- * An {@link JavaResourceAnnotatedElement} of {@link Kind} FIELD may safely be cast as a
+ * An {@link JavaResourceAnnotatedElement} of {@link AstNodeType} FIELD may safely be cast as a
* {@link JavaResourceField}
*/
FIELD(ASTNode.FIELD_DECLARATION),
/**
* Represents an enum constant.
- * An {@link JavaResourceAnnotatedElement} of {@link Kind} ENUM_CONSTANT may safely be cast as a
+ * An {@link JavaResourceAnnotatedElement} of {@link AstNodeType} ENUM_CONSTANT may safely be cast as a
* {@link JavaResourceEnumConstant}
*/
ENUM_CONSTANT(ASTNode.ENUM_CONSTANT_DECLARATION);
@@ -254,12 +255,15 @@ public interface JavaResourceAnnotatedElement
private int astNodeType;
- Kind(int astNodeType) {
+ AstNodeType(int astNodeType) {
this.astNodeType = astNodeType;
}
- public int getAstNodeType() {
- return this.astNodeType;
+ /**
+ * Return whether the given astNodeType matches this type
+ */
+ public boolean matches(int astNodeType) {
+ return this.astNodeType == astNodeType;
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/JaxbProject.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/JaxbProject.java
index 0e56318..09f9e6e 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/JaxbProject.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/JaxbProject.java
@@ -18,6 +18,7 @@ import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.core.resource.java.JavaResourcePackage;
import org.eclipse.jpt.common.utility.command.ExtendedCommandExecutor;
import org.eclipse.jpt.jaxb.core.context.JaxbContextNode;
@@ -199,10 +200,10 @@ public interface JaxbProject
JavaResourceAbstractType getJavaResourceType(String typeName);
/**
- * Return the {@link JavaResourceAbstractType} with the specified type name and kind.
- * Return null if invalid or absent or if the kind does not match.
+ * Return the {@link JavaResourceAbstractType} with the specified type name and astNodeType.
+ * Return null if invalid or absent or if the astNodeType does not match.
*/
- JavaResourceAbstractType getJavaResourceType(String typeName, JavaResourceAbstractType.Kind kind);
+ JavaResourceAbstractType getJavaResourceType(String typeName, JavaResourceAnnotatedElement.AstNodeType astNodeType);
// **************** jaxb.index resources **********************************
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java
index 776b9d0..e2f5e93 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java
@@ -780,9 +780,9 @@ public abstract class AbstractJaxbProject
// return this.buildPersistableExternalJavaResourcePersistentType(typeName);
}
- public JavaResourceAbstractType getJavaResourceType(String typeName, JavaResourceAbstractType.Kind kind) {
+ public JavaResourceAbstractType getJavaResourceType(String typeName, JavaResourceAbstractType.AstNodeType astNodeType) {
JavaResourceAbstractType resourceType = getJavaResourceType(typeName);
- if (resourceType == null || resourceType.getKind() != kind) {
+ if (resourceType == null || resourceType.getAstNodeType() != astNodeType) {
return null;
}
return resourceType;
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 cf51426..d799c99 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
@@ -252,12 +252,12 @@ public abstract class AbstractJaxbContextRoot
getJaxbProject().getJavaSourceResourceTypes()) {
@Override
protected boolean accept(JavaResourceAbstractType o) {
- if (o.getKind() == JavaResourceAbstractType.Kind.TYPE) {
+ if (o.getAstNodeType() == JavaResourceAbstractType.AstNodeType.TYPE) {
if (o.getAnnotation(JAXB.XML_REGISTRY) != null) {
return true;
}
}
- if (o.getKind() == JavaResourceAbstractType.Kind.ENUM) {
+ if (o.getAstNodeType() == JavaResourceAbstractType.AstNodeType.ENUM) {
if (o.getAnnotation(JAXB.XML_ENUM) != null) {
return true;
}
@@ -298,9 +298,7 @@ public abstract class AbstractJaxbContextRoot
type.setDefaultMapped(defaultMapped);
return;
}
- else {
- this.removeType(className); // this will remove a type of another kind
- }
+ this.removeType(className); // this will remove a type of another kind
}
JavaType type = buildType(resourceType);
@@ -309,13 +307,11 @@ public abstract class AbstractJaxbContextRoot
}
protected TypeKind calculateJaxbTypeKind(JavaResourceAbstractType resourceType) {
- if (resourceType.getKind() == JavaResourceAbstractType.Kind.ENUM) {
+ if (resourceType.getAstNodeType() == JavaResourceAbstractType.AstNodeType.ENUM) {
return TypeKind.ENUM;
}
- // else is of kind TYPE
- else {
- return TypeKind.CLASS;
- }
+ // else is of kind CLASS
+ return TypeKind.CLASS;
}
protected JavaType buildType(JavaResourceAbstractType resourceType) {
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 3a39782..a754fa3 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
@@ -105,7 +105,7 @@ public abstract class AbstractJavaXmlJavaTypeAdapter
protected JavaResourceType getXmlAdapterResourceType() {
String xmlAdapterName = getFullyQualifiedValue();
- return (JavaResourceType) getJaxbProject().getJavaResourceType(xmlAdapterName, JavaResourceAbstractType.Kind.TYPE);
+ return (JavaResourceType) getJaxbProject().getJavaResourceType(xmlAdapterName, JavaResourceAbstractType.AstNodeType.TYPE);
}
protected XmlAdapter buildXmlAdapter(JavaResourceType xmlAdapterResourceType) {
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 7df0a2c..59a4740 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
@@ -468,7 +468,7 @@ public class GenericJavaClassMapping
}
return (JavaResourceType) getJaxbProject().getJavaResourceType(
- superclassName, JavaResourceType.Kind.TYPE);
+ superclassName, JavaResourceType.AstNodeType.TYPE);
}
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 0fe5d68..53cbc64 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
@@ -84,7 +84,7 @@ public class GenericJavaXmlAdapter
String superResourceTypeName = resourceType.getSuperclassQualifiedName();
if (! StringTools.isBlank(superResourceTypeName)) {
JavaResourceType superResourceType
- = (JavaResourceType) getJaxbProject().getJavaResourceType(superResourceTypeName, JavaResourceAbstractType.Kind.TYPE);
+ = (JavaResourceType) getJaxbProject().getJavaResourceType(superResourceTypeName, JavaResourceAbstractType.AstNodeType.TYPE);
if (superResourceType != null) {
return findBoundAndValueTypes(superResourceType);
}
diff --git a/jaxb/tests/org.eclipse.jpt.jaxb.core.tests/src/org/eclipse/jpt/jaxb/core/tests/internal/context/GenericContextRootTests.java b/jaxb/tests/org.eclipse.jpt.jaxb.core.tests/src/org/eclipse/jpt/jaxb/core/tests/internal/context/GenericContextRootTests.java
index 8a2845c..a95ce2c 100644
--- a/jaxb/tests/org.eclipse.jpt.jaxb.core.tests/src/org/eclipse/jpt/jaxb/core/tests/internal/context/GenericContextRootTests.java
+++ b/jaxb/tests/org.eclipse.jpt.jaxb.core.tests/src/org/eclipse/jpt/jaxb/core/tests/internal/context/GenericContextRootTests.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.
@@ -280,7 +280,7 @@ public class GenericContextRootTests
assertNull(((JavaEnum) getContextRoot().getJavaType("test.Foo")));
//annotate the class with @XmlEnum and test it's added to the context root
- JavaResourceEnum fooResourceType = (JavaResourceEnum) getJaxbProject().getJavaResourceType("test.Foo", JavaResourceAbstractType.Kind.ENUM);
+ JavaResourceEnum fooResourceType = (JavaResourceEnum) getJaxbProject().getJavaResourceType("test.Foo", JavaResourceAbstractType.AstNodeType.ENUM);
AnnotatedElement annotatedElement = annotatedElement(fooResourceType);
annotatedElement.edit(
new Member.Editor() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProject.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProject.java
index d3b9a15..af56e52 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProject.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProject.java
@@ -16,6 +16,7 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourcePackage;
import org.eclipse.jpt.common.core.resource.java.JavaResourcePackageFragmentRoot;
@@ -244,10 +245,10 @@ public interface JpaProject
JavaResourceAbstractType getJavaResourceType(String typeName);
/**
- * Return the {@link JavaResourceAbstractType} with the fully qualified type name and kind.
- * Return null if invalid or absent or if the kind does not match.
+ * Return the {@link JavaResourceAbstractType} with the fully qualified type name and astNodeType.
+ * Return null if invalid or absent or if the astNodeType does not match.
*/
- JavaResourceAbstractType getJavaResourceType(String typeName, JavaResourceAbstractType.Kind kind);
+ JavaResourceAbstractType getJavaResourceType(String typeName, JavaResourceAnnotatedElement.AstNodeType astNodeType);
/**
* Return the Java resource package for the specified package.
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/EntityMappings.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/EntityMappings.java
index 52cd147..1fb4aa4 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/EntityMappings.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/EntityMappings.java
@@ -12,6 +12,7 @@ package org.eclipse.jpt.jpa.core.context.orm;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.utility.iterable.ListIterable;
import org.eclipse.jpt.jpa.core.context.AccessHolder;
import org.eclipse.jpt.jpa.core.context.Generator;
@@ -166,15 +167,15 @@ public interface EntityMappings
JavaResourceAbstractType resolveJavaResourceType(String className);
/**
- * Return the Java resource type for the specified class name and kind
+ * Return the Java resource type for the specified class name and astNodeType
* found in the JPA project. Prepend the default package name
* if the class name is not fully qualified (i.e. it does not contain a
* <code>'.'</code>).
- * Return <code>null</code> if invalid or absent or if the kind does not match.
+ * Return <code>null</code> if invalid or absent or if the astNodeType does not match.
*
* @see #getPackage()
*/
- JavaResourceAbstractType resolveJavaResourceType(String className, JavaResourceAbstractType.Kind kind);
+ JavaResourceAbstractType resolveJavaResourceType(String className, JavaResourceAnnotatedElement.AstNodeType astNodeType);
/**
* Return the persistent type for the specified class name
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java
index d20a111..5d174ab 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java
@@ -51,6 +51,7 @@ import org.eclipse.jpt.common.core.internal.utility.command.NotifyingRepeatingJo
import org.eclipse.jpt.common.core.internal.utility.command.RepeatingJobCommandWrapper;
import org.eclipse.jpt.common.core.resource.ProjectResourceLocator;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceNode;
import org.eclipse.jpt.common.core.resource.java.JavaResourcePackage;
@@ -931,9 +932,9 @@ public abstract class AbstractJpaProject
return this.buildExternalJavaResourceType(typeName);
}
- public JavaResourceAbstractType getJavaResourceType(String typeName, JavaResourceAbstractType.Kind kind) {
+ public JavaResourceAbstractType getJavaResourceType(String typeName, JavaResourceAnnotatedElement.AstNodeType astNodeType) {
JavaResourceAbstractType resourceType = this.getJavaResourceType(typeName);
- if ((resourceType == null) || (resourceType.getKind() != kind)) {
+ if ((resourceType == null) || (resourceType.getAstNodeType() != astNodeType)) {
return null;
}
return resourceType;
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 330804c..143844a 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
@@ -178,7 +178,7 @@ public abstract class AbstractJavaPersistentType
if (typeName == null) {
return null;
}
- JavaResourceType rType = (JavaResourceType) this.getJpaProject().getJavaResourceType(typeName, JavaResourceAnnotatedElement.Kind.TYPE);
+ JavaResourceType rType = (JavaResourceType) this.getJpaProject().getJavaResourceType(typeName, JavaResourceAnnotatedElement.AstNodeType.TYPE);
if ((rType == null) || visited.contains(rType)) {
return null;
}
@@ -902,7 +902,7 @@ public abstract class AbstractJavaPersistentType
JavaResourceType nextLink = (JavaResourceType)
AbstractJavaPersistentType.this.getJpaProject().getJavaResourceType(
superclassName,
- JavaResourceAbstractType.Kind.TYPE);
+ JavaResourceAbstractType.AstNodeType.TYPE);
if ((nextLink == null) || visitedResourceTypes.contains(nextLink)) {
return null;
}
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 37af16b..1ce083b 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
@@ -103,8 +103,8 @@ public class FieldAccessor
super(field);
}
- public Kind getKind() {
- return Kind.FIELD;
+ public AstNodeType getAstNodeType() {
+ return AstNodeType.FIELD;
}
public void synchronizeWith(FieldDeclaration fieldDeclaration, VariableDeclarationFragment variableDeclaration) {
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 3c77a2b..5fc9578 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
@@ -11,7 +11,7 @@ package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
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.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.AccessType;
@@ -200,7 +200,7 @@ public class GenericJavaIdClassReference
if (this.fullyQualifiedIdClassName == null) {
return null;
}
- return (JavaResourceType) this.getJpaProject().getJavaResourceType(this.fullyQualifiedIdClassName, Kind.TYPE);
+ return (JavaResourceType) this.getJpaProject().getJavaResourceType(this.fullyQualifiedIdClassName, AstNodeType.TYPE);
}
protected JavaPersistentType buildIdClass(JavaResourceType resourceClass) {
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 8555c29..749e5c3 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
@@ -123,8 +123,8 @@ public class PropertyAccessor
super(method);
}
- public Kind getKind() {
- return Kind.METHOD;
+ public AstNodeType getAstNodeType() {
+ return AstNodeType.METHOD;
}
public String getMethodName() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractEntityMappings.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractEntityMappings.java
index dd3a393..d5dfba1 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractEntityMappings.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractEntityMappings.java
@@ -24,6 +24,7 @@ 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.resource.java.JavaResourceAbstractType;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.ObjectTools;
import org.eclipse.jpt.common.utility.internal.StringTools;
@@ -510,9 +511,9 @@ public abstract class AbstractEntityMappings
return (JavaResourceAbstractType) this.resolveType(RESOURCE_TYPE_LOOKUP_ADAPTER, className);
}
- public JavaResourceAbstractType resolveJavaResourceType(String className, JavaResourceAbstractType.Kind kind) {
+ public JavaResourceAbstractType resolveJavaResourceType(String className, JavaResourceAnnotatedElement.AstNodeType astNodeType) {
JavaResourceAbstractType resourceType = this.resolveJavaResourceType(className);
- if (resourceType == null || resourceType.getKind() != kind) {
+ if (resourceType == null || resourceType.getAstNodeType() != astNodeType) {
return null;
}
return resourceType;
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmIdClassReference.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmIdClassReference.java
index 3ddfa59..c6bdc44 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmIdClassReference.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmIdClassReference.java
@@ -13,7 +13,7 @@ import java.util.List;
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.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
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;
@@ -249,7 +249,7 @@ public class GenericOrmIdClassReference
if (this.fullyQualifiedIdClassName == null) {
return null;
}
- JavaResourceType jrt = (JavaResourceType) this.getJpaProject().getJavaResourceType(this.fullyQualifiedIdClassName, Kind.TYPE);
+ JavaResourceType jrt = (JavaResourceType) this.getJpaProject().getJavaResourceType(this.fullyQualifiedIdClassName, AstNodeType.TYPE);
return jrt == null || jrt.isAnnotatedWithAnyOf(getJpaProject().getTypeMappingAnnotationNames()) ? null : jrt;
}
@@ -433,7 +433,7 @@ public class GenericOrmIdClassReference
}
protected JavaResourceType getIdClassJavaResourceType() {
- return (JavaResourceType) getEntityMappings().resolveJavaResourceType(this.getIdClassName(), Kind.TYPE);
+ return (JavaResourceType) getEntityMappings().resolveJavaResourceType(this.getIdClassName(), AstNodeType.TYPE);
}
public TextRange 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 b2097ab..5089256 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
@@ -13,7 +13,7 @@ import java.util.Collection;
import java.util.List;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
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;
@@ -284,7 +284,7 @@ public abstract class SpecifiedOrmPersistentAttribute
if (superclassName == null) {
return null;
}
- JavaResourceType superclass = (JavaResourceType) this.getJpaProject().getJavaResourceType(superclassName, Kind.TYPE);
+ JavaResourceType superclass = (JavaResourceType) this.getJpaProject().getJavaResourceType(superclassName, AstNodeType.TYPE);
if (superclass == null) {
return null;
}
@@ -317,7 +317,7 @@ public abstract class SpecifiedOrmPersistentAttribute
if (superclassName == null) {
return null;
}
- JavaResourceType superclass = (JavaResourceType) this.getJpaProject().getJavaResourceType(superclassName, Kind.TYPE);
+ JavaResourceType superclass = (JavaResourceType) this.getJpaProject().getJavaResourceType(superclassName, AstNodeType.TYPE);
if (superclass == null) {
return null;
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java
index 6e0aa3d..8d8fd2f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java
@@ -19,7 +19,7 @@ import java.util.Vector;
import org.eclipse.core.resources.IFile;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
@@ -290,7 +290,7 @@ public abstract class SpecifiedOrmPersistentType
if (this.name == null) {
return null;
}
- return (JavaResourceType) this.getJpaProject().getJavaResourceType(this.name, Kind.TYPE);
+ return (JavaResourceType) this.getJpaProject().getJavaResourceType(this.name, AstNodeType.TYPE);
}
protected JavaPersistentType buildJavaPersistentType(JavaResourceType jrt) {
@@ -527,7 +527,7 @@ public abstract class SpecifiedOrmPersistentType
// instead, use its resource Java attribute (which will match both name and access type,
// but we still need to check its parent type)
if (specifiedAttribute.getJavaResourceAttribute() != null) {
- if (specifiedAttribute.getJavaResourceAttribute().getKind() == Kind.FIELD) {
+ if (specifiedAttribute.getJavaResourceAttribute().getAstNodeType() == AstNodeType.FIELD) {
JavaResourceField javaResourceField = (JavaResourceField) specifiedAttribute.getJavaResourceAttribute();
if (this.javaResourceFieldWillBeDefault(javaResourceField, specifiedAttribute)) {
defaultAttribute = this.buildDefaultAttribute(javaResourceField);
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJarFile.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJarFile.java
index 574666a..122f91a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJarFile.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJarFile.java
@@ -16,7 +16,7 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.jpt.common.core.JptResourceType;
import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourcePackageFragmentRoot;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -150,7 +150,7 @@ public class GenericJarFile
new FilteringIterable<JavaResourceAbstractType>(this.getJavaResourceAbstractTypes()) {
@Override
protected boolean accept(JavaResourceAbstractType o) {
- return o.getKind() == Kind.TYPE;
+ return o.getAstNodeType() == AstNodeType.TYPE;
}
});
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericClassRef.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericClassRef.java
index 4e963aa..6ecca8e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericClassRef.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/persistence/GenericClassRef.java
@@ -15,7 +15,7 @@ import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.common.utility.internal.ObjectTools;
@@ -93,7 +93,7 @@ public class GenericClassRef
protected void initializeJavaPersistentType(JavaResourceAbstractType resourceType) {
this.resourceType = resourceType;
- if (this.resourceType != null && this.resourceType.getKind() == Kind.TYPE) {
+ if (this.resourceType != null && this.resourceType.getAstNodeType() == AstNodeType.TYPE) {
this.javaPersistentType = this.buildJavaPersistentType((JavaResourceType) this.resourceType);
}
}
@@ -175,7 +175,7 @@ public class GenericClassRef
protected void updateJavaPersistentType() {
this.resourceType = this.resolveJavaResourceType();
- if (this.resourceType == null || this.resourceType.getKind() != Kind.TYPE) {
+ if (this.resourceType == null || this.resourceType.getAstNodeType() != AstNodeType.TYPE) {
if (this.javaPersistentType != null) {
this.javaPersistentType.dispose();
this.setJavaPersistentType(null);
@@ -371,7 +371,7 @@ public class GenericClassRef
}
if (this.isNotVirtual()) {
- if (this.resourceType.getKind() == Kind.ENUM) {
+ if (this.resourceType.getAstNodeType() == AstNodeType.ENUM) {
messages.add(
DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
@@ -384,7 +384,7 @@ public class GenericClassRef
return;
}
- if (this.resourceType.getKind() == Kind.TYPE && this.resourceType.getTypeBinding().isInterface()) {
+ if (this.resourceType.getAstNodeType() == AstNodeType.TYPE && this.resourceType.getTypeBinding().isInterface()) {
messages.add(
DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
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 6a17846..83af4e3 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
@@ -196,7 +196,7 @@ public class VirtualJavaPersistentType
}
protected JavaResourceType resolveJavaResourceType(String typeName) {
- return (JavaResourceType) this.getEntityMappings().resolveJavaResourceType(typeName, JavaResourceAnnotatedElement.Kind.TYPE);
+ return (JavaResourceType) this.getEntityMappings().resolveJavaResourceType(typeName, JavaResourceAnnotatedElement.AstNodeType.TYPE);
}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentAttributeTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentAttributeTests.java
index 5c901c9..83257a7 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentAttributeTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentAttributeTests.java
@@ -13,7 +13,7 @@ import java.util.Iterator;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
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;
@@ -154,7 +154,7 @@ public class GenericJavaPersistentAttributeTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceAttribute resourceAttribute = resourceType.getFields().iterator().next();
assertNotNull(resourceAttribute.getAnnotation(EmbeddedAnnotation.ANNOTATION_NAME));
@@ -171,7 +171,7 @@ public class GenericJavaPersistentAttributeTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceAttribute resourceAttribute = resourceType.getFields().iterator().next();
assertNotNull(resourceAttribute.getAnnotation(EmbeddedAnnotation.ANNOTATION_NAME));
@@ -188,7 +188,7 @@ public class GenericJavaPersistentAttributeTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceAttribute resourceAttribute = resourceType.getFields().iterator().next();
assertNull(resourceAttribute.getAnnotation(IdAnnotation.ANNOTATION_NAME));
@@ -202,7 +202,7 @@ public class GenericJavaPersistentAttributeTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
assertEquals(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY, persistentAttribute.getMappingKey());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceAttribute resourceAttribute = resourceType.getFields().iterator().next();
resourceAttribute.setPrimaryAnnotation(EmbeddedAnnotation.ANNOTATION_NAME, EmptyIterable.<String>instance());
this.getJpaProject().synchronizeContextModel();
@@ -216,7 +216,7 @@ public class GenericJavaPersistentAttributeTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
assertTrue(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceAttribute resourceAttribute = resourceType.getFields().iterator().next();
resourceAttribute.setPrimaryAnnotation(BasicAnnotation.ANNOTATION_NAME, EmptyIterable.<String>instance());
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentTypeTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentTypeTests.java
index fc97f31..b60a521 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentTypeTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/GenericJavaPersistentTypeTests.java
@@ -15,7 +15,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
import org.eclipse.jpt.common.utility.internal.iterable.EmptyIterable;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
@@ -588,7 +588,7 @@ public class GenericJavaPersistentTypeTests extends ContextModelTestCase
getJavaPersistentType().setMappingKey(MappingKeys.ENTITY_TYPE_MAPPING_KEY);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertNotNull(resourceType.getAnnotation(EntityAnnotation.ANNOTATION_NAME));
assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, getJavaPersistentType().getMappingKey());
@@ -602,7 +602,7 @@ public class GenericJavaPersistentTypeTests extends ContextModelTestCase
getJavaPersistentType().setMappingKey(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertNotNull(resourceType.getAnnotation(EmbeddableAnnotation.ANNOTATION_NAME));
assertEquals(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, getJavaPersistentType().getMappingKey());
@@ -616,7 +616,7 @@ public class GenericJavaPersistentTypeTests extends ContextModelTestCase
getJavaPersistentType().setMappingKey(MappingKeys.NULL_TYPE_MAPPING_KEY);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertNull(resourceType.getAnnotation(EntityAnnotation.ANNOTATION_NAME));
assertEquals(MappingKeys.NULL_TYPE_MAPPING_KEY, getJavaPersistentType().getMappingKey());
@@ -628,7 +628,7 @@ public class GenericJavaPersistentTypeTests extends ContextModelTestCase
assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, getJavaPersistentType().getMappingKey());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
resourceType.setPrimaryAnnotation(EmbeddableAnnotation.ANNOTATION_NAME, EmptyIterable.<String>instance());
this.getJpaProject().synchronizeContextModel();
@@ -641,7 +641,7 @@ public class GenericJavaPersistentTypeTests extends ContextModelTestCase
assertEquals(MappingKeys.NULL_TYPE_MAPPING_KEY, getJavaPersistentType().getMappingKey());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
resourceType.setPrimaryAnnotation(EntityAnnotation.ANNOTATION_NAME, EmptyIterable.<String>instance());
this.getJpaProject().synchronizeContextModel();
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaAssociationOverrideTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaAssociationOverrideTests.java
index 905547b..e1853af 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaAssociationOverrideTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaAssociationOverrideTests.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.
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.context.java;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
@@ -107,7 +107,7 @@ public class JavaAssociationOverrideTests extends ContextModelTestCase
VirtualAssociationOverride virtualOverride = overrideContainer.getVirtualOverrides().iterator().next();
AssociationOverride javaAssociationOverride = virtualOverride.convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
assertEquals("address", javaAssociationOverride.getName());
@@ -150,7 +150,7 @@ public class JavaAssociationOverrideTests extends ContextModelTestCase
VirtualAssociationOverride virtualAssociationOverride = overrideContainer.getVirtualOverrides().iterator().next();
AssociationOverride javaAssociationOverride = virtualAssociationOverride.convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
assertEquals("address", javaAssociationOverride.getName());
@@ -181,7 +181,7 @@ public class JavaAssociationOverrideTests extends ContextModelTestCase
JavaAssociationOverride specifiedOverride = virtualOverride.convertToSpecified();
JavaJoinColumnRelationshipStrategy joiningStrategy = specifiedOverride.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideAnnotation = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -230,7 +230,7 @@ public class JavaAssociationOverrideTests extends ContextModelTestCase
JavaAssociationOverride specifiedOverride = javaAssociationOverride.convertToSpecified();
JavaJoinColumnRelationshipStrategy joiningStrategy = specifiedOverride.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
assertEquals(1, associationOverrideResource.getJoinColumnsSize());
@@ -269,7 +269,7 @@ public class JavaAssociationOverrideTests extends ContextModelTestCase
JavaAssociationOverride specifiedOverride = javaAssociationOverride.convertToSpecified();
JavaJoinColumnRelationshipStrategy joiningStrategy = specifiedOverride.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
joiningStrategy.addSpecifiedJoinColumn(0).setSpecifiedName("FOO");
@@ -313,7 +313,7 @@ public class JavaAssociationOverrideTests extends ContextModelTestCase
JavaAssociationOverride specifiedOverride = javaAssociationOverride.convertToSpecified();
JavaJoinColumnRelationshipStrategy joiningStrategy = specifiedOverride.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
ListIterator<JavaJoinColumn> joinColumns = joiningStrategy.getSpecifiedJoinColumns().iterator();
@@ -390,7 +390,7 @@ public class JavaAssociationOverrideTests extends ContextModelTestCase
assertEquals(ASSOCIATION_OVERRIDE_NAME, specifiedAssociationOverride.getName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
associationOverrideResource.setName("FOO");
@@ -409,7 +409,7 @@ public class JavaAssociationOverrideTests extends ContextModelTestCase
specifiedAssociationOverride.setName("FOO");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
assertEquals("FOO", associationOverrideResource.getName());
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaAttributeOverrideTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaAttributeOverrideTests.java
index 23fc8aa..b183542 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaAttributeOverrideTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaAttributeOverrideTests.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,7 +11,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.context.java;
import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
import org.eclipse.jpt.common.utility.internal.collection.ListTools;
@@ -96,7 +96,7 @@ public class JavaAttributeOverrideTests extends ContextModelTestCase
assertEquals(ATTRIBUTE_OVERRIDE_NAME, specifiedAttributeOverride.getName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
AttributeOverrideAnnotation attributeOverrideResource = (AttributeOverrideAnnotation) resourceType.getAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
attributeOverrideResource.setName("FOO");
@@ -115,7 +115,7 @@ public class JavaAttributeOverrideTests extends ContextModelTestCase
specifiedAttributeOverride.setName("FOO");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
AttributeOverrideAnnotation attributeOverrideResource = (AttributeOverrideAnnotation) resourceType.getAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertEquals("FOO", attributeOverrideResource.getName());
@@ -131,7 +131,7 @@ public class JavaAttributeOverrideTests extends ContextModelTestCase
assertEquals(ATTRIBUTE_OVERRIDE_COLUMN_NAME, column.getName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
AttributeOverrideAnnotation attributeOverrideResource = (AttributeOverrideAnnotation) resourceType.getAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
ColumnAnnotation columnResource = attributeOverrideResource.getColumn();
columnResource.setName("FOO");
@@ -152,7 +152,7 @@ public class JavaAttributeOverrideTests extends ContextModelTestCase
assertEquals(ATTRIBUTE_OVERRIDE_COLUMN_NAME, column.getName());
column.setSpecifiedName("FOO");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
AttributeOverrideAnnotation attributeOverrideResource = (AttributeOverrideAnnotation) resourceType.getAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
ColumnAnnotation columnResource = attributeOverrideResource.getColumn();
@@ -252,7 +252,7 @@ public class JavaAttributeOverrideTests extends ContextModelTestCase
attributeOverride.convertToSpecified().getColumn().setSpecifiedName("FOO");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AttributeOverrideAnnotation attributeOverrideResource = (AttributeOverrideAnnotation) resourceType.getAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertEquals("FOO", attributeOverrideResource.getColumn().getName());
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaBasicMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaBasicMappingTests.java
index ff21d46..f4d0a2d 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaBasicMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaBasicMappingTests.java
@@ -14,7 +14,7 @@ import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterable.EmptyIterable;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
@@ -205,7 +205,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
assertNull(basicMapping.getSpecifiedFetch());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
BasicAnnotation basic = (BasicAnnotation) resourceField.getAnnotation(JPA.BASIC);
basic.setFetch(org.eclipse.jpt.jpa.core.resource.java.FetchType.LAZY);
@@ -234,7 +234,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
basicMapping.setSpecifiedFetch(FetchType.LAZY);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
BasicAnnotation basic = (BasicAnnotation) resourceField.getAnnotation(JPA.BASIC);
@@ -257,7 +257,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
basicMapping.setSpecifiedFetch(FetchType.LAZY);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceMethod resourceMethod = resourceType.getMethods().iterator().next();
BasicAnnotation basic = (BasicAnnotation) resourceMethod.getAnnotation(JPA.BASIC);
@@ -287,7 +287,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
@@ -319,7 +319,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -350,7 +350,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -380,7 +380,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -408,7 +408,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -434,7 +434,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -460,7 +460,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -486,7 +486,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -516,7 +516,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -544,7 +544,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -574,7 +574,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -638,7 +638,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
assertNull(basicMapping.getSpecifiedOptional());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
BasicAnnotation basic = (BasicAnnotation) resourceField.getAnnotation(JPA.BASIC);
basic.setOptional(Boolean.FALSE);
@@ -667,7 +667,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
basicMapping.setSpecifiedOptional(Boolean.FALSE);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
BasicAnnotation basic = (BasicAnnotation) resourceField.getAnnotation(JPA.BASIC);
@@ -688,7 +688,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
basicMapping.setSpecifiedOptional(Boolean.TRUE);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
BasicAnnotation basic = (BasicAnnotation) resourceField.getAnnotation(JPA.BASIC);
@@ -716,7 +716,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
assertNull(basicMapping.getSpecifiedOptional());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
BasicAnnotation basic = (BasicAnnotation) resourceField.getAnnotation(JPA.BASIC);
basic.setOptional(Boolean.FALSE);
@@ -768,7 +768,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
basicMapping.setConverter(LobConverter.class);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNotNull(resourceField.getAnnotation(LobAnnotation.ANNOTATION_NAME));
@@ -785,7 +785,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
assertFalse(basicMapping.getConverter().getType() == LobConverter.class);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(LobAnnotation.ANNOTATION_NAME);
getJpaProject().synchronizeContextModel();
@@ -825,7 +825,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
assertNull(basicMapping.getConverter().getType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
EnumeratedAnnotation enumeratedAnnotation = (EnumeratedAnnotation) resourceField.addAnnotation(EnumeratedAnnotation.ANNOTATION_NAME);
getJpaProject().synchronizeContextModel();
@@ -856,7 +856,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
basicMapping.setConverter(BaseEnumeratedConverter.class);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
EnumeratedAnnotation enumerated = (EnumeratedAnnotation) resourceField.getAnnotation(EnumeratedAnnotation.ANNOTATION_NAME);
@@ -884,7 +884,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
assertNull(basicMapping.getConverter().getType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
EnumeratedAnnotation enumerated = (EnumeratedAnnotation) resourceField.addAnnotation(EnumeratedAnnotation.ANNOTATION_NAME);
enumerated.setValue(org.eclipse.jpt.jpa.core.resource.java.EnumType.STRING);
@@ -904,7 +904,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
createTestEntityWithBasicMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(TemporalAnnotation.ANNOTATION_NAME);
getJpaProject().synchronizeContextModel();
@@ -937,7 +937,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
basicMapping.setConverter(BaseTemporalConverter.class);
((BaseTemporalConverter) basicMapping.getConverter()).setTemporalType(TemporalType.TIME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TemporalAnnotation temporal = (TemporalAnnotation) resourceField.getAnnotation(TemporalAnnotation.ANNOTATION_NAME);
@@ -957,7 +957,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
assertNull(basicMapping.getConverter().getType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TemporalAnnotation temporal = (TemporalAnnotation) resourceField.addAnnotation(TemporalAnnotation.ANNOTATION_NAME);
temporal.setValue(org.eclipse.jpt.jpa.core.resource.java.TemporalType.DATE);
@@ -984,7 +984,7 @@ public class JavaBasicMappingTests extends ContextModelTestCase
assertNull(basicMapping.getColumn().getSpecifiedName());
assertEquals("id", basicMapping.getColumn().getName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation column = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
column.setName("foo");
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaCascadeTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaCascadeTests.java
index e538b47..7ea67a4 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaCascadeTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaCascadeTests.java
@@ -13,7 +13,7 @@ import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.context.Cascade;
import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
@@ -54,7 +54,7 @@ public class JavaCascadeTests
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation annotation = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -82,7 +82,7 @@ public class JavaCascadeTests
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation annotation = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -108,7 +108,7 @@ public class JavaCascadeTests
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation annotation = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -136,7 +136,7 @@ public class JavaCascadeTests
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation annotation = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -162,7 +162,7 @@ public class JavaCascadeTests
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation annotation = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -190,7 +190,7 @@ public class JavaCascadeTests
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation annotation = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -216,7 +216,7 @@ public class JavaCascadeTests
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation annotation = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -244,7 +244,7 @@ public class JavaCascadeTests
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation annotation = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -270,7 +270,7 @@ public class JavaCascadeTests
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation annotation = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -298,7 +298,7 @@ public class JavaCascadeTests
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation annotation = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaColumnTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaColumnTests.java
index d4a0961..1cb0947 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaColumnTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaColumnTests.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.
@@ -13,7 +13,7 @@ import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.context.BasicMapping;
import org.eclipse.jpt.jpa.core.context.Entity;
@@ -167,7 +167,7 @@ public class JavaColumnTests extends ContextModelTestCase
assertEquals("foo", basicMapping.getColumn().getSpecifiedName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation column = (ColumnAnnotation) resourceField.getAnnotation(JPA.COLUMN);
@@ -184,7 +184,7 @@ public class JavaColumnTests extends ContextModelTestCase
assertNull(basicMapping.getColumn().getSpecifiedName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(JPA.COLUMN));
}
@@ -196,7 +196,7 @@ public class JavaColumnTests extends ContextModelTestCase
assertNull(basicMapping.getColumn().getSpecifiedName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
@@ -265,7 +265,7 @@ public class JavaColumnTests extends ContextModelTestCase
assertEquals("foo", basicMapping.getColumn().getSpecifiedTableName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation column = (ColumnAnnotation) resourceField.getAnnotation(JPA.COLUMN);
@@ -282,7 +282,7 @@ public class JavaColumnTests extends ContextModelTestCase
assertNull(basicMapping.getColumn().getSpecifiedTableName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(JPA.COLUMN));
}
@@ -294,7 +294,7 @@ public class JavaColumnTests extends ContextModelTestCase
assertNull(basicMapping.getColumn().getSpecifiedTableName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation column = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
@@ -323,7 +323,7 @@ public class JavaColumnTests extends ContextModelTestCase
basicMapping.getColumn().setColumnDefinition("foo");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation column = (ColumnAnnotation) resourceField.getAnnotation(JPA.COLUMN);
@@ -340,7 +340,7 @@ public class JavaColumnTests extends ContextModelTestCase
assertNull(basicMapping.getColumn().getColumnDefinition());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation column = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
@@ -384,7 +384,7 @@ public class JavaColumnTests extends ContextModelTestCase
assertNull(basicMapping.getColumn().getSpecifiedLength());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
columnAnnotation.setLength(Integer.valueOf(66));
@@ -409,7 +409,7 @@ public class JavaColumnTests extends ContextModelTestCase
basicMapping.getColumn().setSpecifiedLength(Integer.valueOf(100));
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.getAnnotation(JPA.COLUMN);
@@ -452,7 +452,7 @@ public class JavaColumnTests extends ContextModelTestCase
assertNull(basicMapping.getColumn().getSpecifiedPrecision());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
columnAnnotation.setPrecision(Integer.valueOf(66));
@@ -477,7 +477,7 @@ public class JavaColumnTests extends ContextModelTestCase
basicMapping.getColumn().setSpecifiedPrecision(Integer.valueOf(100));
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.getAnnotation(JPA.COLUMN);
@@ -520,7 +520,7 @@ public class JavaColumnTests extends ContextModelTestCase
assertNull(basicMapping.getColumn().getSpecifiedScale());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
columnAnnotation.setScale(Integer.valueOf(66));
@@ -545,7 +545,7 @@ public class JavaColumnTests extends ContextModelTestCase
basicMapping.getColumn().setSpecifiedScale(Integer.valueOf(100));
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.getAnnotation(JPA.COLUMN);
@@ -588,7 +588,7 @@ public class JavaColumnTests extends ContextModelTestCase
assertNull(basicMapping.getColumn().getSpecifiedUnique());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
columnAnnotation.setUnique(Boolean.TRUE);
@@ -613,7 +613,7 @@ public class JavaColumnTests extends ContextModelTestCase
basicMapping.getColumn().setSpecifiedUnique(Boolean.FALSE);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.getAnnotation(JPA.COLUMN);
@@ -656,7 +656,7 @@ public class JavaColumnTests extends ContextModelTestCase
assertNull(basicMapping.getColumn().getSpecifiedInsertable());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
columnAnnotation.setInsertable(Boolean.TRUE);
@@ -681,7 +681,7 @@ public class JavaColumnTests extends ContextModelTestCase
basicMapping.getColumn().setSpecifiedInsertable(Boolean.FALSE);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.getAnnotation(JPA.COLUMN);
@@ -724,7 +724,7 @@ public class JavaColumnTests extends ContextModelTestCase
assertNull(basicMapping.getColumn().getSpecifiedNullable());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
columnAnnotation.setNullable(Boolean.TRUE);
@@ -749,7 +749,7 @@ public class JavaColumnTests extends ContextModelTestCase
basicMapping.getColumn().setSpecifiedNullable(Boolean.FALSE);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.getAnnotation(JPA.COLUMN);
@@ -792,7 +792,7 @@ public class JavaColumnTests extends ContextModelTestCase
assertNull(basicMapping.getColumn().getSpecifiedUpdatable());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
columnAnnotation.setUpdatable(Boolean.TRUE);
@@ -817,7 +817,7 @@ public class JavaColumnTests extends ContextModelTestCase
basicMapping.getColumn().setSpecifiedUpdatable(Boolean.FALSE);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation columnAnnotation = (ColumnAnnotation) resourceField.getAnnotation(JPA.COLUMN);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaDiscriminatorColumnTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaDiscriminatorColumnTests.java
index cecc694..e532cad 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaDiscriminatorColumnTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaDiscriminatorColumnTests.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.
@@ -13,7 +13,7 @@ import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.context.DiscriminatorColumn;
@@ -164,7 +164,7 @@ public class JavaDiscriminatorColumnTests extends ContextModelTestCase
assertEquals("foo", getJavaEntity().getDiscriminatorColumn().getSpecifiedName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
DiscriminatorColumnAnnotation discriminatorColumn = (DiscriminatorColumnAnnotation) resourceType.getAnnotation(JPA.DISCRIMINATOR_COLUMN);
assertEquals("foo", discriminatorColumn.getName());
@@ -178,7 +178,7 @@ public class JavaDiscriminatorColumnTests extends ContextModelTestCase
assertNull(getJavaEntity().getDiscriminatorColumn().getSpecifiedName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
DiscriminatorColumnAnnotation discriminatorColumn = (DiscriminatorColumnAnnotation) resourceType.getAnnotation(JPA.DISCRIMINATOR_COLUMN);
assertNull(discriminatorColumn);
@@ -217,7 +217,7 @@ public class JavaDiscriminatorColumnTests extends ContextModelTestCase
assertNull(getJavaEntity().getDiscriminatorColumn().getSpecifiedDiscriminatorType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
DiscriminatorColumnAnnotation discriminatorColumn = (DiscriminatorColumnAnnotation) resourceType.getAnnotation(JPA.DISCRIMINATOR_COLUMN);
discriminatorColumn.setDiscriminatorType(org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType.CHAR);
getJpaProject().synchronizeContextModel();
@@ -233,7 +233,7 @@ public class JavaDiscriminatorColumnTests extends ContextModelTestCase
getJavaEntity().getDiscriminatorColumn().setSpecifiedDiscriminatorType(DiscriminatorType.CHAR);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
DiscriminatorColumnAnnotation discriminatorColumn = (DiscriminatorColumnAnnotation) resourceType.getAnnotation(JPA.DISCRIMINATOR_COLUMN);
assertEquals(org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType.CHAR, discriminatorColumn.getDiscriminatorType());
@@ -249,7 +249,7 @@ public class JavaDiscriminatorColumnTests extends ContextModelTestCase
assertNull(getJavaEntity().getDiscriminatorColumn().getSpecifiedDiscriminatorType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
DiscriminatorColumnAnnotation column = (DiscriminatorColumnAnnotation) resourceType.addAnnotation(JPA.DISCRIMINATOR_COLUMN);
column.setDiscriminatorType(org.eclipse.jpt.jpa.core.resource.java.DiscriminatorType.INTEGER);
@@ -302,7 +302,7 @@ public class JavaDiscriminatorColumnTests extends ContextModelTestCase
assertNull(getJavaEntity().getDiscriminatorColumn().getSpecifiedLength());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
DiscriminatorColumnAnnotation discriminatorColumn = (DiscriminatorColumnAnnotation) resourceType.getAnnotation(JPA.DISCRIMINATOR_COLUMN);
discriminatorColumn.setLength(Integer.valueOf(66));
getJpaProject().synchronizeContextModel();
@@ -324,7 +324,7 @@ public class JavaDiscriminatorColumnTests extends ContextModelTestCase
getJavaEntity().getDiscriminatorColumn().setSpecifiedLength(Integer.valueOf(100));
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
DiscriminatorColumnAnnotation discriminatorColumn = (DiscriminatorColumnAnnotation) resourceType.getAnnotation(JPA.DISCRIMINATOR_COLUMN);
assertEquals(Integer.valueOf(100), discriminatorColumn.getLength());
@@ -340,7 +340,7 @@ public class JavaDiscriminatorColumnTests extends ContextModelTestCase
assertNull(getJavaEntity().getDiscriminatorColumn().getSpecifiedLength());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
DiscriminatorColumnAnnotation column = (DiscriminatorColumnAnnotation) resourceType.addAnnotation(JPA.DISCRIMINATOR_COLUMN);
column.setLength(Integer.valueOf(78));
@@ -365,7 +365,7 @@ public class JavaDiscriminatorColumnTests extends ContextModelTestCase
assertNull(getJavaEntity().getDiscriminatorColumn().getColumnDefinition());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
DiscriminatorColumnAnnotation column = (DiscriminatorColumnAnnotation) resourceType.getAnnotation(JPA.DISCRIMINATOR_COLUMN);
column.setColumnDefinition(COLUMN_DEFINITION);
getJpaProject().synchronizeContextModel();
@@ -386,7 +386,7 @@ public class JavaDiscriminatorColumnTests extends ContextModelTestCase
getJavaEntity().getDiscriminatorColumn().setColumnDefinition("foo");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
DiscriminatorColumnAnnotation column = (DiscriminatorColumnAnnotation) resourceType.getAnnotation(JPA.DISCRIMINATOR_COLUMN);
assertEquals("foo", column.getColumnDefinition());
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEmbeddedIdMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEmbeddedIdMappingTests.java
index f7a3c7d..ce0f836 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEmbeddedIdMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEmbeddedIdMappingTests.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.
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.context.java;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
@@ -117,7 +117,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedIdMapping.isDefault());
@@ -139,7 +139,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedIdMapping.isDefault());
@@ -177,7 +177,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedIdMapping.isDefault());
@@ -197,7 +197,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedIdMapping.isDefault());
@@ -217,7 +217,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedIdMapping.isDefault());
@@ -237,7 +237,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedIdMapping.isDefault());
@@ -257,7 +257,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedIdMapping.isDefault());
@@ -277,7 +277,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedIdMapping.isDefault());
@@ -297,7 +297,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedIdMapping.isDefault());
@@ -317,7 +317,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedIdMapping.isDefault());
@@ -342,7 +342,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
assertFalse(specifiedAttributeOverrides.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -409,7 +409,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
JavaEmbeddedIdMapping embeddedMapping = (JavaEmbeddedIdMapping) getJavaPersistentType().getAttributeNamed("myEmbeddedId").getMapping();
JavaAttributeOverrideContainer attributeOverrideContainer = embeddedMapping.getAttributeOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals("myEmbeddedId", resourceField.getName());
assertEquals(0, resourceField.getAnnotationsSize(AttributeOverrideAnnotation.ANNOTATION_NAME));
@@ -501,7 +501,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
AttributeOverrideContainer attributeOverrideContainer = embeddedIdMapping.getAttributeOverrideContainer();
assertEquals(0, attributeOverrideContainer.getSpecifiedOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -524,7 +524,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
AttributeOverrideContainer attributeOverrideContainer = embeddedIdMapping.getAttributeOverrideContainer();
assertEquals(2, attributeOverrideContainer.getOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -552,7 +552,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
JavaAttributeOverrideContainer attributeOverrideContainer = embeddedIdMapping.getAttributeOverrideContainer();
assertEquals(2, attributeOverrideContainer.getVirtualOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -583,7 +583,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> attributeOverrides = resourceField.getAnnotations(AttributeOverrideAnnotation.ANNOTATION_NAME).iterator();
@@ -622,7 +622,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
virtualAttributeOverrides.next().convertToSpecified();
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> attributeOverrides = resourceField.getAnnotations(AttributeOverrideAnnotation.ANNOTATION_NAME).iterator();
@@ -643,7 +643,7 @@ public class JavaEmbeddedIdMappingTests extends ContextModelTestCase
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.moveAnnotation(1, 0, AttributeOverrideAnnotation.ANNOTATION_NAME);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEmbeddedMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEmbeddedMappingTests.java
index 86f3012..5b27d37 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEmbeddedMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEmbeddedMappingTests.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.
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.context.java;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
@@ -213,7 +213,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof BasicMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(EmbeddedAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(BasicAnnotation.ANNOTATION_NAME));
@@ -228,7 +228,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedMapping embeddedMapping = (EmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedMapping.isDefault());
@@ -313,7 +313,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedMapping embeddedMapping = (EmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedMapping.isDefault());
@@ -333,7 +333,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedMapping embeddedMapping = (EmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedMapping.isDefault());
@@ -353,7 +353,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedMapping embeddedMapping = (EmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedMapping.isDefault());
@@ -373,7 +373,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedMapping embeddedMapping = (EmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedMapping.isDefault());
@@ -393,7 +393,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedMapping embeddedMapping = (EmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedMapping.isDefault());
@@ -413,7 +413,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedMapping embeddedMapping = (EmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedMapping.isDefault());
@@ -433,7 +433,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedMapping embeddedMapping = (EmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedMapping.isDefault());
@@ -453,7 +453,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedMapping embeddedMapping = (EmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
assertFalse(embeddedMapping.isDefault());
@@ -479,7 +479,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
assertFalse(specifiedAttributeOverrides.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -546,7 +546,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
EmbeddedMapping embeddedMapping = (EmbeddedMapping) getJavaPersistentType().getAttributeNamed("myEmbedded").getMapping();
AttributeOverrideContainer attributeOverrideContainer = embeddedMapping.getAttributeOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals("myEmbedded", resourceField.getName());
assertEquals(0, resourceField.getAnnotationsSize(AttributeOverrideAnnotation.ANNOTATION_NAME));
@@ -638,7 +638,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
AttributeOverrideContainer attributeOverrideContainer = embeddedMapping.getAttributeOverrideContainer();
assertEquals(0, attributeOverrideContainer.getSpecifiedOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -661,7 +661,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
AttributeOverrideContainer attributeOverrideContainer = embeddedMapping.getAttributeOverrideContainer();
assertEquals(2, attributeOverrideContainer.getOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -689,7 +689,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
AttributeOverrideContainer attributeOverrideContainer = embeddedMapping.getAttributeOverrideContainer();
assertEquals(2, attributeOverrideContainer.getVirtualOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -721,7 +721,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> attributeOverrides = resourceField.getAnnotations(AttributeOverrideAnnotation.ANNOTATION_NAME).iterator();
@@ -760,7 +760,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
virtualAttributeOverrides.next().convertToSpecified();
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> attributeOverrides = resourceField.getAnnotations(AttributeOverrideAnnotation.ANNOTATION_NAME).iterator();
@@ -780,7 +780,7 @@ public class JavaEmbeddedMappingTests extends ContextModelTestCase
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.moveAnnotation(1, 0, AttributeOverrideAnnotation.ANNOTATION_NAME);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEntityTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEntityTests.java
index d396a0d..70a1b5c 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEntityTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaEntityTests.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.context.java;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
@@ -391,7 +391,7 @@ public class JavaEntityTests extends ContextModelTestCase
entity.getTable().setSpecifiedName("FOO");
entity.addSpecifiedSecondaryTable(0);
entity.addSpecifiedPrimaryKeyJoinColumn(0);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
resourceType.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceType.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
entity.setSpecifiedInheritanceStrategy(InheritanceType.JOINED);
@@ -430,7 +430,7 @@ public class JavaEntityTests extends ContextModelTestCase
entity.getTable().setSpecifiedName("FOO");
entity.addSpecifiedSecondaryTable(0);
entity.addSpecifiedPrimaryKeyJoinColumn(0);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
resourceType.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceType.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
entity.setSpecifiedInheritanceStrategy(InheritanceType.JOINED);
@@ -469,7 +469,7 @@ public class JavaEntityTests extends ContextModelTestCase
entity.getTable().setSpecifiedName("FOO");
entity.addSpecifiedSecondaryTable(0);
entity.addSpecifiedPrimaryKeyJoinColumn(0);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
resourceType.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceType.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
entity.setSpecifiedInheritanceStrategy(InheritanceType.JOINED);
@@ -522,7 +522,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertEquals(AccessType.PROPERTY, childPersistentType.getAccess());
((IdMapping) superPersistentType.getAttributeNamed("id").getMapping()).getColumn().setSpecifiedName("FOO");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
resourceType.getMethods().iterator().next().removeAnnotation(JPA.ID);
getJpaProject().synchronizeContextModel();
@@ -566,7 +566,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertEquals(AccessType.PROPERTY, getJavaPersistentType().getAccess());
((IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping()).getColumn().setSpecifiedName("FOO");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
resourceType.getMethods().iterator().next().removeAnnotation(JPA.ID);
getJpaProject().synchronizeContextModel();
@@ -645,7 +645,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertEquals("foo", getJavaEntity().getSpecifiedName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertEquals("foo", ((EntityAnnotation) resourceType.getAnnotation(EntityAnnotation.ANNOTATION_NAME)).getName());
}
@@ -658,7 +658,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertNull(getJavaEntity().getSpecifiedName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertNull(((EntityAnnotation) resourceType.getAnnotation(EntityAnnotation.ANNOTATION_NAME)).getName());
}
@@ -667,7 +667,7 @@ public class JavaEntityTests extends ContextModelTestCase
createTestEntityWithName();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
EntityAnnotation entity = (EntityAnnotation) resourceType.getAnnotation(EntityAnnotation.ANNOTATION_NAME);
entity.setName("foo");
getJpaProject().synchronizeContextModel();
@@ -749,7 +749,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertEquals(InheritanceType.TABLE_PER_CLASS, getJavaEntity().getSpecifiedInheritanceStrategy());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
InheritanceAnnotation inheritance = (InheritanceAnnotation) resourceType.getAnnotation(InheritanceAnnotation.ANNOTATION_NAME);
inheritance.setStrategy(org.eclipse.jpt.jpa.core.resource.java.InheritanceType.JOINED);
@@ -772,7 +772,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertEquals(InheritanceType.JOINED, getJavaEntity().getSpecifiedInheritanceStrategy());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
InheritanceAnnotation inheritance = (InheritanceAnnotation) resourceType.getAnnotation(InheritanceAnnotation.ANNOTATION_NAME);
assertEquals(org.eclipse.jpt.jpa.core.resource.java.InheritanceType.JOINED, inheritance.getStrategy());
@@ -806,7 +806,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertEquals(DISCRIMINATOR_VALUE, getJavaEntity().getSpecifiedDiscriminatorValue());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
DiscriminatorValueAnnotation discriminatorValue = (DiscriminatorValueAnnotation) resourceType.getAnnotation(DiscriminatorValueAnnotation.ANNOTATION_NAME);
discriminatorValue.setValue("foo");
@@ -829,7 +829,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertEquals("foo", getJavaEntity().getSpecifiedDiscriminatorValue());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
DiscriminatorValueAnnotation discriminatorValue = (DiscriminatorValueAnnotation) resourceType.getAnnotation(DiscriminatorValueAnnotation.ANNOTATION_NAME);
assertEquals("foo", discriminatorValue.getValue());
}
@@ -850,7 +850,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
Entity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertEquals(0, entity.getSecondaryTablesSize());
@@ -879,7 +879,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
Entity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertEquals(0, entity.getSpecifiedSecondaryTablesSize());
@@ -899,7 +899,7 @@ public class JavaEntityTests extends ContextModelTestCase
getJavaEntity().addSpecifiedSecondaryTable(0).setSpecifiedName("BAR");
getJavaEntity().addSpecifiedSecondaryTable(0).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> secondaryTables = resourceType.getAnnotations(SecondaryTableAnnotation.ANNOTATION_NAME).iterator();
assertEquals("BAZ", ((SecondaryTableAnnotation) secondaryTables.next()).getName());
@@ -916,7 +916,7 @@ public class JavaEntityTests extends ContextModelTestCase
getJavaEntity().addSpecifiedSecondaryTable(1).setSpecifiedName("BAR");
getJavaEntity().addSpecifiedSecondaryTable(0).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> secondaryTables = resourceType.getAnnotations(SecondaryTableAnnotation.ANNOTATION_NAME).iterator();
assertEquals("BAZ", ((SecondaryTableAnnotation) secondaryTables.next()).getName());
@@ -965,7 +965,7 @@ public class JavaEntityTests extends ContextModelTestCase
getJavaEntity().addSpecifiedSecondaryTable(1).setSpecifiedName("BAR");
getJavaEntity().addSpecifiedSecondaryTable(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertEquals(3, resourceType.getAnnotationsSize(SecondaryTableAnnotation.ANNOTATION_NAME));
@@ -1006,7 +1006,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
entity.addSpecifiedSecondaryTable(0).setSpecifiedName("FOO");
entity.addSpecifiedSecondaryTable(1).setSpecifiedName("BAR");
@@ -1045,7 +1045,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
((SecondaryTableAnnotation) resourceType.addAnnotation(0, SecondaryTableAnnotation.ANNOTATION_NAME)).setName("FOO");
((SecondaryTableAnnotation) resourceType.addAnnotation(1, SecondaryTableAnnotation.ANNOTATION_NAME)).setName("BAR");
@@ -1159,7 +1159,7 @@ public class JavaEntityTests extends ContextModelTestCase
createTestEntityWithName();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation secondaryTable = (SecondaryTableAnnotation) resourceType.addAnnotation(0, JPA.SECONDARY_TABLE);
secondaryTable.setName("FOO");
getJpaProject().synchronizeContextModel();
@@ -1200,7 +1200,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertEquals("bar", secondaryTables.next().getSpecifiedName());
assertEquals("baz", secondaryTables.next().getSpecifiedName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
resourceType.removeAnnotation(0, JPA.SECONDARY_TABLE);
getJpaProject().synchronizeContextModel();
@@ -1232,7 +1232,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertNull(getJavaEntity().getGeneratorContainer().getSequenceGenerator());
assertEquals(0, getJavaEntity().getPersistenceUnit().getGeneratorsSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
resourceType.addAnnotation(JPA.SEQUENCE_GENERATOR);
getJpaProject().synchronizeContextModel();
@@ -1252,7 +1252,7 @@ public class JavaEntityTests extends ContextModelTestCase
getJavaEntity().getGeneratorContainer().addSequenceGenerator();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertNotNull(resourceType.getAnnotation(JPA.SEQUENCE_GENERATOR));
assertNotNull(getJavaEntity().getGeneratorContainer().getSequenceGenerator());
@@ -1270,7 +1270,7 @@ public class JavaEntityTests extends ContextModelTestCase
createTestEntity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
resourceType.addAnnotation(JPA.SEQUENCE_GENERATOR);
getJpaProject().synchronizeContextModel();
@@ -1295,7 +1295,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertNull(getJavaEntity().getGeneratorContainer().getTableGenerator());
assertEquals(0, getJavaEntity().getPersistenceUnit().getGeneratorsSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
resourceType.addAnnotation(JPA.TABLE_GENERATOR);
getJpaProject().synchronizeContextModel();
@@ -1315,7 +1315,7 @@ public class JavaEntityTests extends ContextModelTestCase
getJavaEntity().getGeneratorContainer().addTableGenerator();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertNotNull(resourceType.getAnnotation(JPA.TABLE_GENERATOR));
assertNotNull(getJavaEntity().getGeneratorContainer().getTableGenerator());
@@ -1333,7 +1333,7 @@ public class JavaEntityTests extends ContextModelTestCase
createTestEntity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
resourceType.addAnnotation(JPA.TABLE_GENERATOR);
getJpaProject().synchronizeContextModel();
@@ -1357,7 +1357,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertNotNull(getJavaEntity().getDiscriminatorColumn());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
DiscriminatorColumnAnnotation column = (DiscriminatorColumnAnnotation) resourceType.addAnnotation(JPA.DISCRIMINATOR_COLUMN);
column.setName("foo");
getJpaProject().synchronizeContextModel();
@@ -1383,7 +1383,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertFalse(specifiedPkJoinColumns.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
//add an annotation to the resource model and verify the context model is updated
PrimaryKeyJoinColumnAnnotation pkJoinColumn = (PrimaryKeyJoinColumnAnnotation) resourceType.addAnnotation(0, JPA.PRIMARY_KEY_JOIN_COLUMN);
@@ -1489,7 +1489,7 @@ public class JavaEntityTests extends ContextModelTestCase
getJavaEntity().addSpecifiedPrimaryKeyJoinColumn(0).setSpecifiedName("BAR");
getJavaEntity().addSpecifiedPrimaryKeyJoinColumn(0).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> pkJoinColumns = resourceType.getAnnotations(PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME).iterator();
assertEquals("BAZ", ((PrimaryKeyJoinColumnAnnotation) pkJoinColumns.next()).getName());
@@ -1506,7 +1506,7 @@ public class JavaEntityTests extends ContextModelTestCase
getJavaEntity().addSpecifiedPrimaryKeyJoinColumn(1).setSpecifiedName("BAR");
getJavaEntity().addSpecifiedPrimaryKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> pkJoinColumns = resourceType.getAnnotations(PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME).iterator();
assertEquals("FOO", ((PrimaryKeyJoinColumnAnnotation) pkJoinColumns.next()).getName());
@@ -1522,7 +1522,7 @@ public class JavaEntityTests extends ContextModelTestCase
getJavaEntity().addSpecifiedPrimaryKeyJoinColumn(1).setSpecifiedName("BAR");
getJavaEntity().addSpecifiedPrimaryKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertEquals(3, resourceType.getAnnotationsSize(PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME));
@@ -1563,7 +1563,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
entity.addSpecifiedPrimaryKeyJoinColumn(0).setSpecifiedName("FOO");
entity.addSpecifiedPrimaryKeyJoinColumn(1).setSpecifiedName("BAR");
@@ -1602,7 +1602,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
((PrimaryKeyJoinColumnAnnotation) resourceType.addAnnotation(0, PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME)).setName("FOO");
((PrimaryKeyJoinColumnAnnotation) resourceType.addAnnotation(1, PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME)).setName("BAR");
@@ -1822,7 +1822,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertFalse(specifiedAttributeOverrides.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
//add an annotation to the resource model and verify the context model is updated
AttributeOverrideAnnotation attributeOverride = (AttributeOverrideAnnotation) resourceType.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
@@ -1891,7 +1891,7 @@ public class JavaEntityTests extends ContextModelTestCase
JavaEntity javaEntity = (JavaEntity) classRefs.next().getJavaPersistentType().getMapping();
AttributeOverrideContainer overrideContainer = javaEntity.getAttributeOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
assertEquals(SUB_TYPE_NAME, resourceType.getName());
assertEquals(0, resourceType.getAnnotationsSize(AttributeOverrideAnnotation.ANNOTATION_NAME));
@@ -1983,7 +1983,7 @@ public class JavaEntityTests extends ContextModelTestCase
JavaEntity javaEntity = (JavaEntity) classRefs.next().getJavaPersistentType().getMapping();
AttributeOverrideContainer overrideContainer = javaEntity.getAttributeOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
assertEquals(SUB_TYPE_NAME, resourceType.getName());
assertEquals(0, resourceType.getAnnotationsSize(AttributeOverrideAnnotation.ANNOTATION_NAME));
@@ -2030,7 +2030,7 @@ public class JavaEntityTests extends ContextModelTestCase
AttributeOverrideContainer overrideContainer = getJavaEntity().getAttributeOverrideContainer();
assertEquals(0, overrideContainer.getSpecifiedOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
//add an annotation to the resource model and verify the context model is updated
AttributeOverrideAnnotation attributeOverride = (AttributeOverrideAnnotation) resourceType.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
@@ -2085,7 +2085,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertEquals(5, overrideContainer.getOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
AttributeOverrideAnnotation annotation = (AttributeOverrideAnnotation) resourceType.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
annotation.setName("bar");
getJpaProject().synchronizeContextModel();
@@ -2104,7 +2104,7 @@ public class JavaEntityTests extends ContextModelTestCase
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> attributeOverrides = resourceType.getAnnotations(AttributeOverrideAnnotation.ANNOTATION_NAME).iterator();
assertEquals("foo", ((AttributeOverrideAnnotation) attributeOverrides.next()).getName());
@@ -2126,7 +2126,7 @@ public class JavaEntityTests extends ContextModelTestCase
virtualAttributeOverrides.next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> attributeOverrides = resourceType.getAnnotations(AttributeOverrideAnnotation.ANNOTATION_NAME).iterator();
assertEquals("basic", ((AttributeOverrideAnnotation) attributeOverrides.next()).getName());
@@ -2148,7 +2148,7 @@ public class JavaEntityTests extends ContextModelTestCase
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
assertEquals(4, IterableTools.size(resourceType.getAnnotations(AttributeOverrideAnnotation.ANNOTATION_NAME)));
overrideContainer.getSpecifiedOverrides().iterator().next().convertToVirtual();
@@ -2210,7 +2210,7 @@ public class JavaEntityTests extends ContextModelTestCase
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> javaAttributeOverrides = resourceType.getAnnotations(AttributeOverrideAnnotation.ANNOTATION_NAME).iterator();
assertEquals(4, IteratorTools.size(javaAttributeOverrides));
@@ -2248,7 +2248,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaAttributeOverrideContainer overrideContainer = getJavaEntity().getAttributeOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
((AttributeOverrideAnnotation) resourceType.addAnnotation(0, AttributeOverrideAnnotation.ANNOTATION_NAME)).setName("FOO");
((AttributeOverrideAnnotation) resourceType.addAnnotation(1, AttributeOverrideAnnotation.ANNOTATION_NAME)).setName("BAR");
@@ -2403,7 +2403,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertFalse(specifiedAssociationOverrides.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
//add an annotation to the resource model and verify the context model is updated
AssociationOverrideAnnotation associationOverride = (AssociationOverrideAnnotation) resourceType.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -2472,7 +2472,7 @@ public class JavaEntityTests extends ContextModelTestCase
JavaEntity javaEntity = (JavaEntity) classRefs.next().getJavaPersistentType().getMapping();
AssociationOverrideContainer overrideContainer = javaEntity.getAssociationOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
assertEquals(SUB_TYPE_NAME, resourceType.getName());
assertEquals(0, resourceType.getAnnotationsSize(AssociationOverrideAnnotation.ANNOTATION_NAME));
@@ -2584,7 +2584,7 @@ public class JavaEntityTests extends ContextModelTestCase
AssociationOverrideContainer overrideContainer = getJavaEntity().getAssociationOverrideContainer();
assertEquals(0, overrideContainer.getSpecifiedOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
//add an annotation to the resource model and verify the context model is updated
AssociationOverrideAnnotation associationOverride = (AssociationOverrideAnnotation) resourceType.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -2631,7 +2631,7 @@ public class JavaEntityTests extends ContextModelTestCase
assertEquals(2, overrideContainer.getOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
AssociationOverrideAnnotation annotation = (AssociationOverrideAnnotation) resourceType.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
annotation.setName("bar");
getJpaProject().synchronizeContextModel();
@@ -2649,7 +2649,7 @@ public class JavaEntityTests extends ContextModelTestCase
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> associationOverrides = resourceType.getAnnotations(AssociationOverrideAnnotation.ANNOTATION_NAME).iterator();
assertEquals("oneToOne", ((AssociationOverrideAnnotation) associationOverrides.next()).getName());
@@ -2670,7 +2670,7 @@ public class JavaEntityTests extends ContextModelTestCase
virtualAssociationOverrides.next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> associationOverrides = resourceType.getAnnotations(AssociationOverrideAnnotation.ANNOTATION_NAME).iterator();
assertEquals("manyToOne", ((AssociationOverrideAnnotation) associationOverrides.next()).getName());
@@ -2689,7 +2689,7 @@ public class JavaEntityTests extends ContextModelTestCase
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
assertEquals(2, resourceType.getAnnotationsSize(AssociationOverrideAnnotation.ANNOTATION_NAME));
overrideContainer.getSpecifiedOverrides().iterator().next().convertToVirtual();
@@ -2724,7 +2724,7 @@ public class JavaEntityTests extends ContextModelTestCase
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> javaAssociationOverrides = resourceType.getAnnotations(AssociationOverrideAnnotation.ANNOTATION_NAME).iterator();
assertEquals(2, IteratorTools.size(javaAssociationOverrides));
@@ -2755,7 +2755,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaAssociationOverrideContainer overrideContainer = getJavaEntity().getAssociationOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
((AssociationOverrideAnnotation) resourceType.addAnnotation(0, AssociationOverrideAnnotation.ANNOTATION_NAME)).setName("FOO");
((AssociationOverrideAnnotation) resourceType.addAnnotation(1, AssociationOverrideAnnotation.ANNOTATION_NAME)).setName("BAR");
@@ -2837,7 +2837,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQuery namedQuery1 = entity.getQueryContainer().addNamedQuery(0);
namedQuery1.setName("FOO");
@@ -2886,7 +2886,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
entity.getQueryContainer().addNamedQuery(0).setName("FOO");
entity.getQueryContainer().addNamedQuery(1).setName("BAR");
@@ -2918,7 +2918,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
entity.getQueryContainer().addNamedQuery(0).setName("FOO");
@@ -2937,7 +2937,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
entity.getQueryContainer().addNamedNativeQuery(0).setName("FOO");
@@ -2956,7 +2956,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
entity.getQueryContainer().addNamedQuery(0).setName("FOO");
entity.getQueryContainer().addNamedQuery(1).setName("BAR");
@@ -2995,7 +2995,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertEquals(0, entity.getPersistenceUnit().getQueriesSize());
@@ -3053,7 +3053,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertEquals(0, entity.getQueryContainer().getNamedQueriesSize());
@@ -3070,7 +3070,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedNativeQuery namedNativeQuery = entity.getQueryContainer().addNamedNativeQuery(0);
namedNativeQuery.setName("FOO");
@@ -3109,7 +3109,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
entity.getQueryContainer().addNamedNativeQuery(0).setName("FOO");
entity.getQueryContainer().addNamedNativeQuery(1).setName("BAR");
@@ -3141,7 +3141,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
entity.getQueryContainer().addNamedNativeQuery(0).setName("FOO");
entity.getQueryContainer().addNamedNativeQuery(1).setName("BAR");
@@ -3179,7 +3179,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertEquals(0, entity.getPersistenceUnit().getQueriesSize());
@@ -3237,7 +3237,7 @@ public class JavaEntityTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertEquals(0, entity.getQueryContainer().getNamedNativeQueriesSize());
@@ -3254,7 +3254,7 @@ public class JavaEntityTests extends ContextModelTestCase
createTestIdClass();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertNull(getJavaEntity().getIdClassReference().getSpecifiedIdClassName());
assertNull(getJavaEntity().getIdClassReference().getIdClass());
@@ -3302,7 +3302,7 @@ public class JavaEntityTests extends ContextModelTestCase
createTestIdClass();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertNull(getJavaEntity().getIdClassReference().getSpecifiedIdClassName());
assertNull(resourceType.getAnnotation(IdClassAnnotation.ANNOTATION_NAME));
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaGeneratedValueTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaGeneratedValueTests.java
index faa8417..13985b1 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaGeneratedValueTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaGeneratedValueTests.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.
@@ -14,7 +14,7 @@ import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.context.GeneratedValue;
import org.eclipse.jpt.jpa.core.context.GenerationType;
@@ -59,7 +59,7 @@ public class JavaGeneratedValueTests extends ContextModelTestCase
assertEquals(GENERATOR, idMapping.getGeneratedValue().getGenerator());
//change resource model sequenceGenerator name, verify the context model is updated
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
GeneratedValueAnnotation generatedValue = (GeneratedValueAnnotation) resourceField.getAnnotation(JPA.GENERATED_VALUE);
@@ -80,7 +80,7 @@ public class JavaGeneratedValueTests extends ContextModelTestCase
assertEquals("foo", idMapping.getGeneratedValue().getGenerator());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
GeneratedValueAnnotation generatedValue = (GeneratedValueAnnotation) resourceField.getAnnotation(JPA.GENERATED_VALUE);
@@ -98,7 +98,7 @@ public class JavaGeneratedValueTests extends ContextModelTestCase
assertNotNull(idMapping.getGeneratedValue());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
GeneratedValueAnnotation generatedValue = (GeneratedValueAnnotation) resourceField.getAnnotation(JPA.GENERATED_VALUE);
@@ -113,7 +113,7 @@ public class JavaGeneratedValueTests extends ContextModelTestCase
assertEquals(GeneratedValue.DEFAULT_STRATEGY, idMapping.getGeneratedValue().getStrategy());
//change resource model sequenceGenerator name, verify the context model is updated
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
GeneratedValueAnnotation generatedValue = (GeneratedValueAnnotation) resourceField.getAnnotation(JPA.GENERATED_VALUE);
@@ -135,7 +135,7 @@ public class JavaGeneratedValueTests extends ContextModelTestCase
assertEquals(GenerationType.IDENTITY, idMapping.getGeneratedValue().getStrategy());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
GeneratedValueAnnotation generatedValue = (GeneratedValueAnnotation) resourceField.getAnnotation(JPA.GENERATED_VALUE);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaIdMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaIdMappingTests.java
index f825f1f..5a5448a 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaIdMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaIdMappingTests.java
@@ -13,7 +13,7 @@ import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.BasicMapping;
@@ -130,7 +130,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
assertEquals("FOO", ((BasicMapping) persistentAttribute.getMapping()).getColumn().getSpecifiedName());
assertEquals(TemporalType.TIME, ((BaseTemporalConverter) ((BasicMapping) persistentAttribute.getMapping()).getConverter()).getTemporalType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(BasicAnnotation.ANNOTATION_NAME));
@@ -160,7 +160,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
assertEquals("FOO", ((BasicMapping) persistentAttribute.getMapping()).getColumn().getSpecifiedName());
assertEquals(TemporalType.TIME, ((BaseTemporalConverter) ((BasicMapping) persistentAttribute.getMapping()).getConverter()).getTemporalType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ColumnAnnotation.ANNOTATION_NAME));
@@ -189,7 +189,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
assertEquals("FOO", ((VersionMapping) persistentAttribute.getMapping()).getColumn().getSpecifiedName());
assertEquals(TemporalType.TIME, ((BaseTemporalConverter) ((VersionMapping) persistentAttribute.getMapping()).getConverter()).getTemporalType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
@@ -218,7 +218,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedAnnotation.ANNOTATION_NAME));
@@ -247,7 +247,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof TransientMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
@@ -276,7 +276,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedIdMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedIdAnnotation.ANNOTATION_NAME));
@@ -305,7 +305,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof OneToOneMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
@@ -334,7 +334,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof OneToManyMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
@@ -363,7 +363,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof ManyToOneMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
@@ -392,7 +392,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof ManyToManyMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
@@ -424,7 +424,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
idMapping.setConverter(BaseTemporalConverter.class);
((BaseTemporalConverter) idMapping.getConverter()).setTemporalType(TemporalType.TIME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TemporalAnnotation temporal = (TemporalAnnotation) resourceField.getAnnotation(TemporalAnnotation.ANNOTATION_NAME);
@@ -444,7 +444,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
assertNull(idMapping.getConverter().getType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TemporalAnnotation temporal = (TemporalAnnotation) resourceField.addAnnotation(TemporalAnnotation.ANNOTATION_NAME);
temporal.setValue(org.eclipse.jpt.jpa.core.resource.java.TemporalType.DATE);
@@ -470,7 +470,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
assertNull(idMapping.getColumn().getSpecifiedName());
assertEquals("id", idMapping.getColumn().getName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation column = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
column.setName("foo");
@@ -490,7 +490,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
assertNull(idMapping.getGeneratorContainer().getSequenceGenerator());
assertEquals(0, idMapping.getPersistenceUnit().getGeneratorsSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(JPA.SEQUENCE_GENERATOR);
getJpaProject().synchronizeContextModel();
@@ -514,7 +514,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
idMapping.getGeneratorContainer().addSequenceGenerator();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNotNull(resourceField.getAnnotation(JPA.SEQUENCE_GENERATOR));
@@ -536,7 +536,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(JPA.SEQUENCE_GENERATOR);
getJpaProject().synchronizeContextModel();
@@ -565,7 +565,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
assertNull(idMapping.getGeneratorContainer().getTableGenerator());
assertEquals(0, idMapping.getPersistenceUnit().getGeneratorsSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(JPA.TABLE_GENERATOR);
getJpaProject().synchronizeContextModel();
@@ -588,7 +588,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
idMapping.getGeneratorContainer().addTableGenerator();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNotNull(resourceField.getAnnotation(JPA.TABLE_GENERATOR));
@@ -610,7 +610,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(JPA.TABLE_GENERATOR);
getJpaProject().synchronizeContextModel();
@@ -639,7 +639,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
assertNull(idMapping.getGeneratedValue());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(JPA.GENERATED_VALUE);
getJpaProject().synchronizeContextModel();
@@ -655,7 +655,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNotNull(idMapping.getGeneratedValue());
@@ -673,7 +673,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
idMapping.addGeneratedValue();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNotNull(resourceField.getAnnotation(JPA.GENERATED_VALUE));
@@ -695,7 +695,7 @@ public class JavaIdMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(JPA.GENERATED_VALUE);
getJpaProject().synchronizeContextModel();
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaJoinColumnTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaJoinColumnTests.java
index 936603f..a638e81 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaJoinColumnTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaJoinColumnTests.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.
@@ -11,7 +11,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.context.java;
import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
@@ -97,7 +97,7 @@ public class JavaJoinColumnTests extends ContextModelTestCase
JavaOneToOneMapping oneToOneMapping = (JavaOneToOneMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnAnnotation joinColumnAnnotation = (JoinColumnAnnotation) resourceField.getAnnotation(JoinColumnAnnotation.ANNOTATION_NAME);
@@ -128,7 +128,7 @@ public class JavaJoinColumnTests extends ContextModelTestCase
JavaOneToOneMapping oneToOneMapping = (JavaOneToOneMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
@@ -198,7 +198,7 @@ public class JavaJoinColumnTests extends ContextModelTestCase
JavaOneToOneMapping oneToOneMapping = (JavaOneToOneMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals(0, joinColumns.getSpecifiedJoinColumnsSize());
@@ -229,7 +229,7 @@ public class JavaJoinColumnTests extends ContextModelTestCase
JavaOneToOneMapping oneToOneMapping = (JavaOneToOneMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JavaJoinColumn joinColumn = joinColumns.addSpecifiedJoinColumn(0);
@@ -259,7 +259,7 @@ public class JavaJoinColumnTests extends ContextModelTestCase
JavaOneToOneMapping oneToOneMapping = (JavaOneToOneMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals(0, joinColumns.getSpecifiedJoinColumnsSize());
@@ -290,7 +290,7 @@ public class JavaJoinColumnTests extends ContextModelTestCase
JavaOneToOneMapping oneToOneMapping = (JavaOneToOneMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
@@ -321,7 +321,7 @@ public class JavaJoinColumnTests extends ContextModelTestCase
JavaOneToOneMapping oneToOneMapping = (JavaOneToOneMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals(0, joinColumns.getSpecifiedJoinColumnsSize());
@@ -352,7 +352,7 @@ public class JavaJoinColumnTests extends ContextModelTestCase
JavaOneToOneMapping oneToOneMapping = (JavaOneToOneMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
@@ -378,7 +378,7 @@ public class JavaJoinColumnTests extends ContextModelTestCase
JavaOneToOneMapping oneToOneMapping = (JavaOneToOneMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnAnnotation javaJoinColumn = (JoinColumnAnnotation) resourceField.getAnnotation(JoinColumnAnnotation.ANNOTATION_NAME);
@@ -410,7 +410,7 @@ public class JavaJoinColumnTests extends ContextModelTestCase
JavaOneToOneMapping oneToOneMapping = (JavaOneToOneMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
@@ -436,7 +436,7 @@ public class JavaJoinColumnTests extends ContextModelTestCase
JavaOneToOneMapping oneToOneMapping = (JavaOneToOneMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnAnnotation javaJoinColumn = (JoinColumnAnnotation) resourceField.getAnnotation(JoinColumnAnnotation.ANNOTATION_NAME);
@@ -468,7 +468,7 @@ public class JavaJoinColumnTests extends ContextModelTestCase
JavaOneToOneMapping oneToOneMapping = (JavaOneToOneMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
@@ -494,7 +494,7 @@ public class JavaJoinColumnTests extends ContextModelTestCase
JavaOneToOneMapping oneToOneMapping = (JavaOneToOneMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals(0, joinColumns.getSpecifiedJoinColumnsSize());
@@ -524,7 +524,7 @@ public class JavaJoinColumnTests extends ContextModelTestCase
JavaOneToOneMapping oneToOneMapping = (JavaOneToOneMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaJoinTableTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaJoinTableTests.java
index f0e7fe2..6103c7f 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaJoinTableTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaJoinTableTests.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.
@@ -15,7 +15,7 @@ import org.eclipse.jdt.core.ICompilationUnit;
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.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
@@ -139,7 +139,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation javaJoinTable = (JoinTableAnnotation) resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
@@ -180,7 +180,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation joinTableAnnotation = (JoinTableAnnotation) resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
@@ -217,7 +217,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
addXmlClassRef(PACKAGE_NAME + ".Project");
assertEquals(TYPE_NAME + "_Project", joinTable.getDefaultName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME));
@@ -280,7 +280,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
assertEquals("projects_proj_id", inverseJoinColumn.getDefaultName());
assertEquals("proj_id", inverseJoinColumn.getDefaultReferencedColumnName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME));
@@ -345,7 +345,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
assertEquals("projects_proj_id", inverseJoinColumn.getDefaultName());
assertEquals("proj_id", inverseJoinColumn.getDefaultReferencedColumnName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME));
@@ -379,7 +379,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation javaJoinTable = (JoinTableAnnotation) resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
@@ -420,7 +420,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation joinTableAnnotation = (JoinTableAnnotation) resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
@@ -448,7 +448,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation javaJoinTable = (JoinTableAnnotation) resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
@@ -489,7 +489,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation joinTableAnnotation = (JoinTableAnnotation) resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
@@ -517,7 +517,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
@@ -559,7 +559,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
joinTable.addSpecifiedJoinColumn(0).setSpecifiedName("FOO");
@@ -589,7 +589,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
joinTable.addSpecifiedJoinColumn(0).setSpecifiedName("FOO");
@@ -629,7 +629,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation joinTableResource = (JoinTableAnnotation) resourceField.addAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
@@ -739,7 +739,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
@@ -781,7 +781,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
joinTable.addSpecifiedInverseJoinColumn(0).setSpecifiedName("FOO");
@@ -811,7 +811,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
joinTable.addSpecifiedInverseJoinColumn(0).setSpecifiedName("FOO");
@@ -851,7 +851,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation joinTableResource = (JoinTableAnnotation) resourceField.addAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
@@ -959,7 +959,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
ListIterator<JavaUniqueConstraint> uniqueConstraints = joinTable.getUniqueConstraints().iterator();
assertFalse(uniqueConstraints.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation joinTableAnnotation = (JoinTableAnnotation) resourceField.addAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
joinTableAnnotation.addUniqueConstraint(0).addColumnName(0, "foo");
@@ -982,7 +982,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
assertEquals(0, joinTable.getUniqueConstraintsSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation joinTableAnnotation = (JoinTableAnnotation) resourceField.addAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
joinTableAnnotation.addUniqueConstraint(0).addColumnName(0, "foo");
@@ -1002,7 +1002,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
joinTable.addUniqueConstraint(0).addColumnName(0, "BAR");
joinTable.addUniqueConstraint(0).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation joinTableAnnotation = (JoinTableAnnotation) resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
ListIterator<UniqueConstraintAnnotation> uniqueConstraints = joinTableAnnotation.getUniqueConstraints().iterator();
@@ -1023,7 +1023,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
joinTable.addUniqueConstraint(1).addColumnName(0, "BAR");
joinTable.addUniqueConstraint(0).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation joinTableAnnotation = (JoinTableAnnotation) resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
ListIterator<UniqueConstraintAnnotation> uniqueConstraints = joinTableAnnotation.getUniqueConstraints().iterator();
@@ -1044,7 +1044,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
joinTable.addUniqueConstraint(1).addColumnName(0, "BAR");
joinTable.addUniqueConstraint(2).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation joinTableAnnotation = (JoinTableAnnotation) resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
@@ -1090,7 +1090,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
joinTable.addUniqueConstraint(1).addColumnName(0, "BAR");
joinTable.addUniqueConstraint(2).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation joinTableAnnotation = (JoinTableAnnotation) resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
@@ -1127,7 +1127,7 @@ public class JavaJoinTableTests extends ContextModelTestCase
JavaManyToManyMapping manyToManyMapping = (JavaManyToManyMapping) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaJoinTable joinTable = manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinTableAnnotation joinTableAnnotation = (JoinTableAnnotation) resourceField.addAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaManyToManyMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaManyToManyMappingTests.java
index b033dc8..0bd2b45 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaManyToManyMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaManyToManyMappingTests.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.
@@ -14,7 +14,7 @@ import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
@@ -310,7 +310,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof BasicMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(BasicAnnotation.ANNOTATION_NAME));
@@ -331,7 +331,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
assertNull(resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME));
@@ -352,7 +352,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof VersionMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
@@ -374,7 +374,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof IdMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
@@ -396,7 +396,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedAnnotation.ANNOTATION_NAME));
@@ -418,7 +418,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedIdMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedIdAnnotation.ANNOTATION_NAME));
@@ -440,7 +440,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof TransientMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
@@ -462,7 +462,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof OneToOneMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
@@ -484,7 +484,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof OneToManyMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
@@ -506,7 +506,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof ManyToOneMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
@@ -521,7 +521,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ManyToManyAnnotation manyToManyAnnotation = (ManyToManyAnnotation) resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME);
@@ -548,7 +548,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ManyToManyAnnotation manyToMany = (ManyToManyAnnotation) resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME);
@@ -573,7 +573,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ManyToManyAnnotation manyToMany = (ManyToManyAnnotation) resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME);
@@ -606,7 +606,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ManyToManyAnnotation manyToMany = (ManyToManyAnnotation) resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME);
@@ -635,7 +635,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ManyToManyAnnotation manyToMany = (ManyToManyAnnotation) resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME);
@@ -662,7 +662,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ManyToManyAnnotation manyToMany = (ManyToManyAnnotation) resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME);
@@ -684,7 +684,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
createTestEntityWithManyToManyMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ManyToManyAnnotation annotation = (ManyToManyAnnotation) resourceField.getAnnotation(JPA.MANY_TO_MANY);
PersistentAttribute contextAttribute = getJavaPersistentType().getAttributes().iterator().next();
@@ -713,7 +713,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
createTestEntityWithManyToManyMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ManyToManyAnnotation annotation = (ManyToManyAnnotation) resourceField.getAnnotation(JPA.MANY_TO_MANY);
PersistentAttribute contextAttribute = getJavaPersistentType().getAttributes().iterator().next();
@@ -901,7 +901,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(manyToManyMapping.getSpecifiedMapKey());
@@ -939,7 +939,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(manyToManyMapping.getSpecifiedMapKey());
@@ -1009,7 +1009,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(manyToManyMapping.getOrderable().getSpecifiedOrderBy());
@@ -1037,7 +1037,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(manyToManyMapping.getOrderable().getSpecifiedOrderBy());
@@ -1062,7 +1062,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertTrue(manyToManyMapping.getOrderable().isNoOrdering());
@@ -1092,7 +1092,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertTrue(manyToManyMapping.getOrderable().isNoOrdering());
@@ -1118,7 +1118,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(manyToManyMapping.getOrderable().isPkOrdering());
@@ -1148,7 +1148,7 @@ public class JavaManyToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(manyToManyMapping.getOrderable().isCustomOrdering());
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaManyToOneMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaManyToOneMappingTests.java
index b25b186..c8866df 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaManyToOneMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaManyToOneMappingTests.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.context.java;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
@@ -189,7 +189,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof BasicMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(BasicAnnotation.ANNOTATION_NAME));
@@ -209,7 +209,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
assertEquals(0, resourceField.getAnnotationsSize(JoinColumnAnnotation.ANNOTATION_NAME));
@@ -229,7 +229,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof VersionMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
@@ -250,7 +250,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof IdMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
@@ -271,7 +271,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedAnnotation.ANNOTATION_NAME));
@@ -292,7 +292,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedIdMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedIdAnnotation.ANNOTATION_NAME));
@@ -313,7 +313,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof TransientMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
@@ -334,7 +334,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof OneToOneMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
@@ -355,7 +355,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof OneToManyMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
@@ -376,7 +376,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof ManyToManyMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
@@ -390,7 +390,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ManyToOneAnnotation manyToOne = (ManyToOneAnnotation) resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME);
@@ -417,7 +417,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ManyToOneAnnotation manyToOne = (ManyToOneAnnotation) resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME);
@@ -442,7 +442,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ManyToOneAnnotation manyToOne = (ManyToOneAnnotation) resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME);
@@ -474,7 +474,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ManyToOneAnnotation manyToOne = (ManyToOneAnnotation) resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME);
@@ -510,7 +510,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
assertFalse(specifiedJoinColumns.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -622,7 +622,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
joinColumns.addSpecifiedJoinColumn(0).setSpecifiedName("BAR");
joinColumns.addSpecifiedJoinColumn(0).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> joinColumnsIterator = resourceField.getAnnotations(JPA.JOIN_COLUMN).iterator();
@@ -644,7 +644,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
joinColumns.addSpecifiedJoinColumn(1).setSpecifiedName("BAR");
joinColumns.addSpecifiedJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> joinColumnsIterator = resourceField.getAnnotations(JPA.JOIN_COLUMN).iterator();
@@ -665,7 +665,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
joinColumns.addSpecifiedJoinColumn(1).setSpecifiedName("BAR");
joinColumns.addSpecifiedJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals(3, resourceField.getAnnotationsSize(JPA.JOIN_COLUMN));
@@ -713,7 +713,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
joinColumns.addSpecifiedJoinColumn(1).setSpecifiedName("BAR");
joinColumns.addSpecifiedJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> javaJoinColumns = resourceField.getAnnotations(JPA.JOIN_COLUMN).iterator();
@@ -750,7 +750,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
JoinColumnRelationshipStrategy joinColumns = manyToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
((JoinColumnAnnotation) resourceField.addAnnotation(0, JPA.JOIN_COLUMN)).setName("FOO");
@@ -819,7 +819,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
createTestEntityWithManyToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
PersistentAttribute contextAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping mapping = (ManyToOneMapping) contextAttribute.getMapping();
@@ -837,7 +837,7 @@ public class JavaManyToOneMappingTests extends ContextModelTestCase
createTestEntityWithManyToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
PersistentAttribute contextAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping mapping = (ManyToOneMapping) contextAttribute.getMapping();
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaMappedSuperclassTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaMappedSuperclassTests.java
index cfb7e21..adc4213 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaMappedSuperclassTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaMappedSuperclassTests.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.
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.context.java;
import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
@@ -68,7 +68,7 @@ public class JavaMappedSuperclassTests extends ContextModelTestCase
getJavaPersistentType().setMappingKey(MappingKeys.ENTITY_TYPE_MAPPING_KEY);
assertTrue(getJavaPersistentType().getMapping() instanceof Entity);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertNull(resourceType.getAnnotation(MappedSuperclassAnnotation.ANNOTATION_NAME));
assertNotNull(resourceType.getAnnotation(IdClassAnnotation.ANNOTATION_NAME));
}
@@ -83,7 +83,7 @@ public class JavaMappedSuperclassTests extends ContextModelTestCase
getJavaPersistentType().setMappingKey(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY);
assertTrue(getJavaPersistentType().getMapping() instanceof Embeddable);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertNull(resourceType.getAnnotation(MappedSuperclassAnnotation.ANNOTATION_NAME));
assertNull(resourceType.getAnnotation(IdClassAnnotation.ANNOTATION_NAME));
}
@@ -98,7 +98,7 @@ public class JavaMappedSuperclassTests extends ContextModelTestCase
getJavaPersistentType().setMappingKey(MappingKeys.NULL_TYPE_MAPPING_KEY);
assertTrue(getJavaPersistentType().getMapping() instanceof JavaNullTypeMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertNull(resourceType.getAnnotation(MappedSuperclassAnnotation.ANNOTATION_NAME));
assertNull(resourceType.getAnnotation(IdClassAnnotation.ANNOTATION_NAME));
}
@@ -209,7 +209,7 @@ public class JavaMappedSuperclassTests extends ContextModelTestCase
createTestIdClass();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
MappedSuperclass mappedSuperclass = (MappedSuperclass) getJavaPersistentType().getMapping();
IdClassReference idClassRef = mappedSuperclass.getIdClassReference();
@@ -261,7 +261,7 @@ public class JavaMappedSuperclassTests extends ContextModelTestCase
createTestIdClass();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
MappedSuperclass mappedSuperclass = (MappedSuperclass) getJavaPersistentType().getMapping();
IdClassReference idClassRef = mappedSuperclass.getIdClassReference();
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaNamedNativeQueryTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaNamedNativeQueryTests.java
index 73dbad1..0f40fb5 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaNamedNativeQueryTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaNamedNativeQueryTests.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.
@@ -13,7 +13,7 @@ import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.context.Entity;
import org.eclipse.jpt.jpa.core.context.NamedNativeQuery;
@@ -55,7 +55,7 @@ public class JavaNamedNativeQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedNativeQuery namedNativeQuery = entity.getQueryContainer().getNamedNativeQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedNativeQueryAnnotation javaNamedNativeQuery = (NamedNativeQueryAnnotation) resourceType.getAnnotation(0, NamedNativeQueryAnnotation.ANNOTATION_NAME);
assertEquals(QUERY_NAME, javaNamedNativeQuery.getName());
@@ -80,7 +80,7 @@ public class JavaNamedNativeQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedNativeQuery namedNativeQuery = entity.getQueryContainer().getNamedNativeQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedNativeQueryAnnotation javaNamedNativeQuery = (NamedNativeQueryAnnotation) resourceType.getAnnotation(0, NamedNativeQueryAnnotation.ANNOTATION_NAME);
assertEquals(QUERY_NAME, javaNamedNativeQuery.getName());
@@ -104,7 +104,7 @@ public class JavaNamedNativeQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedNativeQuery namedNativeQuery = entity.getQueryContainer().getNamedNativeQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedNativeQueryAnnotation javaNamedNativeQuery = (NamedNativeQueryAnnotation) resourceType.getAnnotation(0, NamedNativeQueryAnnotation.ANNOTATION_NAME);
assertEquals(QUERY_QUERY, javaNamedNativeQuery.getQuery());
@@ -129,7 +129,7 @@ public class JavaNamedNativeQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedNativeQuery namedNativeQuery = entity.getQueryContainer().getNamedNativeQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedNativeQueryAnnotation javaNamedNativeQuery = (NamedNativeQueryAnnotation) resourceType.getAnnotation(0, NamedNativeQueryAnnotation.ANNOTATION_NAME);
assertEquals(QUERY_QUERY, javaNamedNativeQuery.getQuery());
@@ -153,7 +153,7 @@ public class JavaNamedNativeQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedNativeQuery namedNativeQuery = entity.getQueryContainer().getNamedNativeQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedNativeQueryAnnotation javaNamedNativeQuery = (NamedNativeQueryAnnotation) resourceType.getAnnotation(0, NamedNativeQueryAnnotation.ANNOTATION_NAME);
@@ -192,7 +192,7 @@ public class JavaNamedNativeQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedNativeQuery namedNativeQuery = entity.getQueryContainer().getNamedNativeQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedNativeQueryAnnotation javaNamedNativeQuery = (NamedNativeQueryAnnotation) resourceType.getAnnotation(0, NamedNativeQueryAnnotation.ANNOTATION_NAME);
namedNativeQuery.addHint(0).setName("FOO");
@@ -220,7 +220,7 @@ public class JavaNamedNativeQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedNativeQuery namedNativeQuery = entity.getQueryContainer().getNamedNativeQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedNativeQueryAnnotation javaNamedNativeQuery = (NamedNativeQueryAnnotation) resourceType.getAnnotation(0, NamedNativeQueryAnnotation.ANNOTATION_NAME);
namedNativeQuery.addHint(0).setName("FOO");
@@ -258,7 +258,7 @@ public class JavaNamedNativeQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedNativeQuery namedNativeQuery = entity.getQueryContainer().getNamedNativeQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedNativeQueryAnnotation queryAnnotation = (NamedNativeQueryAnnotation) resourceType.getAnnotation(0, NamedNativeQueryAnnotation.ANNOTATION_NAME);
queryAnnotation.addHint(0).setName("FOO");
@@ -314,7 +314,7 @@ public class JavaNamedNativeQueryTests extends ContextModelTestCase
NamedNativeQuery namedNativeQuery = entity.getQueryContainer().getNamedNativeQueries().iterator().next();
assertEquals(0, namedNativeQuery.getHintsSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedNativeQueryAnnotation javaNamedNativeQuery = (NamedNativeQueryAnnotation) resourceType.getAnnotation(0, NamedNativeQueryAnnotation.ANNOTATION_NAME);
@@ -339,7 +339,7 @@ public class JavaNamedNativeQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedNativeQuery namedNativeQuery = entity.getQueryContainer().getNamedNativeQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedNativeQueryAnnotation queryAnnotation = (NamedNativeQueryAnnotation) resourceType.getAnnotation(0, NamedNativeQueryAnnotation.ANNOTATION_NAME);
assertEquals(null, queryAnnotation.getResultClass());
@@ -364,7 +364,7 @@ public class JavaNamedNativeQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedNativeQuery namedNativeQuery = entity.getQueryContainer().getNamedNativeQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedNativeQueryAnnotation javaNamedNativeQuery = (NamedNativeQueryAnnotation) resourceType.getAnnotation(0, NamedNativeQueryAnnotation.ANNOTATION_NAME);
assertEquals(null, javaNamedNativeQuery.getResultClass());
@@ -388,7 +388,7 @@ public class JavaNamedNativeQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedNativeQuery namedNativeQuery = entity.getQueryContainer().getNamedNativeQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedNativeQueryAnnotation javaNamedNativeQuery = (NamedNativeQueryAnnotation) resourceType.getAnnotation(0, NamedNativeQueryAnnotation.ANNOTATION_NAME);
assertEquals(null, javaNamedNativeQuery.getResultSetMapping());
@@ -413,7 +413,7 @@ public class JavaNamedNativeQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedNativeQuery namedNativeQuery = entity.getQueryContainer().getNamedNativeQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedNativeQueryAnnotation javaNamedNativeQuery = (NamedNativeQueryAnnotation) resourceType.getAnnotation(0, NamedNativeQueryAnnotation.ANNOTATION_NAME);
assertEquals(null, javaNamedNativeQuery.getResultSetMapping());
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaNamedQueryTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaNamedQueryTests.java
index 01d8f7d..f1cc587 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaNamedQueryTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaNamedQueryTests.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.
@@ -13,7 +13,7 @@ import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.context.Entity;
import org.eclipse.jpt.jpa.core.context.NamedQuery;
@@ -55,7 +55,7 @@ public class JavaNamedQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedQuery namedQuery = entity.getQueryContainer().getNamedQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQueryAnnotation javaNamedQuery = (NamedQueryAnnotation) resourceType.getAnnotation(0, NamedQueryAnnotation.ANNOTATION_NAME);
assertEquals(QUERY_NAME, javaNamedQuery.getName());
@@ -80,7 +80,7 @@ public class JavaNamedQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedQuery namedQuery = entity.getQueryContainer().getNamedQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQueryAnnotation javaNamedQuery = (NamedQueryAnnotation) resourceType.getAnnotation(0, NamedQueryAnnotation.ANNOTATION_NAME);
assertEquals(QUERY_NAME, javaNamedQuery.getName());
@@ -104,7 +104,7 @@ public class JavaNamedQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedQuery namedQuery = entity.getQueryContainer().getNamedQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQueryAnnotation javaNamedQuery = (NamedQueryAnnotation) resourceType.getAnnotation(0, NamedQueryAnnotation.ANNOTATION_NAME);
assertEquals(QUERY_QUERY, javaNamedQuery.getQuery());
@@ -129,7 +129,7 @@ public class JavaNamedQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedQuery namedQuery = entity.getQueryContainer().getNamedQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQueryAnnotation javaNamedQuery = (NamedQueryAnnotation) resourceType.getAnnotation(0, NamedQueryAnnotation.ANNOTATION_NAME);
assertEquals(QUERY_QUERY, javaNamedQuery.getQuery());
@@ -153,7 +153,7 @@ public class JavaNamedQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedQuery namedQuery = entity.getQueryContainer().getNamedQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQueryAnnotation javaNamedQuery = (NamedQueryAnnotation) resourceType.getAnnotation(0, NamedQueryAnnotation.ANNOTATION_NAME);
@@ -192,7 +192,7 @@ public class JavaNamedQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedQuery namedQuery = entity.getQueryContainer().getNamedQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQueryAnnotation javaNamedQuery = (NamedQueryAnnotation) resourceType.getAnnotation(0, NamedQueryAnnotation.ANNOTATION_NAME);
namedQuery.addHint(0).setName("FOO");
@@ -220,7 +220,7 @@ public class JavaNamedQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedQuery namedQuery = entity.getQueryContainer().getNamedQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQueryAnnotation javaNamedQuery = (NamedQueryAnnotation) resourceType.getAnnotation(0, NamedQueryAnnotation.ANNOTATION_NAME);
namedQuery.addHint(0).setName("FOO");
@@ -258,7 +258,7 @@ public class JavaNamedQueryTests extends ContextModelTestCase
Entity entity = getJavaEntity();
NamedQuery namedQuery = entity.getQueryContainer().getNamedQueries().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQueryAnnotation namedQueryAnnotation = (NamedQueryAnnotation) resourceType.getAnnotation(0, NamedQueryAnnotation.ANNOTATION_NAME);
namedQueryAnnotation.addHint(0).setName("FOO");
@@ -314,7 +314,7 @@ public class JavaNamedQueryTests extends ContextModelTestCase
NamedQuery namedQuery = entity.getQueryContainer().getNamedQueries().iterator().next();
assertEquals(0, namedQuery.getHintsSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQueryAnnotation javaNamedQuery = (NamedQueryAnnotation) resourceType.getAnnotation(0, NamedQueryAnnotation.ANNOTATION_NAME);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaOneToManyMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaOneToManyMappingTests.java
index d0623e9..31bbfc6 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaOneToManyMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaOneToManyMappingTests.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.
@@ -14,7 +14,7 @@ import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
@@ -311,7 +311,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof BasicMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(BasicAnnotation.ANNOTATION_NAME));
@@ -332,7 +332,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
assertNull(resourceField.getAnnotation(JoinTableAnnotation.ANNOTATION_NAME));
@@ -353,7 +353,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof VersionMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
@@ -375,7 +375,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof IdMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
@@ -397,7 +397,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedAnnotation.ANNOTATION_NAME));
@@ -419,7 +419,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedIdMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedIdAnnotation.ANNOTATION_NAME));
@@ -441,7 +441,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof TransientMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
@@ -463,7 +463,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof OneToOneMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
@@ -485,7 +485,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof ManyToManyMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
@@ -507,7 +507,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof ManyToOneMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
@@ -523,7 +523,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToManyAnnotation oneToManyAnnotation = (OneToManyAnnotation) resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME);
@@ -550,7 +550,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToManyAnnotation oneToMany = (OneToManyAnnotation) resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME);
@@ -575,7 +575,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToManyAnnotation oneToMany = (OneToManyAnnotation) resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME);
@@ -608,7 +608,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToManyAnnotation oneToMany = (OneToManyAnnotation) resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME);
@@ -637,7 +637,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToManyAnnotation oneToMany = (OneToManyAnnotation) resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME);
@@ -664,7 +664,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToManyAnnotation oneToMany = (OneToManyAnnotation) resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME);
@@ -726,7 +726,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
createTestEntityWithOneToManyMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToManyAnnotation annotation = (OneToManyAnnotation) resourceField.getAnnotation(JPA.ONE_TO_MANY);
PersistentAttribute contextAttribute = getJavaPersistentType().getAttributes().iterator().next();
@@ -755,7 +755,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
createTestEntityWithOneToManyMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToManyAnnotation annotation = (OneToManyAnnotation) resourceField.getAnnotation(JPA.ONE_TO_MANY);
PersistentAttribute contextAttribute = getJavaPersistentType().getAttributes().iterator().next();
@@ -906,7 +906,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(oneToManyMapping.getSpecifiedMapKey());
@@ -944,7 +944,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(oneToManyMapping.getSpecifiedMapKey());
@@ -1015,7 +1015,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(oneToManyMapping.getOrderable().getSpecifiedOrderBy());
@@ -1043,7 +1043,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(oneToManyMapping.getOrderable().getSpecifiedOrderBy());
@@ -1068,7 +1068,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertTrue(oneToManyMapping.getOrderable().isNoOrdering());
@@ -1098,7 +1098,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(oneToManyMapping.getOrderable().isPkOrdering());
@@ -1128,7 +1128,7 @@ public class JavaOneToManyMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(oneToManyMapping.getOrderable().isCustomOrdering());
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaOneToOneMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaOneToOneMappingTests.java
index 916ed59..83d8f0d 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaOneToOneMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaOneToOneMappingTests.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.context.java;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
@@ -223,7 +223,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof BasicMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(BasicAnnotation.ANNOTATION_NAME));
@@ -243,7 +243,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
assertEquals(0, resourceField.getAnnotationsSize(JoinColumnAnnotation.ANNOTATION_NAME));
@@ -263,7 +263,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof VersionMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
@@ -284,7 +284,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof IdMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
@@ -305,7 +305,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedAnnotation.ANNOTATION_NAME));
@@ -326,7 +326,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedIdMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedIdAnnotation.ANNOTATION_NAME));
@@ -347,7 +347,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof TransientMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
@@ -368,7 +368,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof ManyToOneMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
@@ -389,7 +389,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof OneToManyMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
@@ -410,7 +410,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof ManyToManyMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
@@ -425,7 +425,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation oneToOneAnnotation = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -452,7 +452,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation oneToOne = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -478,7 +478,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
MappedByRelationshipStrategy mappedBy = oneToOneMapping.getRelationship().getMappedByStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation oneToOne = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -506,7 +506,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
MappedByRelationshipStrategy mappedBy = oneToOneMapping.getRelationship().getMappedByStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation oneToOne = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -531,7 +531,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation oneToOne = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -564,7 +564,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation oneToOne = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -594,7 +594,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation oneToOne = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -626,7 +626,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation oneToOne = (OneToOneAnnotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -660,7 +660,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
assertFalse(specifiedJoinColumns.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -776,7 +776,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
joinColumns.addSpecifiedJoinColumn(0).setSpecifiedName("BAR");
joinColumns.addSpecifiedJoinColumn(0).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> joinColumnsIterator =
resourceField.getAnnotations(JPA.JOIN_COLUMN).iterator();
@@ -799,7 +799,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
joinColumns.addSpecifiedJoinColumn(1).setSpecifiedName("BAR");
joinColumns.addSpecifiedJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> joinColumnsIterator =
resourceField.getAnnotations(JPA.JOIN_COLUMN).iterator();
@@ -821,7 +821,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
joinColumns.addSpecifiedJoinColumn(1).setSpecifiedName("BAR");
joinColumns.addSpecifiedJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals(3, resourceField.getAnnotationsSize(JPA.JOIN_COLUMN));
@@ -869,7 +869,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
joinColumns.addSpecifiedJoinColumn(1).setSpecifiedName("BAR");
joinColumns.addSpecifiedJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> javaJoinColumns = resourceField.getAnnotations(JPA.JOIN_COLUMN).iterator();
@@ -907,7 +907,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
JoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
((JoinColumnAnnotation) resourceField.addAnnotation(0, JPA.JOIN_COLUMN)).setName("FOO");
@@ -1124,7 +1124,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
assertFalse(primaryKeyJoinColumns.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -1213,7 +1213,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
strategy.addPrimaryKeyJoinColumn(0).setSpecifiedName("BAR");
strategy.addPrimaryKeyJoinColumn(0).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> joinColumns = resourceField.getAnnotations(JPA.PRIMARY_KEY_JOIN_COLUMN).iterator();
@@ -1236,7 +1236,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
strategy.addPrimaryKeyJoinColumn(1).setSpecifiedName("BAR");
strategy.addPrimaryKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> joinColumns = resourceField.getAnnotations(JPA.PRIMARY_KEY_JOIN_COLUMN).iterator();
@@ -1259,7 +1259,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
strategy.addPrimaryKeyJoinColumn(1).setSpecifiedName("BAR");
strategy.addPrimaryKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals(3, resourceField.getAnnotationsSize(JPA.PRIMARY_KEY_JOIN_COLUMN));
@@ -1308,7 +1308,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
strategy.addPrimaryKeyJoinColumn(1).setSpecifiedName("BAR");
strategy.addPrimaryKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> javaJoinColumns = resourceField.getAnnotations(JPA.PRIMARY_KEY_JOIN_COLUMN).iterator();
@@ -1343,7 +1343,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
@@ -1400,7 +1400,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation annotation = (OneToOneAnnotation) resourceField.getAnnotation(JPA.ONE_TO_ONE);
PersistentAttribute contextAttribute = getJavaPersistentType().getAttributes().iterator().next();
@@ -1443,7 +1443,7 @@ public class JavaOneToOneMappingTests extends ContextModelTestCase
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOneAnnotation annotation = (OneToOneAnnotation) resourceField.getAnnotation(JPA.ONE_TO_ONE);
PersistentAttribute contextAttribute = getJavaPersistentType().getAttributes().iterator().next();
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaPrimaryKeyJoinColumnTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaPrimaryKeyJoinColumnTests.java
index 23a7c09..79b7019 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaPrimaryKeyJoinColumnTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaPrimaryKeyJoinColumnTests.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.context.java;
import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.ObjectTools;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
@@ -78,7 +78,7 @@ public class JavaPrimaryKeyJoinColumnTests extends ContextModelTestCase
assertEquals(PRIMARY_KEY_JOIN_COLUMN_NAME, specifiedPkJoinColumn.getSpecifiedName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
PrimaryKeyJoinColumnAnnotation pkJoinColumnResource = (PrimaryKeyJoinColumnAnnotation) resourceType.getAnnotation(0, JPA.PRIMARY_KEY_JOIN_COLUMN);
pkJoinColumnResource.setName("FOO");
@@ -128,7 +128,7 @@ public class JavaPrimaryKeyJoinColumnTests extends ContextModelTestCase
specifiedPkJoinColumn.setSpecifiedName("foo");
assertEquals("foo", specifiedPkJoinColumn.getSpecifiedName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
PrimaryKeyJoinColumnAnnotation columnAnnotation = (PrimaryKeyJoinColumnAnnotation) resourceType.getAnnotation(0, JPA.PRIMARY_KEY_JOIN_COLUMN);
assertEquals("foo", columnAnnotation.getName());
@@ -146,7 +146,7 @@ public class JavaPrimaryKeyJoinColumnTests extends ContextModelTestCase
PrimaryKeyJoinColumn specifiedPkJoinColumn = getJavaEntity().getSpecifiedPrimaryKeyJoinColumns().iterator().next();
assertNull(specifiedPkJoinColumn.getColumnDefinition());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
PrimaryKeyJoinColumnAnnotation column = (PrimaryKeyJoinColumnAnnotation) resourceType.getAnnotation(0, JPA.PRIMARY_KEY_JOIN_COLUMN);
column.setColumnDefinition(COLUMN_DEFINITION);
getJpaProject().synchronizeContextModel();
@@ -171,7 +171,7 @@ public class JavaPrimaryKeyJoinColumnTests extends ContextModelTestCase
PrimaryKeyJoinColumn specifiedPkJoinColumn = getJavaEntity().getSpecifiedPrimaryKeyJoinColumns().iterator().next();
specifiedPkJoinColumn.setColumnDefinition("foo");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
PrimaryKeyJoinColumnAnnotation column = (PrimaryKeyJoinColumnAnnotation) resourceType.getAnnotation(0, JPA.PRIMARY_KEY_JOIN_COLUMN);
assertEquals("foo", column.getColumnDefinition());
@@ -188,7 +188,7 @@ public class JavaPrimaryKeyJoinColumnTests extends ContextModelTestCase
PrimaryKeyJoinColumn specifiedPkJoinColumn = getJavaEntity().getSpecifiedPrimaryKeyJoinColumns().iterator().next();
assertNull(specifiedPkJoinColumn.getSpecifiedReferencedColumnName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
PrimaryKeyJoinColumnAnnotation pkJoinColumnResource = (PrimaryKeyJoinColumnAnnotation) resourceType.getAnnotation(0, JPA.PRIMARY_KEY_JOIN_COLUMN);
pkJoinColumnResource.setReferencedColumnName("FOO");
@@ -226,7 +226,7 @@ public class JavaPrimaryKeyJoinColumnTests extends ContextModelTestCase
createTestEntityWithPrimaryKeyJoinColumn();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
PrimaryKeyJoinColumnAnnotation pkJoinColumnResource = (PrimaryKeyJoinColumnAnnotation) resourceType.getAnnotation(0, JPA.PRIMARY_KEY_JOIN_COLUMN);
pkJoinColumnResource.setReferencedColumnName("FOO");
@@ -245,7 +245,7 @@ public class JavaPrimaryKeyJoinColumnTests extends ContextModelTestCase
specifiedPkJoinColumn.setSpecifiedReferencedColumnName("foo");
assertEquals("foo", specifiedPkJoinColumn.getSpecifiedReferencedColumnName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
PrimaryKeyJoinColumnAnnotation columnAnnotation = (PrimaryKeyJoinColumnAnnotation) resourceType.getAnnotation(0, JPA.PRIMARY_KEY_JOIN_COLUMN);
assertEquals("foo", columnAnnotation.getReferencedColumnName());
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaQueryHintTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaQueryHintTests.java
index 160c5a5..b5608bc 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaQueryHintTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaQueryHintTests.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.
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.context.java;
import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.context.Entity;
import org.eclipse.jpt.jpa.core.context.QueryHint;
@@ -53,7 +53,7 @@ public class JavaQueryHintTests extends ContextModelTestCase
Entity entity = getJavaEntity();
QueryHint queryHint = entity.getQueryContainer().getNamedQueries().iterator().next().getHints().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQueryAnnotation queryAnnotation = ((NamedQueryAnnotation) resourceType.getAnnotation(0, NamedQueryAnnotation.ANNOTATION_NAME));
QueryHintAnnotation queryHintAnnotation = queryAnnotation.getHints().iterator().next();
@@ -79,7 +79,7 @@ public class JavaQueryHintTests extends ContextModelTestCase
Entity entity = getJavaEntity();
QueryHint queryHint = entity.getQueryContainer().getNamedQueries().iterator().next().getHints().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQueryAnnotation queryAnnotation = ((NamedQueryAnnotation) resourceType.getAnnotation(0, NamedQueryAnnotation.ANNOTATION_NAME));
QueryHintAnnotation queryHintAnnotation = queryAnnotation.getHints().iterator().next();
@@ -104,7 +104,7 @@ public class JavaQueryHintTests extends ContextModelTestCase
Entity entity = getJavaEntity();
QueryHint queryHint = entity.getQueryContainer().getNamedQueries().iterator().next().getHints().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQueryAnnotation queryAnnotation = ((NamedQueryAnnotation) resourceType.getAnnotation(0, NamedQueryAnnotation.ANNOTATION_NAME));
QueryHintAnnotation queryHintAnnotation = queryAnnotation.getHints().iterator().next();
@@ -130,7 +130,7 @@ public class JavaQueryHintTests extends ContextModelTestCase
Entity entity = getJavaEntity();
QueryHint queryHint = entity.getQueryContainer().getNamedQueries().iterator().next().getHints().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQueryAnnotation queryAnnotation = ((NamedQueryAnnotation) resourceType.getAnnotation(0, NamedQueryAnnotation.ANNOTATION_NAME));
QueryHintAnnotation queryHintAnnotation = queryAnnotation.getHints().iterator().next();
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaSecondaryTableTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaSecondaryTableTests.java
index ce9b33d..493452a 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaSecondaryTableTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaSecondaryTableTests.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.context.java;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
@@ -107,7 +107,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
assertEquals("foo", getJavaEntity().getSecondaryTables().iterator().next().getSpecifiedName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation table = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
assertEquals("foo", table.getName());
@@ -117,7 +117,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
createTestEntityWithSecondaryTable();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation table = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
table.setName("foo");
getJpaProject().synchronizeContextModel();
@@ -129,7 +129,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
createTestEntityWithSecondaryTables();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> secondaryTableResources = resourceType.getAnnotations(JPA.SECONDARY_TABLE).iterator();
((SecondaryTableAnnotation) secondaryTableResources.next()).setCatalog("foo");
((SecondaryTableAnnotation) secondaryTableResources.next()).setCatalog("bar");
@@ -144,7 +144,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
createTestEntityWithSecondaryTables();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> secondaryTableResources = resourceType.getAnnotations(JPA.SECONDARY_TABLE).iterator();
((SecondaryTableAnnotation) secondaryTableResources.next()).setSchema("foo");
((SecondaryTableAnnotation) secondaryTableResources.next()).setSchema("bar");
@@ -159,7 +159,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
createTestEntityWithSecondaryTable();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation table = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
table.setCatalog("myCatalog");
@@ -187,7 +187,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
table.setSpecifiedCatalog("myCatalog");
table.setSpecifiedName(null);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation tableAnnotation = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
assertEquals("myCatalog", tableAnnotation.getCatalog());
}
@@ -196,7 +196,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
createTestEntityWithSecondaryTable();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation tableResource = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
tableResource.setSchema("mySchema");
@@ -224,7 +224,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
table.setSpecifiedSchema("mySchema");
table.setSpecifiedName(null);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation tableAnnotation = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
assertEquals("mySchema", tableAnnotation.getSchema());
}
@@ -238,7 +238,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
assertFalse(specifiedPkJoinColumns.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation tableResource = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
//add an annotation to the resource model and verify the context model is updated
@@ -357,7 +357,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
assertEquals("BAR", specifiedPkJoinColumns.next().getName());
assertEquals("FOO", specifiedPkJoinColumns.next().getName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation tableResource = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
Iterator<PrimaryKeyJoinColumnAnnotation> pkJoinColumns = tableResource.getPkJoinColumns().iterator();
@@ -382,7 +382,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
assertEquals("BAR", specifiedPkJoinColumns.next().getName());
assertEquals("BAZ", specifiedPkJoinColumns.next().getName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation tableResource = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
Iterator<PrimaryKeyJoinColumnAnnotation> pkJoinColumns = tableResource.getPkJoinColumns().iterator();
@@ -401,7 +401,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
secondaryTable.addSpecifiedPrimaryKeyJoinColumn(1).setSpecifiedName("BAR");
secondaryTable.addSpecifiedPrimaryKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation tableResource = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
assertEquals(3, tableResource.getPkJoinColumnsSize());
@@ -452,7 +452,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
assertEquals("BAR", specifiedPkJoinColumns.next().getName());
assertEquals("BAZ", specifiedPkJoinColumns.next().getName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation tableResource = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
Iterator<PrimaryKeyJoinColumnAnnotation> pkJoinColumns = tableResource.getPkJoinColumns().iterator();
@@ -523,7 +523,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
ListIterator<JavaUniqueConstraint> uniqueConstraints = secondaryTable.getUniqueConstraints().iterator();
assertFalse(uniqueConstraints.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation secondaryTableAnnotation = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
secondaryTableAnnotation.addUniqueConstraint(0).addColumnName(0, "foo");
secondaryTableAnnotation.addUniqueConstraint(0).addColumnName(0, "bar");
@@ -544,7 +544,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
assertEquals(0, secondaryTable.getUniqueConstraintsSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation secondaryTableAnnotation = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
secondaryTableAnnotation.addUniqueConstraint(0).addColumnName(0, "foo");
secondaryTableAnnotation.addUniqueConstraint(1).addColumnName(0, "bar");
@@ -562,7 +562,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
secondaryTable.addUniqueConstraint(0).addColumnName(0, "BAR");
secondaryTable.addUniqueConstraint(0).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation secondaryTableAnnotation = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
ListIterator<UniqueConstraintAnnotation> uniqueConstraints = secondaryTableAnnotation.getUniqueConstraints().iterator();
@@ -581,7 +581,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
secondaryTable.addUniqueConstraint(1).addColumnName(0, "BAR");
secondaryTable.addUniqueConstraint(0).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation secondaryTableAnnotation = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
ListIterator<UniqueConstraintAnnotation> uniqueConstraints = secondaryTableAnnotation.getUniqueConstraints().iterator();
@@ -600,7 +600,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
secondaryTable.addUniqueConstraint(1).addColumnName(0, "BAR");
secondaryTable.addUniqueConstraint(2).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation secondaryTableAnnotation = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
assertEquals(3, secondaryTableAnnotation.getUniqueConstraintsSize());
@@ -644,7 +644,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
secondaryTable.addUniqueConstraint(1).addColumnName(0, "BAR");
secondaryTable.addUniqueConstraint(2).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation secondaryTableAnnotation = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
assertEquals(3, secondaryTableAnnotation.getUniqueConstraintsSize());
@@ -679,7 +679,7 @@ public class JavaSecondaryTableTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaSecondaryTable secondaryTable = getJavaEntity().getSpecifiedSecondaryTables().iterator().next();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
SecondaryTableAnnotation secondaryTableAnnotation = (SecondaryTableAnnotation) resourceType.getAnnotation(0, JPA.SECONDARY_TABLE);
secondaryTableAnnotation.addUniqueConstraint(0).addColumnName("FOO");
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaSequenceGeneratorTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaSequenceGeneratorTests.java
index 5c8725b..c552422 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaSequenceGeneratorTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaSequenceGeneratorTests.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.context.java;
import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
@@ -59,7 +59,7 @@ public class JavaSequenceGeneratorTests extends ContextModelTestCase
assertEquals(SEQUENCE_GENERATOR_NAME, idMapping.getGeneratorContainer().getSequenceGenerator().getName());
//change resource model sequenceGenerator name, verify the context model is updated
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
SequenceGeneratorAnnotation sequenceGenerator = (SequenceGeneratorAnnotation) resourceField.getAnnotation(JPA.SEQUENCE_GENERATOR);
@@ -80,7 +80,7 @@ public class JavaSequenceGeneratorTests extends ContextModelTestCase
assertEquals("foo", idMapping.getGeneratorContainer().getSequenceGenerator().getName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
SequenceGeneratorAnnotation sequenceGenerator = (SequenceGeneratorAnnotation) resourceField.getAnnotation(JPA.SEQUENCE_GENERATOR);
@@ -94,7 +94,7 @@ public class JavaSequenceGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
assertEquals(SequenceGenerator.DEFAULT_INITIAL_VALUE, idMapping.getGeneratorContainer().getSequenceGenerator().getInitialValue());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
SequenceGeneratorAnnotation sequenceGenerator = (SequenceGeneratorAnnotation) resourceField.getAnnotation(JPA.SEQUENCE_GENERATOR);
@@ -126,7 +126,7 @@ public class JavaSequenceGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
idMapping.getGeneratorContainer().getSequenceGenerator().setSpecifiedInitialValue(Integer.valueOf(20));
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
SequenceGeneratorAnnotation generatorAnnotation = (SequenceGeneratorAnnotation) resourceField.getAnnotation(JPA.SEQUENCE_GENERATOR);
@@ -141,7 +141,7 @@ public class JavaSequenceGeneratorTests extends ContextModelTestCase
assertEquals(DbGenerator.DEFAULT_ALLOCATION_SIZE, idMapping.getGeneratorContainer().getSequenceGenerator().getAllocationSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
SequenceGeneratorAnnotation sequenceGenerator = (SequenceGeneratorAnnotation) resourceField.getAnnotation(JPA.SEQUENCE_GENERATOR);
@@ -173,7 +173,7 @@ public class JavaSequenceGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
idMapping.getGeneratorContainer().getSequenceGenerator().setSpecifiedAllocationSize(Integer.valueOf(25));
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
SequenceGeneratorAnnotation generatorAnnotation = (SequenceGeneratorAnnotation) resourceField.getAnnotation(JPA.SEQUENCE_GENERATOR);
@@ -189,7 +189,7 @@ public class JavaSequenceGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
assertNull(idMapping.getGeneratorContainer().getSequenceGenerator().getSequenceName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
SequenceGeneratorAnnotation sequenceGenerator = (SequenceGeneratorAnnotation) resourceField.getAnnotation(JPA.SEQUENCE_GENERATOR);
@@ -221,7 +221,7 @@ public class JavaSequenceGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
idMapping.getGeneratorContainer().getSequenceGenerator().setSpecifiedSequenceName("mySequenceName");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
SequenceGeneratorAnnotation generatorAnnotation = (SequenceGeneratorAnnotation) resourceField.getAnnotation(JPA.SEQUENCE_GENERATOR);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTableGeneratorTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTableGeneratorTests.java
index 05e0f46..9950596 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTableGeneratorTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTableGeneratorTests.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.context.java;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
@@ -69,7 +69,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
assertEquals(TABLE_GENERATOR_NAME, idMapping.getGeneratorContainer().getTableGenerator().getName());
//change resource model tableGenerator name, verify the context model is updated
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGenerator = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -90,7 +90,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
assertEquals("foo", idMapping.getGeneratorContainer().getTableGenerator().getName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGenerator = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -104,7 +104,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
assertNull(idMapping.getGeneratorContainer().getTableGenerator().getCatalog());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGenerator = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -136,7 +136,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
idMapping.getGeneratorContainer().getTableGenerator().setSpecifiedCatalog("myCatalog");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation generatorAnnotation = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -150,7 +150,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
assertNull(idMapping.getGeneratorContainer().getTableGenerator().getSchema());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGenerator = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -210,7 +210,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
idMapping.getGeneratorContainer().getTableGenerator().setSpecifiedSchema("mySchema");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation generatorAnnotation = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -224,7 +224,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
assertNull(idMapping.getGeneratorContainer().getTableGenerator().getPkColumnName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGenerator = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -256,7 +256,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
idMapping.getGeneratorContainer().getTableGenerator().setSpecifiedPkColumnName("myPkColumnName");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation generatorAnnotation = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -270,7 +270,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
assertNull(idMapping.getGeneratorContainer().getTableGenerator().getValueColumnName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGenerator = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -302,7 +302,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
idMapping.getGeneratorContainer().getTableGenerator().setSpecifiedValueColumnName("myValueColumnName");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation generatorAnnotation = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -316,7 +316,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
assertNull(idMapping.getGeneratorContainer().getTableGenerator().getPkColumnValue());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGenerator = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -348,7 +348,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
idMapping.getGeneratorContainer().getTableGenerator().setSpecifiedPkColumnValue("myPkColumnValue");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation generatorAnnotation = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -362,7 +362,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
assertEquals(TableGenerator.DEFAULT_INITIAL_VALUE, idMapping.getGeneratorContainer().getTableGenerator().getInitialValue());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGenerator = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -394,7 +394,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
idMapping.getGeneratorContainer().getTableGenerator().setSpecifiedInitialValue(Integer.valueOf(20));
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation generatorAnnotation = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -409,7 +409,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
assertEquals(DbGenerator.DEFAULT_ALLOCATION_SIZE, idMapping.getGeneratorContainer().getTableGenerator().getAllocationSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGenerator = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -441,7 +441,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
IdMapping idMapping = (IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping();
idMapping.getGeneratorContainer().getTableGenerator().setSpecifiedAllocationSize(Integer.valueOf(25));
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation generatorAnnotation = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -458,7 +458,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
Iterator<JavaUniqueConstraint> uniqueConstraints = tableGenerator.getUniqueConstraints().iterator();
assertFalse(uniqueConstraints.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGeneratorAnnotation = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
tableGeneratorAnnotation.addUniqueConstraint(0).addColumnName(0, "foo");
@@ -480,7 +480,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
assertEquals(0, tableGenerator.getUniqueConstraintsSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGeneratorAnnotation = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
tableGeneratorAnnotation.addUniqueConstraint(0).addColumnName(0, "foo");
@@ -499,7 +499,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
tableGenerator.addUniqueConstraint(0).addColumnName(0, "BAR");
tableGenerator.addUniqueConstraint(0).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGeneratorAnnotation = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
ListIterator<UniqueConstraintAnnotation> uniqueConstraints = tableGeneratorAnnotation.getUniqueConstraints().iterator();
@@ -519,7 +519,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
tableGenerator.addUniqueConstraint(1).addColumnName(0, "BAR");
tableGenerator.addUniqueConstraint(0).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGeneratorAnnotation = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
ListIterator<UniqueConstraintAnnotation> uniqueConstraints = tableGeneratorAnnotation.getUniqueConstraints().iterator();
@@ -539,7 +539,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
tableGenerator.addUniqueConstraint(1).addColumnName(0, "BAR");
tableGenerator.addUniqueConstraint(2).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGeneratorAnnotation = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -584,7 +584,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
tableGenerator.addUniqueConstraint(1).addColumnName(0, "BAR");
tableGenerator.addUniqueConstraint(2).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGeneratorAnnotation = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
@@ -620,7 +620,7 @@ public class JavaTableGeneratorTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
TableGenerator tableGenerator = ((IdMapping) getJavaPersistentType().getAttributeNamed("id").getMapping()).getGeneratorContainer().getTableGenerator();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TableGeneratorAnnotation tableGeneratorAnnotation = (TableGeneratorAnnotation) resourceField.getAnnotation(JPA.TABLE_GENERATOR);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTableTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTableTests.java
index f4064bd..df96ea3 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTableTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTableTests.java
@@ -14,7 +14,7 @@ import java.util.ListIterator;
import org.eclipse.core.resources.IFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.Entity;
@@ -215,7 +215,7 @@ public class JavaTableTests extends ContextModelTestCase
assertEquals("foo", getJavaEntity().getTable().getSpecifiedName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
TableAnnotation table = (TableAnnotation) resourceType.getAnnotation(JPA.TABLE);
assertEquals("foo", table.getName());
@@ -229,7 +229,7 @@ public class JavaTableTests extends ContextModelTestCase
assertNull(getJavaEntity().getTable().getSpecifiedName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
TableAnnotation table = (TableAnnotation) resourceType.getAnnotation(JPA.TABLE);
assertNull(table);
@@ -239,7 +239,7 @@ public class JavaTableTests extends ContextModelTestCase
createTestEntityWithTable();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
TableAnnotation table = (TableAnnotation) resourceType.getAnnotation(JPA.TABLE);
table.setName("foo");
getJpaProject().synchronizeContextModel();
@@ -255,7 +255,7 @@ public class JavaTableTests extends ContextModelTestCase
createTestEntityWithTable();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
TableAnnotation table = (TableAnnotation) resourceType.getAnnotation(JPA.TABLE);
table.setCatalog("myCatalog");
@@ -319,7 +319,7 @@ public class JavaTableTests extends ContextModelTestCase
Table table = getJavaEntity().getTable();
table.setSpecifiedCatalog("myCatalog");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
TableAnnotation tableResource = (TableAnnotation) resourceType.getAnnotation(JPA.TABLE);
assertEquals("myCatalog", tableResource.getCatalog());
@@ -332,7 +332,7 @@ public class JavaTableTests extends ContextModelTestCase
createTestEntityWithTable();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
TableAnnotation table = (TableAnnotation) resourceType.getAnnotation(JPA.TABLE);
table.setSchema("mySchema");
@@ -359,7 +359,7 @@ public class JavaTableTests extends ContextModelTestCase
Table table = getJavaEntity().getTable();
table.setSpecifiedSchema("mySchema");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
TableAnnotation tableResource = (TableAnnotation) resourceType.getAnnotation(JPA.TABLE);
assertEquals("mySchema", tableResource.getSchema());
@@ -375,7 +375,7 @@ public class JavaTableTests extends ContextModelTestCase
ListIterator<JavaUniqueConstraint> uniqueConstraints = getJavaEntity().getTable().getUniqueConstraints().iterator();
assertFalse(uniqueConstraints.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
TableAnnotation tableAnnotation = (TableAnnotation) resourceType.getAnnotation(JPA.TABLE);
tableAnnotation.addUniqueConstraint(0).addColumnName(0, "foo");
tableAnnotation.addUniqueConstraint(0).addColumnName(0, "bar");
@@ -394,7 +394,7 @@ public class JavaTableTests extends ContextModelTestCase
assertEquals(0, getJavaEntity().getTable().getUniqueConstraintsSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
TableAnnotation tableAnnotation = (TableAnnotation) resourceType.getAnnotation(JPA.TABLE);
tableAnnotation.addUniqueConstraint(0).addColumnName(0, "foo");
tableAnnotation.addUniqueConstraint(1).addColumnName(0, "bar");
@@ -412,7 +412,7 @@ public class JavaTableTests extends ContextModelTestCase
table.addUniqueConstraint(0).addColumnName(0, "BAR");
table.addUniqueConstraint(0).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
TableAnnotation tableAnnotation = (TableAnnotation) resourceType.getAnnotation(JPA.TABLE);
ListIterator<UniqueConstraintAnnotation> uniqueConstraints = tableAnnotation.getUniqueConstraints().iterator();
@@ -431,7 +431,7 @@ public class JavaTableTests extends ContextModelTestCase
table.addUniqueConstraint(1).addColumnName(0, "BAR");
table.addUniqueConstraint(0).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
TableAnnotation tableAnnotation = (TableAnnotation) resourceType.getAnnotation(JPA.TABLE);
ListIterator<UniqueConstraintAnnotation> uniqueConstraints = tableAnnotation.getUniqueConstraints().iterator();
@@ -450,7 +450,7 @@ public class JavaTableTests extends ContextModelTestCase
table.addUniqueConstraint(1).addColumnName(0, "BAR");
table.addUniqueConstraint(2).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
TableAnnotation tableAnnotation = (TableAnnotation) resourceType.getAnnotation(JPA.TABLE);
assertEquals(3, tableAnnotation.getUniqueConstraintsSize());
@@ -494,7 +494,7 @@ public class JavaTableTests extends ContextModelTestCase
table.addUniqueConstraint(1).addColumnName(0, "BAR");
table.addUniqueConstraint(2).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
TableAnnotation tableAnnotation = (TableAnnotation) resourceType.getAnnotation(JPA.TABLE);
assertEquals(3, tableAnnotation.getUniqueConstraintsSize());
@@ -529,7 +529,7 @@ public class JavaTableTests extends ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaTable table = getJavaEntity().getTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
TableAnnotation tableAnnotation = (TableAnnotation) resourceType.getAnnotation(JPA.TABLE);
tableAnnotation.addUniqueConstraint(0).addColumnName("FOO");
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTransientMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTransientMappingTests.java
index 2c70572..3a251ed 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTransientMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaTransientMappingTests.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.
@@ -13,7 +13,7 @@ import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.BasicMapping;
@@ -78,7 +78,7 @@ public class JavaTransientMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof BasicMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(BasicAnnotation.ANNOTATION_NAME));
@@ -96,7 +96,7 @@ public class JavaTransientMappingTests extends ContextModelTestCase
assertTrue(persistentAttribute.getMapping() instanceof BasicMapping);
assertTrue(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
}
@@ -112,7 +112,7 @@ public class JavaTransientMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof VersionMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
@@ -129,7 +129,7 @@ public class JavaTransientMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedAnnotation.ANNOTATION_NAME));
@@ -146,7 +146,7 @@ public class JavaTransientMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof IdMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
@@ -163,7 +163,7 @@ public class JavaTransientMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedIdMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedIdAnnotation.ANNOTATION_NAME));
@@ -180,7 +180,7 @@ public class JavaTransientMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof OneToOneMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
@@ -197,7 +197,7 @@ public class JavaTransientMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof OneToManyMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
@@ -214,7 +214,7 @@ public class JavaTransientMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof ManyToOneMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
@@ -231,7 +231,7 @@ public class JavaTransientMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof ManyToManyMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaVersionMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaVersionMappingTests.java
index d134b20..3503db6 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaVersionMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaVersionMappingTests.java
@@ -13,7 +13,7 @@ import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.BasicMapping;
@@ -104,7 +104,7 @@ public class JavaVersionMappingTests extends ContextModelTestCase
assertEquals("FOO", ((BasicMapping) persistentAttribute.getMapping()).getColumn().getSpecifiedName());
assertEquals(TemporalType.TIME, ((BaseTemporalConverter) ((BasicMapping) persistentAttribute.getMapping()).getConverter()).getTemporalType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(BasicAnnotation.ANNOTATION_NAME));
@@ -128,7 +128,7 @@ public class JavaVersionMappingTests extends ContextModelTestCase
assertEquals("FOO", ((BasicMapping) persistentAttribute.getMapping()).getColumn().getSpecifiedName());
assertEquals(TemporalType.TIME, ((BaseTemporalConverter) ((BasicMapping) persistentAttribute.getMapping()).getConverter()).getTemporalType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ColumnAnnotation.ANNOTATION_NAME));
@@ -151,7 +151,7 @@ public class JavaVersionMappingTests extends ContextModelTestCase
assertEquals("FOO", ((IdMapping) persistentAttribute.getMapping()).getColumn().getSpecifiedName());
assertEquals(TemporalType.TIME, ((BaseTemporalConverter) ((IdMapping) persistentAttribute.getMapping()).getConverter()).getTemporalType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
@@ -174,7 +174,7 @@ public class JavaVersionMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedAnnotation.ANNOTATION_NAME));
@@ -197,7 +197,7 @@ public class JavaVersionMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof TransientMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
@@ -220,7 +220,7 @@ public class JavaVersionMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedIdMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedIdAnnotation.ANNOTATION_NAME));
@@ -243,7 +243,7 @@ public class JavaVersionMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof OneToOneMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME));
@@ -266,7 +266,7 @@ public class JavaVersionMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof OneToManyMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
@@ -289,7 +289,7 @@ public class JavaVersionMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof ManyToOneMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
@@ -312,7 +312,7 @@ public class JavaVersionMappingTests extends ContextModelTestCase
persistentAttribute.setMappingKey(MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping() instanceof ManyToManyMapping);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
@@ -342,7 +342,7 @@ public class JavaVersionMappingTests extends ContextModelTestCase
versionMapping.setConverter(BaseTemporalConverter.class);
((BaseTemporalConverter) versionMapping.getConverter()).setTemporalType(TemporalType.TIME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TemporalAnnotation temporal = (TemporalAnnotation) resourceField.getAnnotation(TemporalAnnotation.ANNOTATION_NAME);
@@ -362,7 +362,7 @@ public class JavaVersionMappingTests extends ContextModelTestCase
assertNull(versionMapping.getConverter().getType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
TemporalAnnotation temporal = (TemporalAnnotation) resourceField.addAnnotation(TemporalAnnotation.ANNOTATION_NAME);
temporal.setValue(org.eclipse.jpt.jpa.core.resource.java.TemporalType.DATE);
@@ -388,7 +388,7 @@ public class JavaVersionMappingTests extends ContextModelTestCase
assertNull(versionMapping.getColumn().getSpecifiedName());
assertEquals("id", versionMapping.getColumn().getName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation column = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
column.setName("foo");
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaAssociationOverride2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaAssociationOverride2_0Tests.java
index cb1eb8b..e42c7f7 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaAssociationOverride2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaAssociationOverride2_0Tests.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.
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.jpa2.context.java;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
@@ -138,7 +138,7 @@ public class GenericJavaAssociationOverride2_0Tests extends Generic2_0ContextMod
ReadOnlyAssociationOverride javaAssociationOverride = overrideContainer.getVirtualOverrides().iterator().next();
javaAssociationOverride = ((VirtualAssociationOverride) javaAssociationOverride).convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
assertEquals("address", javaAssociationOverride.getName());
@@ -180,7 +180,7 @@ public class GenericJavaAssociationOverride2_0Tests extends Generic2_0ContextMod
VirtualAssociationOverride virtualAssociationOverride = overrideContainer.getVirtualOverrides().iterator().next();
AssociationOverride specifiedAssociationOverride = virtualAssociationOverride.convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
assertEquals("address", specifiedAssociationOverride.getName());
@@ -210,7 +210,7 @@ public class GenericJavaAssociationOverride2_0Tests extends Generic2_0ContextMod
JoinColumnRelationshipStrategy joiningStrategy = specifiedOverride.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -253,7 +253,7 @@ public class GenericJavaAssociationOverride2_0Tests extends Generic2_0ContextMod
AssociationOverride javaAssociationOverride = overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
JoinColumnRelationshipStrategy joiningStrategy = javaAssociationOverride.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
assertEquals(1, associationOverrideResource.getJoinColumnsSize());
@@ -290,7 +290,7 @@ public class GenericJavaAssociationOverride2_0Tests extends Generic2_0ContextMod
AssociationOverride javaAssociationOverride = overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
JoinColumnRelationshipStrategy joiningStrategy = javaAssociationOverride.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
joiningStrategy.addSpecifiedJoinColumn(0).setSpecifiedName("FOO");
@@ -333,7 +333,7 @@ public class GenericJavaAssociationOverride2_0Tests extends Generic2_0ContextMod
JavaAssociationOverride specifiedAssociationOverride = virtualAssociationOverride.convertToSpecified();
JavaJoinColumnRelationshipStrategy joiningStrategy = specifiedAssociationOverride.getRelationship().getJoinColumnStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
ListIterator<JavaJoinColumn> joinColumns = joiningStrategy.getSpecifiedJoinColumns().iterator();
@@ -409,7 +409,7 @@ public class GenericJavaAssociationOverride2_0Tests extends Generic2_0ContextMod
assertEquals(ASSOCIATION_OVERRIDE_NAME, specifiedAssociationOverride.getName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
associationOverrideResource.setName("FOO");
@@ -428,7 +428,7 @@ public class GenericJavaAssociationOverride2_0Tests extends Generic2_0ContextMod
specifiedAssociationOverride.setName("FOO");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
AssociationOverrideAnnotation associationOverrideResource = (AssociationOverrideAnnotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
assertEquals("FOO", associationOverrideResource.getName());
@@ -476,7 +476,7 @@ public class GenericJavaAssociationOverride2_0Tests extends Generic2_0ContextMod
javaAssociationOverride = ((VirtualAssociationOverride) javaAssociationOverride).convertToSpecified();
JoinTableRelationshipStrategy joiningStrategy = ((OverrideRelationship2_0) javaAssociationOverride.getRelationship()).getJoinTableStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AssociationOverride2_0Annotation associationOverrideResource = (AssociationOverride2_0Annotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -497,7 +497,7 @@ public class GenericJavaAssociationOverride2_0Tests extends Generic2_0ContextMod
javaAssociationOverride = ((VirtualAssociationOverride) javaAssociationOverride).convertToSpecified();
JoinTableRelationshipStrategy joiningStrategy = ((OverrideRelationship2_0) javaAssociationOverride.getRelationship()).getJoinTableStrategy();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(PACKAGE_NAME + ".AnnotationTestTypeChild", AstNodeType.TYPE);
AssociationOverride2_0Annotation associationOverrideResource = (AssociationOverride2_0Annotation) resourceType.getAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
associationOverrideResource.getJoinTable().setName("MY_JOIN_TABLE");
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaBasicMapping2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaBasicMapping2_0Tests.java
index b6ac181..68cc459 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaBasicMapping2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaBasicMapping2_0Tests.java
@@ -13,7 +13,7 @@ import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.BasicMapping;
@@ -85,7 +85,7 @@ public class GenericJavaBasicMapping2_0Tests extends Generic2_0ContextModelTestC
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -118,7 +118,7 @@ public class GenericJavaBasicMapping2_0Tests extends Generic2_0ContextModelTestC
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -150,7 +150,7 @@ public class GenericJavaBasicMapping2_0Tests extends Generic2_0ContextModelTestC
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -180,7 +180,7 @@ public class GenericJavaBasicMapping2_0Tests extends Generic2_0ContextModelTestC
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -208,7 +208,7 @@ public class GenericJavaBasicMapping2_0Tests extends Generic2_0ContextModelTestC
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -236,7 +236,7 @@ public class GenericJavaBasicMapping2_0Tests extends Generic2_0ContextModelTestC
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -264,7 +264,7 @@ public class GenericJavaBasicMapping2_0Tests extends Generic2_0ContextModelTestC
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -296,7 +296,7 @@ public class GenericJavaBasicMapping2_0Tests extends Generic2_0ContextModelTestC
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -326,7 +326,7 @@ public class GenericJavaBasicMapping2_0Tests extends Generic2_0ContextModelTestC
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -358,7 +358,7 @@ public class GenericJavaBasicMapping2_0Tests extends Generic2_0ContextModelTestC
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
@@ -389,7 +389,7 @@ public class GenericJavaBasicMapping2_0Tests extends Generic2_0ContextModelTestC
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
BasicMapping basicMapping = (BasicMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(basicMapping.isDefault());
basicMapping.getColumn().setSpecifiedName("FOO");
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaCascade2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaCascade2_0Tests.java
index 32ae31d..9fd6b07 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaCascade2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaCascade2_0Tests.java
@@ -13,7 +13,7 @@ import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
import org.eclipse.jpt.jpa.core.jpa2.context.Cascade2_0;
@@ -55,7 +55,7 @@ public class GenericJavaCascade2_0Tests
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOne2_0Annotation annotation = (OneToOne2_0Annotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
@@ -83,7 +83,7 @@ public class GenericJavaCascade2_0Tests
createTestEntityWithOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
OneToOne2_0Annotation annotation = (OneToOne2_0Annotation) resourceField.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaCollectionTable2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaCollectionTable2_0Tests.java
index a725010..8c06d84 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaCollectionTable2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaCollectionTable2_0Tests.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.
@@ -14,7 +14,7 @@ import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.context.JoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
@@ -78,7 +78,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
CollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation resourceCollectionTable = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -119,7 +119,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
CollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation resourceCollectionTable3 = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -149,7 +149,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
assertEquals(TYPE_NAME + "_projects", collectionTable.getDefaultName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME));
@@ -170,7 +170,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
CollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation resourceCollectionTable = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -211,7 +211,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
CollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation resourceCollectionTable = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -238,7 +238,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
CollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation resourceCollectionTable = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -279,7 +279,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
CollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation resourceCollectionTable = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -306,7 +306,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaCollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
@@ -348,7 +348,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
CollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
collectionTable.addSpecifiedJoinColumn(0).setSpecifiedName("FOO");
@@ -378,7 +378,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaCollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
collectionTable.addSpecifiedJoinColumn(0).setSpecifiedName("FOO");
@@ -418,7 +418,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaCollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableResource = (CollectionTable2_0Annotation) resourceField.addAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -502,7 +502,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
ListIterator<JavaUniqueConstraint> uniqueConstraints = collectionTable.getUniqueConstraints().iterator();
assertFalse(uniqueConstraints.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableAnnotation = (CollectionTable2_0Annotation) resourceField.addAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
joinTableAnnotation.addUniqueConstraint(0).addColumnName(0, "foo");
@@ -525,7 +525,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
assertEquals(0, collectionTable.getUniqueConstraintsSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableAnnotation = (CollectionTable2_0Annotation) resourceField.addAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
joinTableAnnotation.addUniqueConstraint(0).addColumnName(0, "foo");
@@ -545,7 +545,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
collectionTable.addUniqueConstraint(0).addColumnName(0, "BAR");
collectionTable.addUniqueConstraint(0).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableAnnotation = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
ListIterator<UniqueConstraintAnnotation> uniqueConstraints = joinTableAnnotation.getUniqueConstraints().iterator();
@@ -566,7 +566,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
collectionTable.addUniqueConstraint(1).addColumnName(0, "BAR");
collectionTable.addUniqueConstraint(0).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableAnnotation = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
ListIterator<UniqueConstraintAnnotation> uniqueConstraints = joinTableAnnotation.getUniqueConstraints().iterator();
@@ -587,7 +587,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
collectionTable.addUniqueConstraint(1).addColumnName(0, "BAR");
collectionTable.addUniqueConstraint(2).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableAnnotation = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -633,7 +633,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
collectionTable.addUniqueConstraint(1).addColumnName(0, "BAR");
collectionTable.addUniqueConstraint(2).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableAnnotation = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -670,7 +670,7 @@ public class GenericJavaCollectionTable2_0Tests extends Generic2_0ContextModelTe
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaCollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableAnnotation = (CollectionTable2_0Annotation) resourceField.addAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaElementCollectionMapping2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaElementCollectionMapping2_0Tests.java
index f16e5ee..77e093a 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaElementCollectionMapping2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaElementCollectionMapping2_0Tests.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.jpa2.context.java;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
@@ -409,7 +409,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -433,7 +433,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -455,7 +455,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -479,7 +479,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -503,7 +503,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -527,7 +527,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -551,7 +551,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -575,7 +575,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -599,7 +599,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -623,7 +623,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -649,7 +649,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ElementCollection2_0Annotation elementCollectionAnnotation = (ElementCollection2_0Annotation) resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME);
@@ -676,7 +676,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ElementCollection2_0Annotation elementCollection = (ElementCollection2_0Annotation) resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME);
@@ -842,7 +842,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ElementCollection2_0Annotation elementCollection = (ElementCollection2_0Annotation) resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME);
@@ -874,7 +874,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ElementCollection2_0Annotation elementCollection = (ElementCollection2_0Annotation) resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME);
@@ -939,7 +939,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(elementCollectionMapping.getSpecifiedMapKey());
@@ -978,7 +978,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(elementCollectionMapping.getSpecifiedMapKey());
@@ -1055,7 +1055,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(elementCollectionMapping.getSpecifiedMapKeyClass());
@@ -1096,7 +1096,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(elementCollectionMapping.getSpecifiedMapKeyClass());
@@ -1191,7 +1191,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
assertEquals("id", elementCollectionMapping.getValueColumn().getName());
assertEquals(TYPE_NAME + "_id", elementCollectionMapping.getValueColumn().getTableName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation column = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
column.setName("foo");
@@ -1218,7 +1218,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
assertFalse(specifiedAttributeOverrides.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -1288,7 +1288,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) getJavaPersistentType().getAttributeNamed("addresses").getMapping();
AttributeOverrideContainer attributeOverrideContainer = elementCollectionMapping.getValueAttributeOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals("addresses", resourceField.getName());
assertEquals(0, resourceField.getAnnotationsSize(AttributeOverrideAnnotation.ANNOTATION_NAME));
@@ -1383,7 +1383,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
AttributeOverrideContainer attributeOverrideContainer = elementCollectionMapping.getValueAttributeOverrideContainer();
assertEquals(0, attributeOverrideContainer.getSpecifiedOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -1409,7 +1409,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
AttributeOverrideContainer attributeOverrideContainer = elementCollectionMapping.getValueAttributeOverrideContainer();
assertEquals(4, attributeOverrideContainer.getOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -1440,7 +1440,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
AttributeOverrideContainer attributeOverrideContainer = elementCollectionMapping.getValueAttributeOverrideContainer();
assertEquals(4, attributeOverrideContainer.getVirtualOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -1475,7 +1475,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> attributeOverrides = resourceField.getAnnotations(JPA.ATTRIBUTE_OVERRIDE).iterator();
@@ -1519,7 +1519,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
virtualAttributeOverrides.next().convertToSpecified();
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> attributeOverrides = resourceField.getAnnotations(JPA.ATTRIBUTE_OVERRIDE).iterator();
@@ -1542,7 +1542,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.moveAnnotation(1, 0, AttributeOverrideAnnotation.ANNOTATION_NAME);
@@ -1633,7 +1633,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
elementCollectionMapping.getCollectionTable().setSpecifiedName("MY_COLLECTION_TABLE");
assertEquals("MY_COLLECTION_TABLE", elementCollectionMapping.getMapKeyColumn().getTableName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyColumn2_0Annotation column = (MapKeyColumn2_0Annotation) resourceField.addAnnotation(JPA2_0.MAP_KEY_COLUMN);
column.setName("foo");
@@ -1661,7 +1661,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
assertFalse(specifiedAttributeOverrides.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -1767,7 +1767,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
AttributeOverrideContainer attributeOverrideContainer = elementCollectionMapping.getValueAttributeOverrideContainer();
AttributeOverrideContainer mapKeyAttributeOverrideContainer = elementCollectionMapping.getMapKeyAttributeOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals("parcels", resourceField.getName());
assertEquals(0, resourceField.getAnnotationsSize(AttributeOverrideAnnotation.ANNOTATION_NAME));
@@ -1941,7 +1941,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
assertEquals(0, valueAttributeOverrideContainer.getSpecifiedOverridesSize());
assertEquals(0, mapKeyAttributeOverrideContainer.getSpecifiedOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -1974,7 +1974,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
assertEquals(4, mapKeyAttributeOverrideContainer.getOverridesSize());
assertEquals(3, valueAttributeOverrideContainer.getOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -2013,7 +2013,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
assertEquals(4, mapKeyAttributeOverrideContainer.getVirtualOverridesSize());
assertEquals(3, valueAttributeOverrideContainer.getVirtualOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -2063,7 +2063,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
valueOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
mapKeyOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> overrideAnnotations = resourceField.getAnnotations(JPA.ATTRIBUTE_OVERRIDE).iterator();
@@ -2134,7 +2134,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
assertEquals("state.name", specifiedOverrides.next().getName());
assertFalse(specifiedOverrides.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.moveAnnotation(1, 0, AttributeOverrideAnnotation.ANNOTATION_NAME);
@@ -2202,7 +2202,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
elementCollectionMapping.setMapKeyConverter(BaseEnumeratedConverter.class);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyEnumerated2_0Annotation enumerated = (MapKeyEnumerated2_0Annotation) resourceField.getAnnotation(MapKeyEnumerated2_0Annotation.ANNOTATION_NAME);
@@ -2230,7 +2230,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
assertNull(elementCollectionMapping.getMapKeyConverter().getType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyEnumerated2_0Annotation enumerated = (MapKeyEnumerated2_0Annotation) resourceField.addAnnotation(MapKeyEnumerated2_0Annotation.ANNOTATION_NAME);
enumerated.setValue(org.eclipse.jpt.jpa.core.resource.java.EnumType.STRING);
@@ -2256,7 +2256,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
elementCollectionMapping.setMapKeyConverter(BaseTemporalConverter.class);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyTemporal2_0Annotation temporal = (MapKeyTemporal2_0Annotation) resourceField.getAnnotation(MapKeyTemporal2_0Annotation.ANNOTATION_NAME);
@@ -2280,7 +2280,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
assertNull(elementCollectionMapping.getMapKeyConverter().getType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyTemporal2_0Annotation temporal = (MapKeyTemporal2_0Annotation) resourceField.addAnnotation(MapKeyTemporal2_0Annotation.ANNOTATION_NAME);
temporal.setValue(org.eclipse.jpt.jpa.core.resource.java.TemporalType.TIME);
@@ -2307,7 +2307,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
assertFalse(specifiedMapKeyJoinColumns.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -2414,7 +2414,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
elementCollectionMapping.addSpecifiedMapKeyJoinColumn(0).setSpecifiedName("BAR");
elementCollectionMapping.addSpecifiedMapKeyJoinColumn(0).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> joinColumnsIterator =
resourceField.getAnnotations(JPA2_0.MAP_KEY_JOIN_COLUMN).iterator();
@@ -2436,7 +2436,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
elementCollectionMapping.addSpecifiedMapKeyJoinColumn(1).setSpecifiedName("BAR");
elementCollectionMapping.addSpecifiedMapKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> joinColumnsIterator =
resourceField.getAnnotations(JPA2_0.MAP_KEY_JOIN_COLUMN).iterator();
@@ -2458,7 +2458,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
elementCollectionMapping.addSpecifiedMapKeyJoinColumn(1).setSpecifiedName("BAR");
elementCollectionMapping.addSpecifiedMapKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals(3, resourceField.getAnnotationsSize(JPA2_0.MAP_KEY_JOIN_COLUMN));
@@ -2505,7 +2505,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
elementCollectionMapping.addSpecifiedMapKeyJoinColumn(1).setSpecifiedName("BAR");
elementCollectionMapping.addSpecifiedMapKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> javaJoinColumns = resourceField.getAnnotations(JPA2_0.MAP_KEY_JOIN_COLUMN).iterator();
@@ -2542,7 +2542,7 @@ public class GenericJavaElementCollectionMapping2_0Tests extends Generic2_0Conte
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
((MapKeyJoinColumn2_0Annotation) resourceField.addAnnotation(0, JPA2_0.MAP_KEY_JOIN_COLUMN)).setName("FOO");
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEmbeddedIdMapping2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEmbeddedIdMapping2_0Tests.java
index 15fd3b7..faf8e71 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEmbeddedIdMapping2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEmbeddedIdMapping2_0Tests.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,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.jpa2.context.java;
import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
@@ -111,7 +111,7 @@ public class GenericJavaEmbeddedIdMapping2_0Tests extends Generic2_0ContextModel
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(Access2_0Annotation.ANNOTATION_NAME);
@@ -135,7 +135,7 @@ public class GenericJavaEmbeddedIdMapping2_0Tests extends Generic2_0ContextModel
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(Access2_0Annotation.ANNOTATION_NAME);
@@ -175,7 +175,7 @@ public class GenericJavaEmbeddedIdMapping2_0Tests extends Generic2_0ContextModel
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(Access2_0Annotation.ANNOTATION_NAME);
@@ -197,7 +197,7 @@ public class GenericJavaEmbeddedIdMapping2_0Tests extends Generic2_0ContextModel
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(Access2_0Annotation.ANNOTATION_NAME);
@@ -219,7 +219,7 @@ public class GenericJavaEmbeddedIdMapping2_0Tests extends Generic2_0ContextModel
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(Access2_0Annotation.ANNOTATION_NAME);
@@ -241,7 +241,7 @@ public class GenericJavaEmbeddedIdMapping2_0Tests extends Generic2_0ContextModel
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(Access2_0Annotation.ANNOTATION_NAME);
@@ -263,7 +263,7 @@ public class GenericJavaEmbeddedIdMapping2_0Tests extends Generic2_0ContextModel
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(Access2_0Annotation.ANNOTATION_NAME);
@@ -285,7 +285,7 @@ public class GenericJavaEmbeddedIdMapping2_0Tests extends Generic2_0ContextModel
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(Access2_0Annotation.ANNOTATION_NAME);
@@ -307,7 +307,7 @@ public class GenericJavaEmbeddedIdMapping2_0Tests extends Generic2_0ContextModel
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(Access2_0Annotation.ANNOTATION_NAME);
@@ -329,7 +329,7 @@ public class GenericJavaEmbeddedIdMapping2_0Tests extends Generic2_0ContextModel
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(Access2_0Annotation.ANNOTATION_NAME);
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
@@ -351,7 +351,7 @@ public class GenericJavaEmbeddedIdMapping2_0Tests extends Generic2_0ContextModel
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
EmbeddedIdMapping embeddedIdMapping = (EmbeddedIdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(Access2_0Annotation.ANNOTATION_NAME);
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEmbeddedMapping2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEmbeddedMapping2_0Tests.java
index 479acf7..8b01c6a 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEmbeddedMapping2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEmbeddedMapping2_0Tests.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.
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.jpa2.context.java;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
@@ -271,7 +271,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributeNamed("myEmbedded");
JavaEmbeddedMapping embeddedMapping = (JavaEmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -297,7 +297,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributeNamed("myEmbedded");
JavaEmbeddedMapping embeddedMapping = (JavaEmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -410,7 +410,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributeNamed("myEmbedded");
JavaEmbeddedMapping embeddedMapping = (JavaEmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -434,7 +434,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributeNamed("myEmbedded");
JavaEmbeddedMapping embeddedMapping = (JavaEmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(Access2_0Annotation.ANNOTATION_NAME);
@@ -457,7 +457,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributeNamed("myEmbedded");
JavaEmbeddedMapping embeddedMapping = (JavaEmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -481,7 +481,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributeNamed("myEmbedded");
JavaEmbeddedMapping embeddedMapping = (JavaEmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -505,7 +505,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributeNamed("myEmbedded");
JavaEmbeddedMapping embeddedMapping = (JavaEmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -529,7 +529,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributeNamed("myEmbedded");
JavaEmbeddedMapping embeddedMapping = (JavaEmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -552,7 +552,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributeNamed("myEmbedded");
JavaEmbeddedMapping embeddedMapping = (JavaEmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -576,7 +576,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributeNamed("myEmbedded");
JavaEmbeddedMapping embeddedMapping = (JavaEmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -600,7 +600,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributeNamed("myEmbedded");
JavaEmbeddedMapping embeddedMapping = (JavaEmbeddedMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -630,7 +630,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
assertFalse(specifiedAttributeOverrides.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -697,7 +697,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
JavaEmbeddedMapping embeddedMapping = (JavaEmbeddedMapping) getJavaPersistentType().getAttributeNamed("myEmbedded").getMapping();
JavaAttributeOverrideContainer attributeOverrideContainer = embeddedMapping.getAttributeOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals("myEmbedded", resourceField.getName());
assertEquals(0, resourceField.getAnnotationsSize(AttributeOverrideAnnotation.ANNOTATION_NAME));
@@ -789,7 +789,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
JavaAttributeOverrideContainer attributeOverrideContainer = embeddedMapping.getAttributeOverrideContainer();
assertEquals(0, attributeOverrideContainer.getSpecifiedOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -812,7 +812,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
JavaAttributeOverrideContainer attributeOverrideContainer = embeddedMapping.getAttributeOverrideContainer();
assertEquals(2, attributeOverrideContainer.getOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -840,7 +840,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
JavaAttributeOverrideContainer attributeOverrideContainer = embeddedMapping.getAttributeOverrideContainer();
assertEquals(2, attributeOverrideContainer.getVirtualOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -872,7 +872,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> attributeOverrides = resourceField.getAnnotations(JPA.ATTRIBUTE_OVERRIDE).iterator();
@@ -911,7 +911,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
virtualAttributeOverrides.next().convertToSpecified();
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> attributeOverrides = resourceField.getAnnotations(JPA.ATTRIBUTE_OVERRIDE).iterator();
@@ -931,7 +931,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
attributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.moveAnnotation(1, 0, JPA.ATTRIBUTE_OVERRIDE);
@@ -957,7 +957,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
assertFalse(specifiedAssociationOverrides.hasNext());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
AssociationOverrideAnnotation associationOverride = (AssociationOverrideAnnotation) resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -1024,7 +1024,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
JavaEmbeddedMapping2_0 embeddedMapping = (JavaEmbeddedMapping2_0) getJavaPersistentType().getAttributeNamed("myEmbedded").getMapping();
JavaAssociationOverrideContainer overrideContainer = embeddedMapping.getAssociationOverrideContainer();
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
assertEquals(0, resourceField.getAnnotationsSize(AssociationOverrideAnnotation.ANNOTATION_NAME));
assertEquals(2, overrideContainer.getVirtualOverridesSize());
@@ -1094,7 +1094,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
addXmlClassRef(PACKAGE_NAME + ".Address");
JavaEmbeddedMapping2_0 embeddedMapping = (JavaEmbeddedMapping2_0) getJavaPersistentType().getAttributeNamed("myEmbedded").getMapping();
JavaAssociationOverrideContainer overrideContainer = embeddedMapping.getAssociationOverrideContainer();
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
assertEquals(0, overrideContainer.getSpecifiedOverridesSize());
@@ -1146,7 +1146,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
assertEquals(2, overrideContainer.getOverridesSize());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
AssociationOverrideAnnotation annotation = (AssociationOverrideAnnotation) resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
annotation.setName("bar");
getJpaProject().synchronizeContextModel();
@@ -1166,7 +1166,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
Iterator<NestableAnnotation> associationOverrides = resourceField.getAnnotations(JPA.ASSOCIATION_OVERRIDE).iterator();
assertEquals("address", ((AssociationOverrideAnnotation) associationOverrides.next()).getName());
@@ -1189,7 +1189,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
virtualAssociationOverrides.next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
Iterator<NestableAnnotation> associationOverrides = resourceField.getAnnotations(JPA.ASSOCIATION_OVERRIDE).iterator();
assertEquals("addresses", ((AssociationOverrideAnnotation) associationOverrides.next()).getName());
@@ -1210,7 +1210,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
assertEquals(2, IteratorTools.size(resourceField.getAnnotations(JPA.ASSOCIATION_OVERRIDE).iterator()));
overrideContainer.getSpecifiedOverrides().iterator().next().convertToVirtual();
@@ -1246,7 +1246,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
Iterator<NestableAnnotation> javaAssociationOverrides = resourceField.getAnnotations(JPA.ASSOCIATION_OVERRIDE).iterator();
assertEquals(2, IteratorTools.size(javaAssociationOverrides));
@@ -1282,7 +1282,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
JavaEmbeddedMapping2_0 embeddedMapping = (JavaEmbeddedMapping2_0) getJavaPersistentType().getAttributeNamed("myEmbedded").getMapping();
JavaAssociationOverrideContainer overrideContainer = embeddedMapping.getAssociationOverrideContainer();
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
((AssociationOverrideAnnotation) resourceField.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE)).setName("FOO");
((AssociationOverrideAnnotation) resourceField.addAnnotation(1, JPA.ASSOCIATION_OVERRIDE)).setName("BAR");
@@ -1373,7 +1373,7 @@ public class GenericJavaEmbeddedMapping2_0Tests extends Generic2_0ContextModelTe
JavaEmbeddedMapping2_0 embeddedMapping = (JavaEmbeddedMapping2_0) getJavaPersistentType().getAttributeNamed("myEmbedded").getMapping();
JavaAssociationOverrideContainer overrideContainer = embeddedMapping.getAssociationOverrideContainer();
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
assertEquals(0, resourceField.getAnnotationsSize(AssociationOverrideAnnotation.ANNOTATION_NAME));
assertEquals(2, overrideContainer.getVirtualOverridesSize());
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEntity2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEntity2_0Tests.java
index 9e50cb3..8d2ed4f 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEntity2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaEntity2_0Tests.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.
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.jpa2.context.java;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
@@ -354,7 +354,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
this.addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = this.getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
NamedQuery2_0 namedQuery1 = (NamedQuery2_0) entity.getQueryContainer().addNamedQuery(0);
namedQuery1.setName("FOO");
@@ -404,7 +404,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
entity.getQueryContainer().addNamedQuery(0).setName("FOO");
NamedQuery2_0 namedQuery1 = (NamedQuery2_0) entity.getQueryContainer().addNamedQuery(1);
@@ -448,7 +448,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
entity.getQueryContainer().addNamedQuery(0).setName("FOO");
NamedQuery2_0 namedQuery1 = (NamedQuery2_0) entity.getQueryContainer().addNamedQuery(1);
@@ -497,7 +497,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertEquals(0, entity.getPersistenceUnit().getQueriesSize());
@@ -564,7 +564,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
JavaEntity entity = getJavaEntity();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertEquals(0, entity.getQueryContainer().getNamedQueriesSize());
@@ -722,7 +722,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
assertFalse(specifiedAttributeOverrides.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
//add an annotation to the resource model and verify the context model is updated
AttributeOverrideAnnotation attributeOverride = (AttributeOverrideAnnotation) resourceType.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
@@ -791,7 +791,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
JavaEntity javaEntity = (JavaEntity) classRefs.next().getJavaPersistentType().getMapping();
AttributeOverrideContainer overrideContainer = javaEntity.getAttributeOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
assertEquals(SUB_TYPE_NAME, resourceType.getName());
assertEquals(0, resourceType.getAnnotationsSize(AttributeOverrideAnnotation.ANNOTATION_NAME));
@@ -843,7 +843,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
JavaEntity javaEntity = (JavaEntity) classRefs.next().getJavaPersistentType().getMapping();
AttributeOverrideContainer overrideContainer = javaEntity.getAttributeOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
assertEquals(SUB_TYPE_NAME, resourceType.getName());
assertEquals(0, resourceType.getAnnotationsSize(AttributeOverrideAnnotation.ANNOTATION_NAME));
@@ -890,7 +890,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
AttributeOverrideContainer overrideContainer = getJavaEntity().getAttributeOverrideContainer();
assertEquals(0, overrideContainer.getSpecifiedOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
//add an annotation to the resource model and verify the context model is updated
AttributeOverrideAnnotation attributeOverride = (AttributeOverrideAnnotation) resourceType.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
@@ -939,7 +939,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
assertEquals(3, overrideContainer.getOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
AttributeOverrideAnnotation annotation = (AttributeOverrideAnnotation) resourceType.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
annotation.setName("bar");
getJpaProject().synchronizeContextModel();
@@ -957,7 +957,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> attributeOverrides = resourceType.getAnnotations(JPA.ATTRIBUTE_OVERRIDE).iterator();
assertEquals("id", ((AttributeOverrideAnnotation) attributeOverrides.next()).getName());
@@ -978,7 +978,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
virtualAttributeOverrides.next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> attributeOverrides = resourceType.getAnnotations(JPA.ATTRIBUTE_OVERRIDE).iterator();
assertEquals("name", ((AttributeOverrideAnnotation) attributeOverrides.next()).getName());
@@ -998,7 +998,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
assertEquals(3, IteratorTools.size(resourceType.getAnnotations(JPA.ATTRIBUTE_OVERRIDE).iterator()));
overrideContainer.getSpecifiedOverrides().iterator().next().convertToVirtual();
@@ -1045,7 +1045,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> javaAttributeOverrides = resourceType.getAnnotations(JPA.ATTRIBUTE_OVERRIDE).iterator();
assertEquals(3, IteratorTools.size(javaAttributeOverrides));
@@ -1080,7 +1080,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
AttributeOverrideContainer overrideContainer = getJavaEntity().getAttributeOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
((AttributeOverrideAnnotation) resourceType.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE)).setName("FOO");
((AttributeOverrideAnnotation) resourceType.addAnnotation(1, JPA.ATTRIBUTE_OVERRIDE)).setName("BAR");
@@ -1220,7 +1220,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
assertFalse(specifiedAssociationOverrides.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
//add an annotation to the resource model and verify the context model is updated
AssociationOverrideAnnotation associationOverride = (AssociationOverrideAnnotation) resourceType.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -1289,7 +1289,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
JavaEntity javaEntity = (JavaEntity) classRefs.next().getJavaPersistentType().getMapping();
AssociationOverrideContainer overrideContainer = javaEntity.getAssociationOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
assertEquals(SUB_TYPE_NAME, resourceType.getName());
assertEquals(0, resourceType.getAnnotationsSize(AssociationOverrideAnnotation.ANNOTATION_NAME));
@@ -1370,7 +1370,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
assertEquals(0, overrideContainer.getSpecifiedOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
//add an annotation to the resource model and verify the context model is updated
AssociationOverrideAnnotation associationOverride = (AssociationOverrideAnnotation) resourceType.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
@@ -1423,7 +1423,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
assertEquals(4, overrideContainer.getOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
AssociationOverrideAnnotation annotation = (AssociationOverrideAnnotation) resourceType.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE);
annotation.setName("bar");
getJpaProject().synchronizeContextModel();
@@ -1441,7 +1441,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> associationOverrides = resourceType.getAnnotations(JPA.ASSOCIATION_OVERRIDE).iterator();
assertEquals("address", ((AssociationOverrideAnnotation) associationOverrides.next()).getName());
@@ -1462,7 +1462,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
virtualAssociationOverrides.next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> associationOverrides = resourceType.getAnnotations(JPA.ASSOCIATION_OVERRIDE).iterator();
assertEquals("address2", ((AssociationOverrideAnnotation) associationOverrides.next()).getName());
@@ -1481,7 +1481,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
assertEquals(2, IteratorTools.size(resourceType.getAnnotations(JPA.ASSOCIATION_OVERRIDE).iterator()));
overrideContainer.getSpecifiedOverrides().iterator().next().convertToVirtual();
@@ -1515,7 +1515,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
overrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_SUB_TYPE_NAME, AstNodeType.TYPE);
Iterator<NestableAnnotation> javaAssociationOverrides = resourceType.getAnnotations(JPA.ASSOCIATION_OVERRIDE).iterator();
assertEquals(2, IteratorTools.size(javaAssociationOverrides));
@@ -1546,7 +1546,7 @@ public class GenericJavaEntity2_0Tests extends Generic2_0ContextModelTestCase
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
AssociationOverrideContainer overrideContainer = getJavaEntity().getAssociationOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
((AssociationOverrideAnnotation) resourceType.addAnnotation(0, JPA.ASSOCIATION_OVERRIDE)).setName("FOO");
((AssociationOverrideAnnotation) resourceType.addAnnotation(1, JPA.ASSOCIATION_OVERRIDE)).setName("BAR");
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaIdMapping2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaIdMapping2_0Tests.java
index e05b64b..1918cc6 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaIdMapping2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaIdMapping2_0Tests.java
@@ -13,7 +13,7 @@ import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.BasicMapping;
@@ -83,7 +83,7 @@ public class GenericJavaIdMapping2_0Tests extends Generic2_0ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(idMapping.isDefault());
idMapping.getColumn().setSpecifiedName("FOO");
@@ -115,7 +115,7 @@ public class GenericJavaIdMapping2_0Tests extends Generic2_0ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(idMapping.isDefault());
idMapping.getColumn().setSpecifiedName("FOO");
@@ -146,7 +146,7 @@ public class GenericJavaIdMapping2_0Tests extends Generic2_0ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(idMapping.isDefault());
idMapping.getColumn().setSpecifiedName("FOO");
@@ -178,7 +178,7 @@ public class GenericJavaIdMapping2_0Tests extends Generic2_0ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(idMapping.isDefault());
idMapping.getColumn().setSpecifiedName("FOO");
@@ -209,7 +209,7 @@ public class GenericJavaIdMapping2_0Tests extends Generic2_0ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(idMapping.isDefault());
idMapping.getColumn().setSpecifiedName("FOO");
@@ -240,7 +240,7 @@ public class GenericJavaIdMapping2_0Tests extends Generic2_0ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(idMapping.isDefault());
idMapping.getColumn().setSpecifiedName("FOO");
@@ -271,7 +271,7 @@ public class GenericJavaIdMapping2_0Tests extends Generic2_0ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(idMapping.isDefault());
idMapping.getColumn().setSpecifiedName("FOO");
@@ -302,7 +302,7 @@ public class GenericJavaIdMapping2_0Tests extends Generic2_0ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(idMapping.isDefault());
idMapping.getColumn().setSpecifiedName("FOO");
@@ -333,7 +333,7 @@ public class GenericJavaIdMapping2_0Tests extends Generic2_0ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(idMapping.isDefault());
idMapping.getColumn().setSpecifiedName("FOO");
@@ -364,7 +364,7 @@ public class GenericJavaIdMapping2_0Tests extends Generic2_0ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(idMapping.isDefault());
idMapping.getColumn().setSpecifiedName("FOO");
@@ -396,7 +396,7 @@ public class GenericJavaIdMapping2_0Tests extends Generic2_0ContextModelTestCase
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
IdMapping idMapping = (IdMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(idMapping.isDefault());
idMapping.getColumn().setSpecifiedName("FOO");
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaManyToManyMapping2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaManyToManyMapping2_0Tests.java
index b80109a..3641f3f 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaManyToManyMapping2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaManyToManyMapping2_0Tests.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.jpa2.context.java;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
@@ -377,7 +377,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
manyToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -401,7 +401,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
manyToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -423,7 +423,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
manyToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -447,7 +447,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
manyToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -471,7 +471,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
manyToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -495,7 +495,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
manyToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -519,7 +519,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
manyToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -543,7 +543,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
manyToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -567,7 +567,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
manyToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -591,7 +591,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
manyToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -615,7 +615,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
manyToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -724,7 +724,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(manyToManyMapping.getSpecifiedMapKey());
@@ -765,7 +765,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping manyToManyMapping = (ManyToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(manyToManyMapping.getSpecifiedMapKey());
@@ -844,7 +844,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping2_0 manyToManyMapping = (ManyToManyMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(manyToManyMapping.getSpecifiedMapKeyClass());
@@ -882,7 +882,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping2_0 manyToManyMapping = (ManyToManyMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(manyToManyMapping.getSpecifiedMapKeyClass());
@@ -1080,7 +1080,7 @@ public class GenericJavaManyToManyMapping2_0Tests
manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("MY_PRIMARY_TABLE");
assertEquals("MY_PRIMARY_TABLE", manyToManyMapping.getMapKeyColumn().getTableName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyColumn2_0Annotation column = (MapKeyColumn2_0Annotation) resourceField.addAnnotation(JPA2_0.MAP_KEY_COLUMN);
column.setName("foo");
@@ -1111,7 +1111,7 @@ public class GenericJavaManyToManyMapping2_0Tests
((JoinTableRelationshipStrategy) owningManyToManyMapping.getRelationship().getStrategy()).getJoinTable().setSpecifiedName("MY_JOIN_TABLE");
assertEquals("MY_JOIN_TABLE", manyToManyMapping.getMapKeyColumn().getTableName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyColumn2_0Annotation column = (MapKeyColumn2_0Annotation) resourceField.addAnnotation(JPA2_0.MAP_KEY_COLUMN);
column.setName("foo");
@@ -1138,7 +1138,7 @@ public class GenericJavaManyToManyMapping2_0Tests
manyToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("MY_JOIN_TABLE");
assertEquals("MY_JOIN_TABLE", manyToManyMapping.getMapKeyColumn().getTableName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyColumn2_0Annotation column = (MapKeyColumn2_0Annotation) resourceField.addAnnotation(JPA2_0.MAP_KEY_COLUMN);
column.setName("foo");
@@ -1167,7 +1167,7 @@ public class GenericJavaManyToManyMapping2_0Tests
ListIterator<JavaAttributeOverride> specifiedMapKeyAttributeOverrides = mapKeyAttributeOverrideContainer.getSpecifiedOverrides().iterator();
assertFalse(specifiedMapKeyAttributeOverrides.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -1258,7 +1258,7 @@ public class GenericJavaManyToManyMapping2_0Tests
JavaCollectionMapping2_0 manyToManyMapping = (JavaCollectionMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping();
JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = manyToManyMapping.getMapKeyAttributeOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals("parcels", resourceField.getName());
assertEquals(0, resourceField.getAnnotationsSize(AttributeOverrideAnnotation.ANNOTATION_NAME));
@@ -1355,7 +1355,7 @@ public class GenericJavaManyToManyMapping2_0Tests
JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = manyToManyMapping.getMapKeyAttributeOverrideContainer();
assertEquals(0, mapKeyAttributeOverrideContainer.getSpecifiedOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -1385,7 +1385,7 @@ public class GenericJavaManyToManyMapping2_0Tests
JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = manyToManyMapping.getMapKeyAttributeOverrideContainer();
assertEquals(4, mapKeyAttributeOverrideContainer.getOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -1425,7 +1425,7 @@ public class GenericJavaManyToManyMapping2_0Tests
JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer = manyToManyMapping.getMapKeyAttributeOverrideContainer();
assertEquals(4, mapKeyAttributeOverrideContainer.getVirtualOverridesSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -1467,7 +1467,7 @@ public class GenericJavaManyToManyMapping2_0Tests
mapKeyAttributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
mapKeyAttributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> attributeOverrides = resourceField.getAnnotations(JPA.ATTRIBUTE_OVERRIDE).iterator();
@@ -1514,7 +1514,7 @@ public class GenericJavaManyToManyMapping2_0Tests
assertEquals("state.foo", specifiedOverrides.next().getName());
assertFalse(specifiedOverrides.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
resourceField.moveAnnotation(1, 0, AttributeOverrideAnnotation.ANNOTATION_NAME);
@@ -1542,7 +1542,7 @@ public class GenericJavaManyToManyMapping2_0Tests
manyToManyMapping.setMapKeyConverter(BaseEnumeratedConverter.class);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyEnumerated2_0Annotation enumerated = (MapKeyEnumerated2_0Annotation) resourceField.getAnnotation(MapKeyEnumerated2_0Annotation.ANNOTATION_NAME);
@@ -1570,7 +1570,7 @@ public class GenericJavaManyToManyMapping2_0Tests
assertNull(manyToManyMapping.getMapKeyConverter().getType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyEnumerated2_0Annotation enumerated = (MapKeyEnumerated2_0Annotation) resourceField.addAnnotation(MapKeyEnumerated2_0Annotation.ANNOTATION_NAME);
enumerated.setValue(org.eclipse.jpt.jpa.core.resource.java.EnumType.STRING);
@@ -1596,7 +1596,7 @@ public class GenericJavaManyToManyMapping2_0Tests
manyToManyMapping.setMapKeyConverter(BaseTemporalConverter.class);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyTemporal2_0Annotation temporal = (MapKeyTemporal2_0Annotation) resourceField.getAnnotation(MapKeyTemporal2_0Annotation.ANNOTATION_NAME);
@@ -1620,7 +1620,7 @@ public class GenericJavaManyToManyMapping2_0Tests
assertNull(manyToManyMapping.getMapKeyConverter().getType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyTemporal2_0Annotation temporal = (MapKeyTemporal2_0Annotation) resourceField.addAnnotation(MapKeyTemporal2_0Annotation.ANNOTATION_NAME);
temporal.setValue(org.eclipse.jpt.jpa.core.resource.java.TemporalType.TIME);
@@ -1647,7 +1647,7 @@ public class GenericJavaManyToManyMapping2_0Tests
assertFalse(specifiedMapKeyJoinColumns.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -1754,7 +1754,7 @@ public class GenericJavaManyToManyMapping2_0Tests
manyToManyMapping.addSpecifiedMapKeyJoinColumn(0).setSpecifiedName("BAR");
manyToManyMapping.addSpecifiedMapKeyJoinColumn(0).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> joinColumnsIterator =
resourceField.getAnnotations(JPA2_0.MAP_KEY_JOIN_COLUMN).iterator();
@@ -1776,7 +1776,7 @@ public class GenericJavaManyToManyMapping2_0Tests
manyToManyMapping.addSpecifiedMapKeyJoinColumn(1).setSpecifiedName("BAR");
manyToManyMapping.addSpecifiedMapKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> joinColumnsIterator =
resourceField.getAnnotations(JPA2_0.MAP_KEY_JOIN_COLUMN).iterator();
@@ -1798,7 +1798,7 @@ public class GenericJavaManyToManyMapping2_0Tests
manyToManyMapping.addSpecifiedMapKeyJoinColumn(1).setSpecifiedName("BAR");
manyToManyMapping.addSpecifiedMapKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals(3, resourceField.getAnnotationsSize(JPA2_0.MAP_KEY_JOIN_COLUMN));
@@ -1845,7 +1845,7 @@ public class GenericJavaManyToManyMapping2_0Tests
manyToManyMapping.addSpecifiedMapKeyJoinColumn(1).setSpecifiedName("BAR");
manyToManyMapping.addSpecifiedMapKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> javaJoinColumns = resourceField.getAnnotations(JPA2_0.MAP_KEY_JOIN_COLUMN).iterator();
@@ -1882,7 +1882,7 @@ public class GenericJavaManyToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToManyMapping2_0 manyToManyMapping = (ManyToManyMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
((MapKeyJoinColumn2_0Annotation) resourceField.addAnnotation(0, JPA2_0.MAP_KEY_JOIN_COLUMN)).setName("FOO");
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaManyToOneMapping2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaManyToOneMapping2_0Tests.java
index 8c19a65..366301e 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaManyToOneMapping2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaManyToOneMapping2_0Tests.java
@@ -13,7 +13,7 @@ import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.BasicMapping;
@@ -138,7 +138,7 @@ public class GenericJavaManyToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = manyToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -161,7 +161,7 @@ public class GenericJavaManyToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = manyToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -182,7 +182,7 @@ public class GenericJavaManyToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = manyToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -205,7 +205,7 @@ public class GenericJavaManyToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = manyToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -228,7 +228,7 @@ public class GenericJavaManyToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = manyToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -251,7 +251,7 @@ public class GenericJavaManyToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = manyToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -274,7 +274,7 @@ public class GenericJavaManyToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = manyToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -297,7 +297,7 @@ public class GenericJavaManyToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = manyToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -320,7 +320,7 @@ public class GenericJavaManyToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = manyToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -343,7 +343,7 @@ public class GenericJavaManyToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = manyToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -366,7 +366,7 @@ public class GenericJavaManyToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping manyToOneMapping = (ManyToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = manyToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -386,7 +386,7 @@ public class GenericJavaManyToOneMapping2_0Tests
public void testUpdateId() throws Exception {
createTestEntityWithIdDerivedIdentity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
JavaPersistentType contextType = getJavaPersistentType();
JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("manyToOne");
ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping();
@@ -408,7 +408,7 @@ public class GenericJavaManyToOneMapping2_0Tests
public void testSetId() throws Exception {
createTestEntityWithIdDerivedIdentity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
JavaPersistentType contextType = getJavaPersistentType();
JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("manyToOne");
ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping();
@@ -428,7 +428,7 @@ public class GenericJavaManyToOneMapping2_0Tests
public void testUpdateMapsId() throws Exception {
createTestEntityWithMapsIdDerivedIdentity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
JavaPersistentType contextType = getJavaPersistentType();
JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("manyToOne");
ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping();
@@ -457,7 +457,7 @@ public class GenericJavaManyToOneMapping2_0Tests
public void testSetMapsId() throws Exception {
createTestEntityWithMapsIdDerivedIdentity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
JavaPersistentType contextType = getJavaPersistentType();
JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("manyToOne");
ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping();
@@ -484,7 +484,7 @@ public class GenericJavaManyToOneMapping2_0Tests
public void testUpdatePredominantDerivedIdentityStrategy() throws Exception {
createTestEntityWithIdDerivedIdentity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
JavaPersistentType contextType = getJavaPersistentType();
JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("manyToOne");
ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping();
@@ -524,7 +524,7 @@ public class GenericJavaManyToOneMapping2_0Tests
public void testSetPredominantDerivedIdentityStrategy() throws Exception {
createTestEntityWithIdDerivedIdentity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
JavaPersistentType contextType = getJavaPersistentType();
JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("manyToOne");
ManyToOneMapping2_0 contextMapping = (ManyToOneMapping2_0) contextAttribute.getMapping();
@@ -561,7 +561,7 @@ public class GenericJavaManyToOneMapping2_0Tests
public void testMorphMapping() throws Exception {
createTestEntityWithIdDerivedIdentity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
JavaPersistentType contextType = getJavaPersistentType();
JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("manyToOne");
@@ -608,7 +608,7 @@ public class GenericJavaManyToOneMapping2_0Tests
createTestEntityWithManyToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
PersistentAttribute contextAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping2_0 mapping = (ManyToOneMapping2_0) contextAttribute.getMapping();
ManyToOneRelationship2_0 rel = (ManyToOneRelationship2_0) mapping.getRelationship();
@@ -641,7 +641,7 @@ public class GenericJavaManyToOneMapping2_0Tests
createTestEntityWithManyToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
PersistentAttribute contextAttribute = getJavaPersistentType().getAttributes().iterator().next();
ManyToOneMapping2_0 mapping = (ManyToOneMapping2_0) contextAttribute.getMapping();
ManyToOneRelationship2_0 rel = (ManyToOneRelationship2_0) mapping.getRelationship();
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaOneToManyMapping2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaOneToManyMapping2_0Tests.java
index e045e15..2950643 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaOneToManyMapping2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaOneToManyMapping2_0Tests.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.jpa2.context.java;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
@@ -396,7 +396,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
oneToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
oneToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -420,7 +420,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
oneToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
oneToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -442,7 +442,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
oneToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
oneToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -466,7 +466,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
oneToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
oneToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -490,7 +490,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
oneToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
oneToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -514,7 +514,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
oneToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
oneToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -538,7 +538,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
oneToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
oneToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -562,7 +562,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
oneToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
oneToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -586,7 +586,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
oneToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
oneToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -610,7 +610,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping oneToManyMapping = (OneToManyMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
oneToManyMapping.getOrderable().setSpecifiedOrderBy("asdf");
oneToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("FOO");
@@ -758,7 +758,7 @@ public class GenericJavaOneToManyMapping2_0Tests
assertNull(mappingsOrphanRemoval.getSpecifiedOrphanRemoval());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
OneToMany2_0Annotation oneToMany = (OneToMany2_0Annotation) resourceField.getAnnotation(JPA.ONE_TO_MANY);
oneToMany.setOrphanRemoval(Boolean.FALSE);
getJpaProject().synchronizeContextModel();
@@ -788,7 +788,7 @@ public class GenericJavaOneToManyMapping2_0Tests
mappingsOrphanRemoval.setSpecifiedOrphanRemoval(Boolean.TRUE);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
OneToMany2_0Annotation oneToMany = (OneToMany2_0Annotation) resourceField.getAnnotation(JPA.ONE_TO_MANY);
assertEquals(Boolean.TRUE, oneToMany.getOrphanRemoval());
@@ -808,7 +808,7 @@ public class GenericJavaOneToManyMapping2_0Tests
mappingsOrphanRemoval.setSpecifiedOrphanRemoval(Boolean.TRUE);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
OneToMany2_0Annotation oneToMany = (OneToMany2_0Annotation) resourceField.getAnnotation(JPA.ONE_TO_MANY);
assertEquals(Boolean.TRUE, oneToMany.getOrphanRemoval());
@@ -832,7 +832,7 @@ public class GenericJavaOneToManyMapping2_0Tests
assertNull(mappingsOrphanRemoval.getSpecifiedOrphanRemoval());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
OneToMany2_0Annotation oneToMany = (OneToMany2_0Annotation) resourceField.getAnnotation(JPA.ONE_TO_MANY);
oneToMany.setOrphanRemoval(Boolean.FALSE);
getJpaProject().synchronizeContextModel();
@@ -858,7 +858,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping();
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
assertNull(oneToManyMapping.getSpecifiedMapKey());
assertNull(resourceField.getAnnotation(MapKeyAnnotation.ANNOTATION_NAME));
@@ -897,7 +897,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping();
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
assertNull(oneToManyMapping.getSpecifiedMapKey());
assertNull(resourceField.getAnnotation(MapKeyAnnotation.ANNOTATION_NAME));
@@ -975,7 +975,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping();
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
assertNull(oneToManyMapping.getSpecifiedMapKeyClass());
assertNull(resourceField.getAnnotation(MapKeyClass2_0Annotation.ANNOTATION_NAME));
@@ -1012,7 +1012,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping();
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
assertNull(oneToManyMapping.getSpecifiedMapKeyClass());
assertNull(resourceField.getAnnotation(MapKeyClass2_0Annotation.ANNOTATION_NAME));
@@ -1189,7 +1189,7 @@ public class GenericJavaOneToManyMapping2_0Tests
addressEntity.getTable().setSpecifiedName("MY_PRIMARY_TABLE");
assertEquals("MY_PRIMARY_TABLE", oneToManyMapping.getMapKeyColumn().getTableName());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
MapKeyColumn2_0Annotation column = (MapKeyColumn2_0Annotation) resourceField.addAnnotation(JPA2_0.MAP_KEY_COLUMN);
column.setName("foo");
getJpaProject().synchronizeContextModel();
@@ -1215,7 +1215,7 @@ public class GenericJavaOneToManyMapping2_0Tests
oneToManyMapping.getRelationship().getJoinTableStrategy().getJoinTable().setSpecifiedName("MY_PRIMARY_TABLE");
assertEquals("MY_PRIMARY_TABLE", oneToManyMapping.getMapKeyColumn().getTableName());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
MapKeyColumn2_0Annotation column = (MapKeyColumn2_0Annotation) resourceField.addAnnotation(JPA2_0.MAP_KEY_COLUMN);
column.setName("foo");
getJpaProject().synchronizeContextModel();
@@ -1269,7 +1269,7 @@ public class GenericJavaOneToManyMapping2_0Tests
addressEntity.getTable().setSpecifiedName("ADDRESS_PRIMARY_TABLE");
assertEquals("ADDRESS_PRIMARY_TABLE", oneToManyMapping.getMapKeyColumn().getTableName());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
MapKeyColumn2_0Annotation column = (MapKeyColumn2_0Annotation) resourceField.addAnnotation(JPA2_0.MAP_KEY_COLUMN);
column.setName("foo");
getJpaProject().synchronizeContextModel();
@@ -1307,7 +1307,7 @@ public class GenericJavaOneToManyMapping2_0Tests
createTestEntityWithValidOneToManyMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
OneToManyAnnotation annotation = (OneToManyAnnotation) resourceField.getAnnotation(JPA.ONE_TO_MANY);
PersistentAttribute contextAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping2_0 mapping = (OneToManyMapping2_0) contextAttribute.getMapping();
@@ -1349,7 +1349,7 @@ public class GenericJavaOneToManyMapping2_0Tests
createTestEntityWithValidOneToManyMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
OneToManyAnnotation annotation = (OneToManyAnnotation) resourceField.getAnnotation(JPA.ONE_TO_MANY);
PersistentAttribute contextAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping2_0 mapping = (OneToManyMapping2_0) contextAttribute.getMapping();
@@ -1434,7 +1434,7 @@ public class GenericJavaOneToManyMapping2_0Tests
ListIterator<? extends AttributeOverride> specifiedMapKeyAttributeOverrides = mapKeyAttributeOverrideContainer.getSpecifiedOverrides().iterator();
assertFalse(specifiedMapKeyAttributeOverrides.hasNext());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
AttributeOverrideAnnotation attributeOverride = (AttributeOverrideAnnotation) resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
@@ -1524,7 +1524,7 @@ public class GenericJavaOneToManyMapping2_0Tests
OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) getJavaPersistentType().getAttributeNamed("parcels").getMapping();
AttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer();
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
assertEquals("parcels", resourceField.getName());
assertEquals(0, resourceField.getAnnotationsSize(AttributeOverrideAnnotation.ANNOTATION_NAME));
@@ -1620,7 +1620,7 @@ public class GenericJavaOneToManyMapping2_0Tests
AttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer();
assertEquals(0, mapKeyAttributeOverrideContainer.getSpecifiedOverridesSize());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
AttributeOverrideAnnotation attributeOverride = (AttributeOverrideAnnotation) resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
@@ -1649,7 +1649,7 @@ public class GenericJavaOneToManyMapping2_0Tests
AttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer();
assertEquals(4, mapKeyAttributeOverrideContainer.getOverridesSize());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
AttributeOverrideAnnotation attributeOverride = (AttributeOverrideAnnotation) resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
@@ -1688,7 +1688,7 @@ public class GenericJavaOneToManyMapping2_0Tests
AttributeOverrideContainer mapKeyAttributeOverrideContainer = oneToManyMapping.getMapKeyAttributeOverrideContainer();
assertEquals(4, mapKeyAttributeOverrideContainer.getVirtualOverridesSize());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
AttributeOverrideAnnotation attributeOverride = (AttributeOverrideAnnotation) resourceField.addAnnotation(0, JPA.ATTRIBUTE_OVERRIDE);
@@ -1729,7 +1729,7 @@ public class GenericJavaOneToManyMapping2_0Tests
mapKeyAttributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
mapKeyAttributeOverrideContainer.getVirtualOverrides().iterator().next().convertToSpecified();
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
Iterator<NestableAnnotation> attributeOverrides = resourceField.getAnnotations(JPA.ATTRIBUTE_OVERRIDE).iterator();
assertEquals("key.city", ((AttributeOverrideAnnotation) attributeOverrides.next()).getName());
@@ -1775,7 +1775,7 @@ public class GenericJavaOneToManyMapping2_0Tests
assertEquals("state.foo", specifiedOverrides.next().getName());
assertFalse(specifiedOverrides.hasNext());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
resourceField.moveAnnotation(1, 0, AttributeOverrideAnnotation.ANNOTATION_NAME);
getJpaProject().synchronizeContextModel();
@@ -1802,7 +1802,7 @@ public class GenericJavaOneToManyMapping2_0Tests
oneToManyMapping.setMapKeyConverter(BaseEnumeratedConverter.class);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyEnumerated2_0Annotation enumerated = (MapKeyEnumerated2_0Annotation) resourceField.getAnnotation(MapKeyEnumerated2_0Annotation.ANNOTATION_NAME);
@@ -1830,7 +1830,7 @@ public class GenericJavaOneToManyMapping2_0Tests
assertNull(oneToManyMapping.getMapKeyConverter().getType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyEnumerated2_0Annotation enumerated = (MapKeyEnumerated2_0Annotation) resourceField.addAnnotation(MapKeyEnumerated2_0Annotation.ANNOTATION_NAME);
enumerated.setValue(org.eclipse.jpt.jpa.core.resource.java.EnumType.STRING);
@@ -1856,7 +1856,7 @@ public class GenericJavaOneToManyMapping2_0Tests
oneToManyMapping.setMapKeyConverter(BaseTemporalConverter.class);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyTemporal2_0Annotation temporal = (MapKeyTemporal2_0Annotation) resourceField.getAnnotation(MapKeyTemporal2_0Annotation.ANNOTATION_NAME);
@@ -1880,7 +1880,7 @@ public class GenericJavaOneToManyMapping2_0Tests
assertNull(oneToManyMapping.getMapKeyConverter().getType());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyTemporal2_0Annotation temporal = (MapKeyTemporal2_0Annotation) resourceField.addAnnotation(MapKeyTemporal2_0Annotation.ANNOTATION_NAME);
temporal.setValue(org.eclipse.jpt.jpa.core.resource.java.TemporalType.TIME);
@@ -1907,7 +1907,7 @@ public class GenericJavaOneToManyMapping2_0Tests
assertFalse(specifiedMapKeyJoinColumns.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -2014,7 +2014,7 @@ public class GenericJavaOneToManyMapping2_0Tests
oneToManyMapping.addSpecifiedMapKeyJoinColumn(0).setSpecifiedName("BAR");
oneToManyMapping.addSpecifiedMapKeyJoinColumn(0).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> joinColumnsIterator =
resourceField.getAnnotations(JPA2_0.MAP_KEY_JOIN_COLUMN).iterator();
@@ -2036,7 +2036,7 @@ public class GenericJavaOneToManyMapping2_0Tests
oneToManyMapping.addSpecifiedMapKeyJoinColumn(1).setSpecifiedName("BAR");
oneToManyMapping.addSpecifiedMapKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> joinColumnsIterator =
resourceField.getAnnotations(JPA2_0.MAP_KEY_JOIN_COLUMN).iterator();
@@ -2058,7 +2058,7 @@ public class GenericJavaOneToManyMapping2_0Tests
oneToManyMapping.addSpecifiedMapKeyJoinColumn(1).setSpecifiedName("BAR");
oneToManyMapping.addSpecifiedMapKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals(3, resourceField.getAnnotationsSize(JPA2_0.MAP_KEY_JOIN_COLUMN));
@@ -2105,7 +2105,7 @@ public class GenericJavaOneToManyMapping2_0Tests
oneToManyMapping.addSpecifiedMapKeyJoinColumn(1).setSpecifiedName("BAR");
oneToManyMapping.addSpecifiedMapKeyJoinColumn(2).setSpecifiedName("BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
Iterator<NestableAnnotation> javaJoinColumns = resourceField.getAnnotations(JPA2_0.MAP_KEY_JOIN_COLUMN).iterator();
@@ -2142,7 +2142,7 @@ public class GenericJavaOneToManyMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToManyMapping2_0 oneToManyMapping = (OneToManyMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
((MapKeyJoinColumn2_0Annotation) resourceField.addAnnotation(0, JPA2_0.MAP_KEY_JOIN_COLUMN)).setName("FOO");
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaOneToOneMapping2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaOneToOneMapping2_0Tests.java
index 3a9fa7c..1709b90 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaOneToOneMapping2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaOneToOneMapping2_0Tests.java
@@ -13,7 +13,7 @@ import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
import org.eclipse.jpt.common.utility.internal.iterable.EmptyIterable;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
@@ -294,7 +294,7 @@ public class GenericJavaOneToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -317,7 +317,7 @@ public class GenericJavaOneToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -338,7 +338,7 @@ public class GenericJavaOneToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -361,7 +361,7 @@ public class GenericJavaOneToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -384,7 +384,7 @@ public class GenericJavaOneToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -407,7 +407,7 @@ public class GenericJavaOneToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -430,7 +430,7 @@ public class GenericJavaOneToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -453,7 +453,7 @@ public class GenericJavaOneToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -476,7 +476,7 @@ public class GenericJavaOneToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -499,7 +499,7 @@ public class GenericJavaOneToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -522,7 +522,7 @@ public class GenericJavaOneToOneMapping2_0Tests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping oneToOneMapping = (OneToOneMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
JoinColumnRelationshipStrategy joinColumns = oneToOneMapping.getRelationship().getJoinColumnStrategy();
joinColumns.addSpecifiedJoinColumn(0);
@@ -542,7 +542,7 @@ public class GenericJavaOneToOneMapping2_0Tests
public void testUpdateId() throws Exception {
createTestEntityWithIdDerivedIdentity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
JavaPersistentType contextType = getJavaPersistentType();
JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne");
OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping();
@@ -564,7 +564,7 @@ public class GenericJavaOneToOneMapping2_0Tests
public void testSetId() throws Exception {
createTestEntityWithIdDerivedIdentity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
JavaPersistentType contextType = getJavaPersistentType();
JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne");
OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping();
@@ -584,7 +584,7 @@ public class GenericJavaOneToOneMapping2_0Tests
public void testUpdateMapsId() throws Exception {
createTestEntityWithMapsIdDerivedIdentity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
JavaPersistentType contextType = getJavaPersistentType();
JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne");
OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping();
@@ -613,7 +613,7 @@ public class GenericJavaOneToOneMapping2_0Tests
public void testSetMapsId() throws Exception {
createTestEntityWithMapsIdDerivedIdentity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
JavaPersistentType contextType = getJavaPersistentType();
JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne");
OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping();
@@ -640,7 +640,7 @@ public class GenericJavaOneToOneMapping2_0Tests
public void testUpdatePredominantDerivedIdentityStrategy() throws Exception {
createTestEntityWithMapsIdDerivedIdentity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
JavaPersistentType contextType = getJavaPersistentType();
JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne");
OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping();
@@ -680,7 +680,7 @@ public class GenericJavaOneToOneMapping2_0Tests
public void testSetPredominantDerivedIdentityStrategy() throws Exception {
createTestEntityWithMapsIdDerivedIdentity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
JavaPersistentType contextType = getJavaPersistentType();
JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne");
OneToOneMapping2_0 contextMapping = (OneToOneMapping2_0) contextAttribute.getMapping();
@@ -717,7 +717,7 @@ public class GenericJavaOneToOneMapping2_0Tests
public void testMorphMapping() throws Exception {
createTestEntityWithMapsIdDerivedIdentity();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
JavaPersistentType contextType = getJavaPersistentType();
JavaPersistentAttribute contextAttribute = contextType.getAttributeNamed("oneToOne");
@@ -877,7 +877,7 @@ public class GenericJavaOneToOneMapping2_0Tests
assertNull(mappingsOrphanRemoval.getSpecifiedOrphanRemoval());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
OneToOne2_0Annotation oneToOne = (OneToOne2_0Annotation) resourceField.getAnnotation(JPA.ONE_TO_ONE);
oneToOne.setOrphanRemoval(Boolean.FALSE);
getJpaProject().synchronizeContextModel();
@@ -907,7 +907,7 @@ public class GenericJavaOneToOneMapping2_0Tests
mappingsOrphanRemoval.setSpecifiedOrphanRemoval(Boolean.TRUE);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
OneToOne2_0Annotation oneToOne = (OneToOne2_0Annotation) resourceField.getAnnotation(JPA.ONE_TO_ONE);
assertEquals(Boolean.TRUE, oneToOne.getOrphanRemoval());
@@ -928,7 +928,7 @@ public class GenericJavaOneToOneMapping2_0Tests
mappingsOrphanRemoval.setSpecifiedOrphanRemoval(Boolean.TRUE);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
OneToOne2_0Annotation oneToOne = (OneToOne2_0Annotation) resourceField.getAnnotation(JPA.ONE_TO_ONE);
assertEquals(Boolean.TRUE, oneToOne.getOrphanRemoval());
@@ -951,7 +951,7 @@ public class GenericJavaOneToOneMapping2_0Tests
assertNull(mappingsOrphanRemoval.getSpecifiedOrphanRemoval());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
OneToOne2_0Annotation oneToOne = (OneToOne2_0Annotation) resourceField.getAnnotation(JPA.ONE_TO_ONE);
oneToOne.setOrphanRemoval(Boolean.FALSE);
getJpaProject().synchronizeContextModel();
@@ -974,7 +974,7 @@ public class GenericJavaOneToOneMapping2_0Tests
createTestEntityWithValidOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
OneToOneAnnotation annotation = (OneToOneAnnotation) resourceField.getAnnotation(JPA.ONE_TO_ONE);
PersistentAttribute contextAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping2_0 mapping = (OneToOneMapping2_0) contextAttribute.getMapping();
@@ -1034,7 +1034,7 @@ public class GenericJavaOneToOneMapping2_0Tests
createTestEntityWithValidOneToOneMapping();
addXmlClassRef(FULLY_QUALIFIED_TYPE_NAME);
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
OneToOneAnnotation annotation = (OneToOneAnnotation) resourceField.getAnnotation(JPA.ONE_TO_ONE);
PersistentAttribute contextAttribute = getJavaPersistentType().getAttributes().iterator().next();
OneToOneMapping2_0 mapping = (OneToOneMapping2_0) contextAttribute.getMapping();
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaPersistentType2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaPersistentType2_0Tests.java
index 90db078..cdcd23c 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaPersistentType2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaPersistentType2_0Tests.java
@@ -15,7 +15,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
import org.eclipse.jpt.common.utility.internal.iterable.EmptyIterable;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
@@ -660,7 +660,7 @@ public class GenericJavaPersistentType2_0Tests extends Generic2_0ContextModelTes
getJavaPersistentType().setMappingKey(MappingKeys.ENTITY_TYPE_MAPPING_KEY);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertNotNull(resourceType.getAnnotation(EntityAnnotation.ANNOTATION_NAME));
assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, getJavaPersistentType().getMappingKey());
@@ -674,7 +674,7 @@ public class GenericJavaPersistentType2_0Tests extends Generic2_0ContextModelTes
getJavaPersistentType().setMappingKey(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertNotNull(resourceType.getAnnotation(EmbeddableAnnotation.ANNOTATION_NAME));
assertEquals(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, getJavaPersistentType().getMappingKey());
@@ -688,7 +688,7 @@ public class GenericJavaPersistentType2_0Tests extends Generic2_0ContextModelTes
getJavaPersistentType().setMappingKey(MappingKeys.NULL_TYPE_MAPPING_KEY);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
assertNull(resourceType.getAnnotation(EntityAnnotation.ANNOTATION_NAME));
assertEquals(MappingKeys.NULL_TYPE_MAPPING_KEY, getJavaPersistentType().getMappingKey());
@@ -700,7 +700,7 @@ public class GenericJavaPersistentType2_0Tests extends Generic2_0ContextModelTes
assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, getJavaPersistentType().getMappingKey());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
resourceType.setPrimaryAnnotation(EmbeddableAnnotation.ANNOTATION_NAME, EmptyIterable.<String>instance());
this.getJpaProject().synchronizeContextModel();
assertEquals(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, getJavaPersistentType().getMappingKey());
@@ -712,7 +712,7 @@ public class GenericJavaPersistentType2_0Tests extends Generic2_0ContextModelTes
assertEquals(MappingKeys.NULL_TYPE_MAPPING_KEY, getJavaPersistentType().getMappingKey());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
resourceType.setPrimaryAnnotation(EntityAnnotation.ANNOTATION_NAME, EmptyIterable.<String>instance());
this.getJpaProject().synchronizeContextModel();
assertEquals(MappingKeys.ENTITY_TYPE_MAPPING_KEY, getJavaPersistentType().getMappingKey());
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaSequenceGenerator2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaSequenceGenerator2_0Tests.java
index 1441b90..333b4a7 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaSequenceGenerator2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaSequenceGenerator2_0Tests.java
@@ -13,7 +13,7 @@ import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.IdMapping;
@@ -49,7 +49,7 @@ public class GenericJavaSequenceGenerator2_0Tests extends Generic2_0ContextModel
SequenceGenerator2_0 sequenceGenerator = (SequenceGenerator2_0) idMapping.getGeneratorContainer().getSequenceGenerator();
assertNull(sequenceGenerator.getCatalog());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
SequenceGenerator2_0Annotation annotation = (SequenceGenerator2_0Annotation) resourceField.getAnnotation(JPA.SEQUENCE_GENERATOR);
annotation.setCatalog("testCatalog");
@@ -83,7 +83,7 @@ public class GenericJavaSequenceGenerator2_0Tests extends Generic2_0ContextModel
sequenceGenerator.setSpecifiedCatalog("testCatalog");
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
SequenceGenerator2_0Annotation annotation = (SequenceGenerator2_0Annotation) resourceField.getAnnotation(JPA.SEQUENCE_GENERATOR);
assertEquals("testCatalog", annotation.getCatalog());
@@ -101,7 +101,7 @@ public class GenericJavaSequenceGenerator2_0Tests extends Generic2_0ContextModel
SequenceGenerator2_0 sequenceGenerator = (SequenceGenerator2_0) idMapping.getGeneratorContainer().getSequenceGenerator();
assertNull(sequenceGenerator.getSchema());
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
SequenceGenerator2_0Annotation annotation = (SequenceGenerator2_0Annotation) resourceField.getAnnotation(JPA.SEQUENCE_GENERATOR);
annotation.setSchema("testSchema");
@@ -166,7 +166,7 @@ public class GenericJavaSequenceGenerator2_0Tests extends Generic2_0ContextModel
sequenceGenerator.setSpecifiedSchema("testSchema");
- JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE)).getFields().iterator().next();
+ JavaResourceField resourceField = ((JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE)).getFields().iterator().next();
SequenceGenerator2_0Annotation annotation = (SequenceGenerator2_0Annotation) resourceField.getAnnotation(JPA.SEQUENCE_GENERATOR);
assertEquals("testSchema", annotation.getSchema());
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaVersionMapping2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaVersionMapping2_0Tests.java
index 7ac14b6..c45cad0 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaVersionMapping2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/java/GenericJavaVersionMapping2_0Tests.java
@@ -13,7 +13,7 @@ import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.BasicMapping;
@@ -79,7 +79,7 @@ public class GenericJavaVersionMapping2_0Tests extends Generic2_0ContextModelTes
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
VersionMapping versionMapping = (VersionMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(versionMapping.isDefault());
versionMapping.getColumn().setSpecifiedName("FOO");
@@ -108,7 +108,7 @@ public class GenericJavaVersionMapping2_0Tests extends Generic2_0ContextModelTes
assertFalse(versionMapping.isDefault());
versionMapping.getColumn().setSpecifiedName("FOO");
versionMapping.setConverter(BaseTemporalConverter.class);
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
((BaseTemporalConverter) versionMapping.getConverter()).setTemporalType(TemporalType.TIME);
resourceField.addAnnotation(Access2_0Annotation.ANNOTATION_NAME);
@@ -130,7 +130,7 @@ public class GenericJavaVersionMapping2_0Tests extends Generic2_0ContextModelTes
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
VersionMapping versionMapping = (VersionMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(versionMapping.isDefault());
versionMapping.getColumn().setSpecifiedName("FOO");
@@ -156,7 +156,7 @@ public class GenericJavaVersionMapping2_0Tests extends Generic2_0ContextModelTes
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
VersionMapping versionMapping = (VersionMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(versionMapping.isDefault());
versionMapping.getColumn().setSpecifiedName("FOO");
@@ -181,7 +181,7 @@ public class GenericJavaVersionMapping2_0Tests extends Generic2_0ContextModelTes
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
VersionMapping versionMapping = (VersionMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(versionMapping.isDefault());
versionMapping.getColumn().setSpecifiedName("FOO");
@@ -206,7 +206,7 @@ public class GenericJavaVersionMapping2_0Tests extends Generic2_0ContextModelTes
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
VersionMapping versionMapping = (VersionMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(versionMapping.isDefault());
versionMapping.getColumn().setSpecifiedName("FOO");
@@ -231,7 +231,7 @@ public class GenericJavaVersionMapping2_0Tests extends Generic2_0ContextModelTes
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
VersionMapping versionMapping = (VersionMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(versionMapping.isDefault());
versionMapping.getColumn().setSpecifiedName("FOO");
@@ -256,7 +256,7 @@ public class GenericJavaVersionMapping2_0Tests extends Generic2_0ContextModelTes
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
VersionMapping versionMapping = (VersionMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(versionMapping.isDefault());
versionMapping.getColumn().setSpecifiedName("FOO");
@@ -281,7 +281,7 @@ public class GenericJavaVersionMapping2_0Tests extends Generic2_0ContextModelTes
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
VersionMapping versionMapping = (VersionMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(versionMapping.isDefault());
versionMapping.getColumn().setSpecifiedName("FOO");
@@ -306,7 +306,7 @@ public class GenericJavaVersionMapping2_0Tests extends Generic2_0ContextModelTes
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
VersionMapping versionMapping = (VersionMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(versionMapping.isDefault());
versionMapping.getColumn().setSpecifiedName("FOO");
@@ -331,7 +331,7 @@ public class GenericJavaVersionMapping2_0Tests extends Generic2_0ContextModelTes
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
VersionMapping versionMapping = (VersionMapping) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertFalse(versionMapping.isDefault());
versionMapping.getColumn().setSpecifiedName("FOO");
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/orm/GenericOrmOneToManyMapping2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/orm/GenericOrmOneToManyMapping2_0Tests.java
index 5a284ca..e0358c5 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/orm/GenericOrmOneToManyMapping2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/orm/GenericOrmOneToManyMapping2_0Tests.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.jpa2.context.orm;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
@@ -1093,7 +1093,7 @@ public class GenericOrmOneToManyMapping2_0Tests
addressEntity.getTable().setSpecifiedName("ADDRESS_PRIMARY_TABLE");
assertEquals("ADDRESS_PRIMARY_TABLE", oneToManyMapping.getMapKeyColumn().getTableName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
MapKeyColumn2_0Annotation column = (MapKeyColumn2_0Annotation) resourceField.addAnnotation(JPA2_0.MAP_KEY_COLUMN);
column.setName("foo");
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/orm/GenericOrmPersistentAttribute2_0Tests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/orm/GenericOrmPersistentAttribute2_0Tests.java
index 88394b2..0d018a1 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/orm/GenericOrmPersistentAttribute2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/orm/GenericOrmPersistentAttribute2_0Tests.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jpa.core.tests.internal.jpa2.context.orm;
import java.util.Iterator;
import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.utility.internal.iterable.IterableTools;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
@@ -346,7 +346,7 @@ public class GenericOrmPersistentAttribute2_0Tests
assertTrue(ormPersistentAttribute.isVirtual());
assertNotSame(javaPersistentAttribute, ormPersistentAttribute.getJavaPersistentAttribute());
JavaResourceAttribute javaResourceAttribute = ormPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute();
- assertTrue(javaResourceAttribute.getKind() == Kind.FIELD);
+ assertTrue(javaResourceAttribute.getAstNodeType() == AstNodeType.FIELD);
assertEquals("id", javaResourceAttribute.getName());
assertEquals(javaPersistentType.getJavaResourceType().getFields().iterator().next(), javaResourceAttribute);
@@ -424,16 +424,16 @@ public class GenericOrmPersistentAttribute2_0Tests
assertFalse(ormPropertyAttribute.isVirtual());
assertEquals(AccessType.PROPERTY, ormPropertyAttribute.getAccess());
assertNotSame(javaPersistentAttribute, ormPropertyAttribute.getJavaPersistentAttribute());
- assertTrue(ormPropertyAttribute.getJavaPersistentAttribute().getResourceAttribute().getKind() == Kind.METHOD);
- assertTrue(javaPersistentAttribute.getResourceAttribute().getKind() == Kind.FIELD);
+ assertTrue(ormPropertyAttribute.getJavaPersistentAttribute().getResourceAttribute().getAstNodeType() == AstNodeType.METHOD);
+ assertTrue(javaPersistentAttribute.getResourceAttribute().getAstNodeType() == AstNodeType.FIELD);
((OrmPersistentAttribute) ormPropertyAttribute).setSpecifiedAccess(AccessType.FIELD);
ormPropertyAttribute = ormPersistentType.getAttributeNamed("id");
assertFalse(ormPropertyAttribute.isVirtual());
assertEquals(AccessType.FIELD, ormPropertyAttribute.getAccess());
assertEquals(javaPersistentAttribute, ormPropertyAttribute.getJavaPersistentAttribute());
- assertTrue(ormPropertyAttribute.getJavaPersistentAttribute().getResourceAttribute().getKind() == Kind.FIELD);
- assertTrue(javaPersistentAttribute.getResourceAttribute().getKind() == Kind.FIELD);
+ assertTrue(ormPropertyAttribute.getJavaPersistentAttribute().getResourceAttribute().getAstNodeType() == AstNodeType.FIELD);
+ assertTrue(javaPersistentAttribute.getResourceAttribute().getAstNodeType() == AstNodeType.FIELD);
}
public void testGetAccess() throws Exception {
@@ -446,18 +446,18 @@ public class GenericOrmPersistentAttribute2_0Tests
assertTrue(ormPersistentAttribute.isVirtual());
assertEquals(AccessType.FIELD, ormPersistentAttribute.getAccess());
- assertTrue(ormPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getKind() == Kind.FIELD);
+ assertTrue(ormPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getAstNodeType() == AstNodeType.FIELD);
assertEquals(AccessType.FIELD, javaPersistentAttribute.getAccess());
- assertTrue(javaPersistentAttribute.getResourceAttribute().getKind() == Kind.FIELD);
+ assertTrue(javaPersistentAttribute.getResourceAttribute().getAstNodeType() == AstNodeType.FIELD);
ormPersistentAttribute.addToXml();
ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
assertFalse(ormPersistentAttribute.isVirtual());
assertEquals(AccessType.FIELD, ormPersistentAttribute.getAccess());
- assertTrue(ormPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getKind() == Kind.FIELD);
+ assertTrue(ormPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getAstNodeType() == AstNodeType.FIELD);
assertEquals(AccessType.FIELD, javaPersistentAttribute.getAccess());
- assertTrue(javaPersistentAttribute.getResourceAttribute().getKind() == Kind.FIELD);
+ assertTrue(javaPersistentAttribute.getResourceAttribute().getAstNodeType() == AstNodeType.FIELD);
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
@@ -466,7 +466,7 @@ public class GenericOrmPersistentAttribute2_0Tests
assertEquals(javaPersistentAttribute, ormPersistentAttribute.getJavaPersistentAttribute());
assertEquals(AccessType.FIELD, ormPersistentAttribute.getJavaPersistentAttribute().getAccess());
assertEquals(AccessType.FIELD, javaPersistentAttribute.getAccess());
- assertTrue(javaPersistentAttribute.getResourceAttribute().getKind() == Kind.FIELD);
+ assertTrue(javaPersistentAttribute.getResourceAttribute().getAstNodeType() == AstNodeType.FIELD);
}
public void testGetAccessPropertyInJava() throws Exception {
@@ -479,18 +479,18 @@ public class GenericOrmPersistentAttribute2_0Tests
assertTrue(ormPersistentAttribute.isVirtual());
assertEquals(AccessType.PROPERTY, ormPersistentAttribute.getAccess());
- assertTrue(ormPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getKind() == Kind.METHOD);
+ assertTrue(ormPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getAstNodeType() == AstNodeType.METHOD);
assertEquals(AccessType.PROPERTY, javaPersistentAttribute.getAccess());
- assertTrue(javaPersistentAttribute.getResourceAttribute().getKind() == Kind.METHOD);
+ assertTrue(javaPersistentAttribute.getResourceAttribute().getAstNodeType() == AstNodeType.METHOD);
ormPersistentAttribute.addToXml();
ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
assertFalse(ormPersistentAttribute.isVirtual());
assertEquals(AccessType.PROPERTY, ormPersistentAttribute.getAccess());
- assertTrue(ormPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getKind() == Kind.METHOD);
+ assertTrue(ormPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getAstNodeType() == AstNodeType.METHOD);
assertEquals(AccessType.PROPERTY, javaPersistentAttribute.getAccess());
- assertTrue(javaPersistentAttribute.getResourceAttribute().getKind() == Kind.METHOD);
+ assertTrue(javaPersistentAttribute.getResourceAttribute().getAstNodeType() == AstNodeType.METHOD);
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
@@ -499,7 +499,7 @@ public class GenericOrmPersistentAttribute2_0Tests
assertNotSame(javaPersistentAttribute, ormPersistentAttribute.getJavaPersistentAttribute());
assertEquals(AccessType.FIELD, ormPersistentAttribute.getJavaPersistentAttribute().getAccess());
assertEquals(AccessType.PROPERTY, javaPersistentAttribute.getAccess());
- assertTrue(javaPersistentAttribute.getResourceAttribute().getKind() == Kind.METHOD);
+ assertTrue(javaPersistentAttribute.getResourceAttribute().getAstNodeType() == AstNodeType.METHOD);
}
public void testGetAccessPropertyInJava2() throws Exception {
@@ -512,9 +512,9 @@ public class GenericOrmPersistentAttribute2_0Tests
assertTrue(ormPersistentAttribute.isVirtual());
assertEquals(AccessType.PROPERTY, ormPersistentAttribute.getAccess());
- assertTrue(ormPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getKind() == Kind.METHOD);
+ assertTrue(ormPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getAstNodeType() == AstNodeType.METHOD);
assertEquals(AccessType.PROPERTY, javaPersistentAttribute.getAccess());
- assertTrue(javaPersistentAttribute.getResourceAttribute().getKind() == Kind.METHOD);
+ assertTrue(javaPersistentAttribute.getResourceAttribute().getAstNodeType() == AstNodeType.METHOD);
OrmReadOnlyPersistentAttribute nameOrmPersistentAttribute = ormPersistentType.getAttributeNamed("name");
@@ -522,27 +522,27 @@ public class GenericOrmPersistentAttribute2_0Tests
assertTrue(nameOrmPersistentAttribute.isVirtual());
assertEquals(AccessType.FIELD, nameOrmPersistentAttribute.getAccess());
- assertTrue(nameOrmPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getKind() == Kind.FIELD);
+ assertTrue(nameOrmPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getAstNodeType() == AstNodeType.FIELD);
assertEquals(AccessType.FIELD, nameJavaPersistentAttribute.getAccess());
- assertTrue(nameJavaPersistentAttribute.getResourceAttribute().getKind() == Kind.FIELD);
+ assertTrue(nameJavaPersistentAttribute.getResourceAttribute().getAstNodeType() == AstNodeType.FIELD);
ormPersistentAttribute.addToXml();
ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
assertFalse(ormPersistentAttribute.isVirtual());
assertEquals(AccessType.PROPERTY, ormPersistentAttribute.getAccess());
- assertTrue(ormPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getKind() == Kind.METHOD);
+ assertTrue(ormPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getAstNodeType() == AstNodeType.METHOD);
assertEquals(AccessType.PROPERTY, javaPersistentAttribute.getAccess());
- assertTrue(javaPersistentAttribute.getResourceAttribute().getKind() == Kind.METHOD);
+ assertTrue(javaPersistentAttribute.getResourceAttribute().getAstNodeType() == AstNodeType.METHOD);
nameOrmPersistentAttribute.addToXml();
nameOrmPersistentAttribute = ormPersistentType.getAttributeNamed("name");
assertFalse(nameOrmPersistentAttribute.isVirtual());
assertEquals(AccessType.FIELD, nameOrmPersistentAttribute.getAccess());
assertEquals(AccessType.FIELD, nameOrmPersistentAttribute.getJavaPersistentAttribute().getAccess());
- assertTrue(nameOrmPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getKind() == Kind.FIELD);
+ assertTrue(nameOrmPersistentAttribute.getJavaPersistentAttribute().getResourceAttribute().getAstNodeType() == AstNodeType.FIELD);
assertEquals(AccessType.FIELD, nameJavaPersistentAttribute.getAccess());
- assertTrue(nameJavaPersistentAttribute.getResourceAttribute().getKind() == Kind.FIELD);
+ assertTrue(nameJavaPersistentAttribute.getResourceAttribute().getAstNodeType() == AstNodeType.FIELD);
assertEquals(nameJavaPersistentAttribute, nameOrmPersistentAttribute.getJavaPersistentAttribute());
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
@@ -551,14 +551,14 @@ public class GenericOrmPersistentAttribute2_0Tests
assertNotSame(javaPersistentAttribute, ormPersistentAttribute.getJavaPersistentAttribute());
assertEquals(AccessType.FIELD, ormPersistentAttribute.getJavaPersistentAttribute().getAccess());
assertEquals(AccessType.PROPERTY, javaPersistentAttribute.getAccess());
- assertTrue(javaPersistentAttribute.getResourceAttribute().getKind() == Kind.METHOD);
+ assertTrue(javaPersistentAttribute.getResourceAttribute().getAstNodeType() == AstNodeType.METHOD);
assertFalse(nameOrmPersistentAttribute.isVirtual());
assertEquals(AccessType.FIELD, nameOrmPersistentAttribute.getAccess());
assertNotSame(javaPersistentAttribute, nameOrmPersistentAttribute.getJavaPersistentAttribute());
assertEquals(AccessType.FIELD, nameOrmPersistentAttribute.getJavaPersistentAttribute().getAccess());
assertEquals(AccessType.FIELD, nameJavaPersistentAttribute.getAccess());
- assertTrue(nameJavaPersistentAttribute.getResourceAttribute().getKind() == Kind.FIELD);
+ assertTrue(nameJavaPersistentAttribute.getResourceAttribute().getAstNodeType() == AstNodeType.FIELD);
}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaCollectionTableTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaCollectionTableTests.java
index de9f5ec..377271c 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaCollectionTableTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaCollectionTableTests.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,7 @@ import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.utility.internal.iterator.ArrayIterator;
import org.eclipse.jpt.jpa.core.context.JoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
@@ -78,7 +78,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
CollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation resourceCollectionTable = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -119,7 +119,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
CollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation resourceCollectionTable3 = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -149,7 +149,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
assertEquals(TYPE_NAME + "_projects", collectionTable.getDefaultName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME));
@@ -170,7 +170,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
CollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation resourceCollectionTable = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -211,7 +211,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
CollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation resourceCollectionTable = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -238,7 +238,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
CollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation resourceCollectionTable = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -279,7 +279,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
CollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation resourceCollectionTable = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -306,7 +306,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaCollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
@@ -348,7 +348,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
CollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
collectionTable.addSpecifiedJoinColumn(0).setSpecifiedName("FOO");
@@ -378,7 +378,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaCollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
collectionTable.addSpecifiedJoinColumn(0).setSpecifiedName("FOO");
@@ -418,7 +418,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaCollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableResource = (CollectionTable2_0Annotation) resourceField.addAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -502,7 +502,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
ListIterator<JavaUniqueConstraint> uniqueConstraints = collectionTable.getUniqueConstraints().iterator();
assertFalse(uniqueConstraints.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableAnnotation = (CollectionTable2_0Annotation) resourceField.addAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
joinTableAnnotation.addUniqueConstraint(0).addColumnName(0, "foo");
@@ -525,7 +525,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
assertEquals(0, collectionTable.getUniqueConstraintsSize());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableAnnotation = (CollectionTable2_0Annotation) resourceField.addAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
joinTableAnnotation.addUniqueConstraint(0).addColumnName(0, "foo");
@@ -546,7 +546,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
collectionTable.addUniqueConstraint(0).addColumnName(0, "BAR");
collectionTable.addUniqueConstraint(0).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableAnnotation = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
ListIterator<UniqueConstraintAnnotation> uniqueConstraints = joinTableAnnotation.getUniqueConstraints().iterator();
@@ -567,7 +567,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
collectionTable.addUniqueConstraint(1).addColumnName(0, "BAR");
collectionTable.addUniqueConstraint(0).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableAnnotation = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
ListIterator<UniqueConstraintAnnotation> uniqueConstraints = joinTableAnnotation.getUniqueConstraints().iterator();
@@ -588,7 +588,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
collectionTable.addUniqueConstraint(1).addColumnName(0, "BAR");
collectionTable.addUniqueConstraint(2).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableAnnotation = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -634,7 +634,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
collectionTable.addUniqueConstraint(1).addColumnName(0, "BAR");
collectionTable.addUniqueConstraint(2).addColumnName(0, "BAZ");
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableAnnotation = (CollectionTable2_0Annotation) resourceField.getAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
@@ -671,7 +671,7 @@ public class EclipseLink2_0JavaCollectionTableTests extends EclipseLink2_0Contex
JavaElementCollectionMapping2_0 elementCollectionMapping = (JavaElementCollectionMapping2_0) getJavaPersistentType().getAttributes().iterator().next().getMapping();
JavaCollectionTable2_0 collectionTable = elementCollectionMapping.getCollectionTable();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
CollectionTable2_0Annotation joinTableAnnotation = (CollectionTable2_0Annotation) resourceField.addAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaElementCollectionMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaElementCollectionMappingTests.java
index 3e4bbd7..a1ba80d 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaElementCollectionMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/java/EclipseLink2_0JavaElementCollectionMappingTests.java
@@ -14,7 +14,7 @@ import java.util.ListIterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
-import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
+import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.AstNodeType;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.common.core.tests.internal.projects.TestJavaProject.SourceWriter;
import org.eclipse.jpt.common.utility.internal.ObjectTools;
@@ -381,7 +381,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
assertTrue(persistentAttribute.getMapping() instanceof BasicMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(BasicAnnotation.ANNOTATION_NAME));
@@ -398,7 +398,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
persistentAttribute.setMappingKey(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY);
assertTrue(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME));
}
@@ -415,7 +415,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
assertTrue(persistentAttribute.getMapping() instanceof VersionMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(VersionAnnotation.ANNOTATION_NAME));
@@ -433,7 +433,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
assertTrue(persistentAttribute.getMapping() instanceof IdMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(IdAnnotation.ANNOTATION_NAME));
@@ -451,7 +451,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedAnnotation.ANNOTATION_NAME));
@@ -469,7 +469,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
assertTrue(persistentAttribute.getMapping() instanceof EmbeddedIdMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(EmbeddedIdAnnotation.ANNOTATION_NAME));
@@ -487,7 +487,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
assertTrue(persistentAttribute.getMapping() instanceof TransientMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(TransientAnnotation.ANNOTATION_NAME));
@@ -505,7 +505,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
assertTrue(persistentAttribute.getMapping() instanceof ManyToOneMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME));
@@ -523,7 +523,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
assertTrue(persistentAttribute.getMapping() instanceof OneToManyMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(OneToManyAnnotation.ANNOTATION_NAME));
@@ -541,7 +541,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
assertTrue(persistentAttribute.getMapping() instanceof ManyToManyMapping);
assertFalse(persistentAttribute.getMapping().isDefault());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME));
assertNotNull(resourceField.getAnnotation(ManyToManyAnnotation.ANNOTATION_NAME));
@@ -554,7 +554,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ElementCollection2_0Annotation elementCollectionAnnotation = (ElementCollection2_0Annotation) resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME);
@@ -581,7 +581,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ElementCollection2_0Annotation elementCollection = (ElementCollection2_0Annotation) resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME);
@@ -747,7 +747,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ElementCollection2_0Annotation elementCollection = (ElementCollection2_0Annotation) resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME);
@@ -782,7 +782,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ElementCollection2_0Annotation elementCollection = (ElementCollection2_0Annotation) resourceField.getAnnotation(ElementCollection2_0Annotation.ANNOTATION_NAME);
@@ -847,7 +847,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(elementCollectionMapping.getSpecifiedMapKey());
@@ -887,7 +887,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(elementCollectionMapping.getSpecifiedMapKey());
@@ -962,7 +962,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(elementCollectionMapping.getSpecifiedMapKeyClass());
@@ -1002,7 +1002,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
PersistentAttribute persistentAttribute = getJavaPersistentType().getAttributes().iterator().next();
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) persistentAttribute.getMapping();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertNull(elementCollectionMapping.getSpecifiedMapKeyClass());
@@ -1096,7 +1096,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
assertNull(elementCollectionMapping.getValueColumn().getSpecifiedName());
assertEquals("id", elementCollectionMapping.getValueColumn().getName());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
ColumnAnnotation column = (ColumnAnnotation) resourceField.addAnnotation(JPA.COLUMN);
column.setName("foo");
@@ -1123,7 +1123,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
assertFalse(specifiedAttributeOverrides.hasNext());
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
//add an annotation to the resource model and verify the context model is updated
@@ -1193,7 +1193,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
ElementCollectionMapping2_0 elementCollectionMapping = (ElementCollectionMapping2_0) getJavaPersistentType().getAttributeNamed("addresses").getMapping();
AttributeOverrideContainer attributeOverrideContainer = elementCollectionMapping.getValueAttributeOverrideContainer();
- JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, Kind.TYPE);
+ JavaResourceType resourceType = (JavaResourceType) getJpaProject().getJavaResourceType(FULLY_QUALIFIED_TYPE_NAME, AstNodeType.TYPE);
JavaResourceField resourceField = resourceType.getFields().iterator().next();
assertEquals("addresses", resourceField.getName());
assertEquals(0, resourceField.getAnnotationsSize(AttributeOverrideAnnotation.ANNOTATION_NAME));
@@ -1287,7 +1287,7 @@ public class EclipseLink2_0JavaElementCollectionMappingTests
AttributeOverrideContainer attributeOverrideContainer = elementCollectionMapping.getValueAttributeOverrideContainer();
assertEquals(0, attributeOverrideConta