Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
path: root/jpa
diff options
context:
space:
mode:
authorpfullbright2012-07-12 22:17:26 +0000
committerpfullbright2012-07-12 22:17:26 +0000
commit43f2aaa41eb71e78f407e2199270891e5a7c9c4b (patch)
tree0cae3a14f346a7c64ca66b3cf2f45b6d853f040f /jpa
parent15bdfbd06496228430219295d1c7181f67328552 (diff)
downloadwebtools.dali-43f2aaa41eb71e78f407e2199270891e5a7c9c4b.tar.gz
webtools.dali-43f2aaa41eb71e78f407e2199270891e5a7c9c4b.tar.xz
webtools.dali-43f2aaa41eb71e78f407e2199270891e5a7c9c4b.zip
Changes to resource model to incorporate new TypeBinding API
Diffstat (limited to 'jpa')
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java69
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java10
-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/AbstractOrmEntity.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmIdClassReference.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMapping.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/SpecifiedJavaEclipseLinkPersistentAttribute.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkCustomizer.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEntityImpl.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkObjectTypeConverter.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkTypeConverter.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/GenericOrmPersistentTypeTests.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/resource/java/JavaResourceAttributeTests.java6
22 files changed, 76 insertions, 116 deletions
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 5c3f5395f0..2698dc78d2 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
@@ -672,7 +672,7 @@ public abstract class AbstractJpaProject
JavaResourceCompilationUnit jrcu = this.getExternalJavaResourceCompilationUnit(jdtType.getCompilationUnit());
String jdtTypeName = jdtType.getFullyQualifiedName('.'); // JDT member type names use '$'
for (JavaResourceAbstractType jrat : jrcu.getTypes()) {
- if (jrat.getQualifiedName().equals(jdtTypeName)) {
+ if (jrat.getTypeBinding().getQualifiedName().equals(jdtTypeName)) {
return jrat;
}
}
@@ -807,7 +807,7 @@ public abstract class AbstractJpaProject
return new TransformationIterable<JavaResourceAbstractType, String>(this.getInternalAnnotatedSourceJavaResourceTypes()) {
@Override
protected String transform(JavaResourceAbstractType jraType) {
- return jraType.getQualifiedName();
+ return jraType.getTypeBinding().getQualifiedName();
}
};
}
@@ -837,7 +837,7 @@ public abstract class AbstractJpaProject
return new TransformationIterable<JavaResourceAbstractType, String>(this.getInternalMappedSourceJavaResourceTypes()) {
@Override
protected String transform(JavaResourceAbstractType jraType) {
- return jraType.getQualifiedName();
+ return jraType.getTypeBinding().getQualifiedName();
}
};
}
@@ -914,7 +914,7 @@ public abstract class AbstractJpaProject
public JavaResourceAbstractType getJavaResourceType(String typeName) {
for (JavaResourceAbstractType jraType : this.getJavaResourceTypes()) {
- if (jraType.getQualifiedName().equals(typeName)) {
+ if (jraType.getTypeBinding().getQualifiedName().equals(typeName)) {
return jraType;
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java
index 5893324538..80c2997355 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java
@@ -18,6 +18,7 @@ import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.common.core.utility.jdt.TypeBinding;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
@@ -195,9 +196,9 @@ public abstract class AbstractAccessor
* Wrap another Java resource attribute and suppress all its annotations.
*/
protected abstract class UnannotatedJavaResourceAttribute<A extends JavaResourceAttribute>
- extends UnannotatedJavaResourceMember<A>
- implements JavaResourceAttribute
- {
+ extends UnannotatedJavaResourceMember<A>
+ implements JavaResourceAttribute {
+
public UnannotatedJavaResourceAttribute(A attribute){
super(attribute);
}
@@ -215,76 +216,32 @@ public abstract class AbstractAccessor
// ********** delegated behavior **********
-
+
@Override
public JavaResourceType getParent() {
return this.member.getParent();
}
-
+
public JavaResourceType getResourceType() {
return this.member.getResourceType();
}
-
+
public String getName() {
return this.member.getName();
}
-
- public boolean typeIsSubTypeOf(String tn) {
- return this.member.typeIsSubTypeOf(tn);
- }
-
- public boolean typeIsVariablePrimitive() {
- return this.member.typeIsVariablePrimitive();
- }
-
+
public int getModifiers() {
return this.member.getModifiers();
}
-
- public String getTypeName() {
- return this.member.getTypeName();
- }
-
- public boolean typeIsInterface() {
- return this.member.typeIsInterface();
- }
-
- public boolean typeIsEnum() {
- return this.member.typeIsEnum();
- }
-
- public boolean typeIsArray() {
- return this.member.typeIsArray();
- }
- public int getTypeArrayDimensionality() {
- return this.member.getTypeArrayDimensionality();
+ public TypeBinding getTypeBinding() {
+ return this.member.getTypeBinding();
}
- public String getTypeArrayComponentTypeName() {
- return this.member.getTypeArrayComponentTypeName();
- }
-
- public ListIterable<String> getTypeSuperclassNames() {
- return this.member.getTypeSuperclassNames();
- }
-
- public Iterable<String> getTypeInterfaceNames() {
- return this.member.getTypeInterfaceNames();
+ public TypeBinding getTypeBinding(JavaResourceType contextType) {
+ return this.member.getTypeBinding(contextType);
}
-
- public ListIterable<String> getTypeTypeArgumentNames() {
- return this.member.getTypeTypeArgumentNames();
- }
-
- public int getTypeTypeArgumentNamesSize() {
- return this.member.getTypeTypeArgumentNamesSize();
- }
-
- public String getTypeTypeArgumentName(int index) {
- return this.member.getTypeTypeArgumentName(index);
- }
-
+
@Override
public void toString(StringBuilder sb) {
sb.append(this.getName());
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java
index 0f5e255a7c..31067eeefc 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java
@@ -1255,7 +1255,7 @@ public abstract class AbstractJavaEntity
* Return whether the entity's type is a member of another type.
*/
protected boolean isMember() {
- return this.getJavaResourceType().isMemberType();
+ return this.getJavaResourceType().getTypeBinding().isMemberTypeDeclaration();
}
/**
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java
index fc7cc02250..f3d459e1c9 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java
@@ -522,10 +522,10 @@ public abstract class AbstractJavaPersistentAttribute
if (MappingTools.typeIsOtherValidBasicType(typeName)) {
return true;
}
- if (this.getResourceAttribute().typeIsEnum()) {
+ if (this.getResourceAttribute().getTypeBinding().isEnum()) {
return true;
}
- if (this.getResourceAttribute().typeIsSubTypeOf(JDTTools.SERIALIZABLE_CLASS_NAME)) {
+ if (this.getResourceAttribute().getTypeBinding().isSubTypeOf(JDTTools.SERIALIZABLE_CLASS_NAME)) {
return true;
}
return false;
@@ -592,7 +592,7 @@ public abstract class AbstractJavaPersistentAttribute
}
public String getTypeName() {
- return this.getResourceAttribute().getTypeName();
+ return this.getResourceAttribute().getTypeBinding().getQualifiedName();
}
public boolean contains(int offset, CompilationUnit astRoot) {
@@ -709,7 +709,7 @@ public abstract class AbstractJavaPersistentAttribute
*/
protected JpaContainerDefinition buildJpaContainerDefinition() {
for (JpaContainerDefinition definition : this.getJpaContainerDefinitions()) {
- if (this.getResourceAttribute().typeIsSubTypeOf(definition.getTypeName())) {
+ if (this.getResourceAttribute().getTypeBinding().isSubTypeOf(definition.getTypeName())) {
return definition;
}
}
@@ -776,8 +776,8 @@ public abstract class AbstractJavaPersistentAttribute
}
public String getMultiReferenceTargetTypeName(JavaResourceAttribute resourceAttribute) {
- return (resourceAttribute.getTypeTypeArgumentNamesSize() == 1) ?
- resourceAttribute.getTypeTypeArgumentName(0) :
+ return (resourceAttribute.getTypeBinding().getTypeArgumentNamesSize() == 1) ?
+ resourceAttribute.getTypeBinding().getTypeArgumentName(0) :
null;
}
@@ -805,14 +805,14 @@ public abstract class AbstractJavaPersistentAttribute
}
public String getMultiReferenceTargetTypeName(JavaResourceAttribute resourceAttribute) {
- return (resourceAttribute.getTypeTypeArgumentNamesSize() == 2) ?
- resourceAttribute.getTypeTypeArgumentName(1) :
+ return (resourceAttribute.getTypeBinding().getTypeArgumentNamesSize() == 2) ?
+ resourceAttribute.getTypeBinding().getTypeArgumentName(1) :
null;
}
public String getMultiReferenceMapKeyTypeName(JavaResourceAttribute resourceAttribute) {
- return (resourceAttribute.getTypeTypeArgumentNamesSize() == 2) ?
- resourceAttribute.getTypeTypeArgumentName(0) :
+ return (resourceAttribute.getTypeBinding().getTypeArgumentNamesSize() == 2) ?
+ resourceAttribute.getTypeBinding().getTypeArgumentName(0) :
null;
}
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 06d0ea9fb8..119ac1d1e1 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
@@ -85,7 +85,7 @@ public abstract class AbstractJavaPersistentType
protected AbstractJavaPersistentType(PersistentType.Owner parent, JavaResourceType resourceType) {
super(parent);
this.resourceType = resourceType;
- this.name = this.resourceType.getQualifiedName();
+ this.name = this.resourceType.getTypeBinding().getQualifiedName();
this.specifiedAccess = this.buildSpecifiedAccess();
// keep this non-null
@@ -102,7 +102,7 @@ public abstract class AbstractJavaPersistentType
@Override
public void synchronizeWithResourceModel() {
super.synchronizeWithResourceModel();
- this.setName(this.resourceType.getQualifiedName());
+ this.setName(this.resourceType.getTypeBinding().getQualifiedName());
this.setSpecifiedAccess_(this.buildSpecifiedAccess());
this.syncMapping();
this.synchronizeNodesWithResourceModel(this.getAttributes());
@@ -738,7 +738,7 @@ public abstract class AbstractJavaPersistentType
return false;
}
- String returnTypeName = resourceMethod.getTypeName();
+ String returnTypeName = resourceMethod.getTypeBinding().getQualifiedName();
if (returnTypeName == null) {
return false; // DOM method bindings can have a null name
}
@@ -764,7 +764,7 @@ public abstract class AbstractJavaPersistentType
}
private static boolean methodIsBooleanGetter(JavaResourceMethod resourceMethod) {
- String returnTypeName = resourceMethod.getTypeName();
+ String returnTypeName = resourceMethod.getTypeBinding().getQualifiedName();
String name = resourceMethod.getMethodName();
boolean booleanGetter = false;
if (name.startsWith("is")) { //$NON-NLS-1$
@@ -822,7 +822,7 @@ public abstract class AbstractJavaPersistentType
*/
public static JavaResourceMethod getValidSiblingSetMethod(JavaResourceMethod getMethod, Iterable<JavaResourceMethod> resourceMethods) {
String capitalizedSetAttributeName = "set" + StringTools.capitalize(getMethod.getName());//$NON-NLS-1$
- String parameterTypeErasureName = getMethod.getTypeName();
+ String parameterTypeErasureName = getMethod.getTypeBinding().getQualifiedName();
for (JavaResourceMethod sibling : resourceMethods) {
if ((sibling.getParametersSize() == 1)
&& sibling.getMethodName().equals(capitalizedSetAttributeName)
@@ -847,7 +847,7 @@ public abstract class AbstractJavaPersistentType
if (resourceMethod.isConstructor()) {
return false;
}
- String rtName = resourceMethod.getTypeName();
+ String rtName = resourceMethod.getTypeBinding().getQualifiedName();
if (rtName == null) {
return false; // DOM method bindings can have a null name
}
@@ -1064,7 +1064,7 @@ public abstract class AbstractJavaPersistentType
}
protected String getPackageName() {
- return this.getJavaResourceType().getPackageName();
+ return this.getJavaResourceType().getTypeBinding().getPackageName();
}
public PersistentType getOverriddenPersistentType() {
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 cfaffc8afd..8e9b86c160 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -10,6 +10,8 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
@@ -103,6 +105,11 @@ public class FieldAccessor
public Kind getKind() {
return Kind.FIELD;
}
+
+ public void synchronizeWith(
+ FieldDeclaration fieldDeclaration, VariableDeclarationFragment variableDeclaration) {
+ // NOP
+ }
}
}
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 ee2df19837..06634f886b 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
@@ -263,19 +263,19 @@ public class GenericJavaIdClassReference
DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_PUBLIC,
- new String[] {jrt.getQualifiedName()},
+ new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
this.getValidationTextRange(astRoot)
)
);
}
- if (!JDTTools.typeIsSubType(this.getJpaProject().getJavaProject(), jrt.getQualifiedName(), JDTTools.SERIALIZABLE_CLASS_NAME)) {
+ if (!JDTTools.typeIsSubType(this.getJpaProject().getJavaProject(), jrt.getTypeBinding().getQualifiedName(), JDTTools.SERIALIZABLE_CLASS_NAME)) {
messages.add(
DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_IMPLEMENT_SERIALIZABLE,
- new String[] {jrt.getQualifiedName()},
+ new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
this.getValidationTextRange(astRoot)
)
@@ -287,7 +287,7 @@ public class GenericJavaIdClassReference
DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_EQUALS_METHOD,
- new String[] {jrt.getQualifiedName()},
+ new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
this.getValidationTextRange(astRoot)
)
@@ -299,7 +299,7 @@ public class GenericJavaIdClassReference
DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_HASHCODE_METHOD,
- new String[] {jrt.getQualifiedName()},
+ new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
this.getValidationTextRange(astRoot)
)
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/PropertyAccessor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/PropertyAccessor.java
index 9c6fe74fa3..42578f10dc 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
@@ -144,10 +144,6 @@ public class PropertyAccessor
public void synchronizeWith(MethodDeclaration methodDeclaration) {
// NOP
}
-
- public void initialize(MethodDeclaration methodDeclaration) {
- // NOP
- }
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java
index 5f6ef4fcbd..a94e4ce07f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java
@@ -1704,7 +1704,7 @@ public abstract class AbstractOrmEntity<X extends XmlEntity>
*/
protected boolean isMember() {
JavaResourceType jrt = this.getJavaResourceType();
- return (jrt != null) && jrt.isMemberType();
+ return (jrt != null) && jrt.getTypeBinding().isMemberTypeDeclaration();
}
/**
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 54f8074a48..38c092cc7e 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
@@ -384,19 +384,19 @@ public class GenericOrmIdClassReference
DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_PUBLIC,
- new String[] {jrt.getQualifiedName()},
+ new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
this.getValidationTextRange()
)
);
}
- if (!JDTTools.typeIsSubType(this.getJavaProject(), jrt.getQualifiedName(), JDTTools.SERIALIZABLE_CLASS_NAME)) {
+ if (!JDTTools.typeIsSubType(this.getJavaProject(), jrt.getTypeBinding().getQualifiedName(), JDTTools.SERIALIZABLE_CLASS_NAME)) {
messages.add(
DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_IMPLEMENT_SERIALIZABLE,
- new String[] {jrt.getQualifiedName()},
+ new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
this.getValidationTextRange()
)
@@ -408,7 +408,7 @@ public class GenericOrmIdClassReference
DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_EQUALS_METHOD,
- new String[] {jrt.getQualifiedName()},
+ new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
this.getValidationTextRange()
)
@@ -420,7 +420,7 @@ public class GenericOrmIdClassReference
DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_HASHCODE_METHOD,
- new String[] {jrt.getQualifiedName()},
+ new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
this.getValidationTextRange()
)
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java
index 437223f8cb..6c1e5575d5 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java
@@ -2231,7 +2231,7 @@ public abstract class AbstractPersistenceUnit
Set<String> packageNames = new HashSet<String>();
for (PersistentType pType : this.getJavaPersistentTypes()) {
JavaResourceType jrt = ((JavaPersistentType)pType).getJavaResourceType();
- packageNames.add(jrt.getPackageName());
+ packageNames.add(jrt.getTypeBinding().getPackageName());
}
return packageNames;
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
index 0bfcebae83..0d06c2fda6 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
@@ -371,7 +371,7 @@ public abstract class AbstractPrimaryKeyValidator
messages.add(DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_PROPERTY_METHOD_NOT_PUBLIC,
- new String[] {idClass.getJavaResourceType().getQualifiedName(), methodName},
+ new String[] {idClass.getJavaResourceType().getTypeBinding().getQualifiedName(), methodName},
typeMapping(),
textRangeResolver().getIdClassTextRange()
));
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java
index c38baf9152..cba68a1093 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle.
+ * Copyright (c) 2010, 2012 Oracle.
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
@@ -20,8 +20,8 @@ import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public abstract class AbstractTypeMappingValidator<T extends TypeMapping>
- implements JptValidator
-{
+ implements JptValidator {
+
protected T typeMapping;
protected JavaResourceType jrt;
@@ -48,7 +48,7 @@ public abstract class AbstractTypeMappingValidator<T extends TypeMapping>
if (this.jrt == null) {
return false;
}
- return this.jrt.isMemberType();
+ return this.jrt.getTypeBinding().isMemberTypeDeclaration();
}
protected boolean isStaticType() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java
index 03deea394b..b1bd40dc54 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java
@@ -306,7 +306,7 @@ public class GenericRootContextNode
DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JpaValidationMessages.PERSISTENT_TYPE_MAPPED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT,
- new String[] {jrt.getQualifiedName()},
+ new String[] {jrt.getTypeBinding().getQualifiedName()},
jrt.getFile(),
jrt.getNameTextRange(jrcu.buildASTRoot())
)
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMapping.java
index 0ae0971e4e..ff88a33856 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMapping.java
@@ -102,7 +102,7 @@ public abstract class JpaMapping implements IMapping {
return EmptyIterable.instance();
}
- return new TransformationIterable<String, ITypeDeclaration>(resource.getTypeTypeArgumentNames()) {
+ return new TransformationIterable<String, ITypeDeclaration>(resource.getTypeBinding().getTypeArgumentNames()) {
@Override
protected ITypeDeclaration transform(String next) {
return getTypeRepository().getType(next).getTypeDeclaration();
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/SpecifiedJavaEclipseLinkPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/SpecifiedJavaEclipseLinkPersistentAttribute.java
index 47e13023a7..7e9c72ffcd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/SpecifiedJavaEclipseLinkPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/SpecifiedJavaEclipseLinkPersistentAttribute.java
@@ -72,17 +72,17 @@ public class SpecifiedJavaEclipseLinkPersistentAttribute
* <code>java.util.Date</code> or <code>java.util.Calendar</code>.
*/
public boolean typeIsDateOrCalendar() {
- return this.getResourceAttribute().typeIsSubTypeOf(DATE_TYPE_NAME)
- || this.getResourceAttribute().typeIsSubTypeOf(CALENDAR_TYPE_NAME);
+ return this.getResourceAttribute().getTypeBinding().isSubTypeOf(DATE_TYPE_NAME)
+ || this.getResourceAttribute().getTypeBinding().isSubTypeOf(CALENDAR_TYPE_NAME);
}
public boolean typeIsSerializable() {
- return this.getResourceAttribute().typeIsVariablePrimitive()
- || this.getResourceAttribute().typeIsSubTypeOf(JDTTools.SERIALIZABLE_CLASS_NAME);
+ return this.getResourceAttribute().getTypeBinding().isVariablePrimitive()
+ || this.getResourceAttribute().getTypeBinding().isSubTypeOf(JDTTools.SERIALIZABLE_CLASS_NAME);
}
public boolean typeIsValidForVariableOneToOne() {
- return this.getResourceAttribute().typeIsInterface()
+ return this.getResourceAttribute().getTypeBinding().isInterface()
&& this.interfaceIsValidForVariableOneToOne();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkCustomizer.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkCustomizer.java
index cb71a673f4..6b0bd7b086 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkCustomizer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkCustomizer.java
@@ -203,7 +203,7 @@ public class OrmEclipseLinkCustomizer
protected boolean isFor(String typeName) {
JavaResourceAbstractType customizerType = this.getResourceCustomizerType();
- return (customizerType != null) && customizerType.getQualifiedName().equals(typeName);
+ return (customizerType != null) && customizerType.getTypeBinding().getQualifiedName().equals(typeName);
}
protected boolean isIn(IPackageFragment packageFragment) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEntityImpl.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEntityImpl.java
index b4b7872404..894ed5a3bd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEntityImpl.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEntityImpl.java
@@ -36,11 +36,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkChangeTracking;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkConverter;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkCustomizer;
import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkEntity;
+import org.eclipse.jpt.jpa.eclipselink.core.context.orm.EclipseLinkOrmPersistentType;
import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkCaching;
import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkConverterContainer;
import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkEntity;
import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkMultitenancy2_3;
-import org.eclipse.jpt.jpa.eclipselink.core.context.orm.EclipseLinkOrmPersistentType;
import org.eclipse.jpt.jpa.eclipselink.core.internal.DefaultEclipseLinkJpaValidationMessages;
import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLinkJpaValidationMessages;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.EclipseLinkDynamicTypeMappingValidator;
@@ -315,7 +315,7 @@ public class OrmEclipseLinkEntityImpl
protected boolean classExtractorIsFor(String typeName) {
JavaResourceAbstractType classExtractorType = this.getResourceClassExtractorType();
- return (classExtractorType != null) && classExtractorType.getQualifiedName().equals(typeName);
+ return (classExtractorType != null) && classExtractorType.getTypeBinding().getQualifiedName().equals(typeName);
}
protected boolean classExtractorIsIn(IPackageFragment packageFragment) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkObjectTypeConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkObjectTypeConverter.java
index 65477b4da5..ef824a5aca 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkObjectTypeConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkObjectTypeConverter.java
@@ -309,7 +309,7 @@ public class OrmEclipseLinkObjectTypeConverter
}
protected boolean typeIsFor(JavaResourceAbstractType type, String typeName) {
- return (type != null) && type.getQualifiedName().equals(typeName);
+ return (type != null) && type.getTypeBinding().getQualifiedName().equals(typeName);
}
protected boolean typeIsIn(JavaResourceAbstractType type, IPackageFragment packageFragment) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkTypeConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkTypeConverter.java
index a2e753ba40..2cdb9630c4 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkTypeConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkTypeConverter.java
@@ -239,7 +239,7 @@ public class OrmEclipseLinkTypeConverter
}
protected boolean typeIsFor(JavaResourceAbstractType type, String typeName) {
- return (type != null) && type.getQualifiedName().equals(typeName);
+ return (type != null) && type.getTypeBinding().getQualifiedName().equals(typeName);
}
protected boolean typeIsIn(JavaResourceAbstractType type, IPackageFragment packageFragment) {
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/GenericOrmPersistentTypeTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/GenericOrmPersistentTypeTests.java
index 639420c29d..ecb6e4ad8e 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/GenericOrmPersistentTypeTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/GenericOrmPersistentTypeTests.java
@@ -497,6 +497,6 @@ public class GenericOrmPersistentTypeTests extends ContextModelTestCase
assertNotNull(javaPersistentAttribute);
assertEquals("id", javaPersistentAttribute.getName());
assertEquals("test.Employee", javaPersistentAttribute.getOwningPersistentType().getName());
- assertEquals("test.Model", javaPersistentAttribute.getResourceAttribute().getParent().getQualifiedName());
+ assertEquals("test.Model", javaPersistentAttribute.getResourceAttribute().getParent().getTypeBinding().getQualifiedName());
}
} \ No newline at end of file
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/resource/java/JavaResourceAttributeTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/resource/java/JavaResourceAttributeTests.java
index 1ec05fdc56..382f7d4c24 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/resource/java/JavaResourceAttributeTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/resource/java/JavaResourceAttributeTests.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.
@@ -657,11 +657,11 @@ public class JavaResourceAttributeTests extends JpaJavaResourceModelTestCase {
JavaResourceAttribute resourceAttribute = resourceType.getFields().iterator().next();
assertEquals("foo", resourceAttribute.getName());
- assertEquals("test.Foo", resourceAttribute.getTypeName()); //bug 196200 changed this
+ assertEquals("test.Foo", resourceAttribute.getTypeBinding().getQualifiedName()); //bug 196200 changed this
this.javaProject.createCompilationUnit("test", "Foo.java", "public class Foo {}");
- assertEquals("test.Foo", resourceAttribute.getTypeName());
+ assertEquals("test.Foo", resourceAttribute.getTypeBinding().getQualifiedName());
}
//this tests that we handle mutliple variable declarations in one line.

Back to the top