Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jpa
diff options
context:
space:
mode:
authornhauge2011-04-27 22:18:17 +0000
committernhauge2011-04-27 22:18:17 +0000
commit3d008381e2492cd20148f5f6cc4268712af27782 (patch)
treead3f0949b9e27e456952cbbe68a70cce62073a46 /jpa
parentab3d65ed6cc53f9972127132070fe155c1b54022 (diff)
downloadwebtools.dali-3d008381e2492cd20148f5f6cc4268712af27782.tar.gz
webtools.dali-3d008381e2492cd20148f5f6cc4268712af27782.tar.xz
webtools.dali-3d008381e2492cd20148f5f6cc4268712af27782.zip
339243 - fix stack overflow in IdClass ref. Patch from Nan.
Diffstat (limited to 'jpa')
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/property_files/jpa_validation.properties5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java1
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java1
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java1
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java1
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmIdClassReference.java51
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidationMessages.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/property_files/jpt_ui_validation_preferences.properties3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/JptUiValidationPreferenceMessages.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/preferences/JpaProblemSeveritiesPage.java4
11 files changed, 107 insertions, 7 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/property_files/jpa_validation.properties b/jpa/plugins/org.eclipse.jpt.jpa.core/property_files/jpa_validation.properties
index c9a0598c8e..7f086f7a25 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/property_files/jpa_validation.properties
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/property_files/jpa_validation.properties
@@ -66,6 +66,9 @@ TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_NO_MATCH=There is no ID class attribute
TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH=There is no primary key attribute to match the ID class attribute {0}
TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY=The attribute matching the ID class attribute {0} is not mapped as a primary key
TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE=The attribute matching the ID class attribute {0} does not have the correct type {1}
+TYPE_MAPPING_ID_CLASS_NAME_EMPTY=ID class has an empty name
+TYPE_MAPPING_ID_CLASS_NOT_EXIST=ID class does not exist on the project classpath
+TYPE_MAPPING_ID_CLASS_NOT_VALID=ID class should not be mapped
TYPE_MAPPING_ID_CLASS_REDEFINED=An ancestor of this class has already defined the ID class. The ID class may not be defined here.
TYPE_MAPPING_ID_CLASS_REQUIRED=This class has a composite primary key. It must use an ID class.
TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID=The relationship ''{0}'' maps an ID, which is not allowed in conjunction with an ID class.
@@ -77,7 +80,7 @@ TYPE_MAPPING_PK_REDEFINED_ID_CLASS=An ancestor of this class has already defined
### Attributes ###
ELEMENT_COLLECTION_MAP_KEY_CLASS_NOT_DEFINED=Map key class is not defined
-ELEMENT_COLLECTION_TARGET_CLASS_DOES_NOT_EXIST=Target class does not exist on the project classpath"
+ELEMENT_COLLECTION_TARGET_CLASS_DOES_NOT_EXIST=Target class does not exist on the project classpath
ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE=Target class \"{0}\" is not an embeddable or basic type
ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED=Target class is not specified
EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED=Embedded IDs that are mapped by a relationship should not specify any attribute overrides.
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 65182c8d2d..3444fc6e5d 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
@@ -1329,6 +1329,7 @@ public abstract class AbstractJavaEntity
this.associationOverrideContainer.validate(messages, reporter, astRoot);
this.validateEntityName(messages, reporter, astRoot);
this.validateDuplicateEntityNames(messages, reporter, astRoot);
+ this.idClassReference.validate(messages, reporter, astRoot);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java
index b4255f5a56..d51f3017e1 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java
@@ -89,6 +89,7 @@ public abstract class AbstractJavaMappedSuperclass
public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
super.validate(messages, reporter, astRoot);
this.validatePrimaryKey(messages, reporter, astRoot);
+ this.idClassReference.validate(messages, reporter, astRoot);
}
@Override
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 b4a89125dc..7135925a3b 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
@@ -9,14 +9,20 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context.java;
+import java.util.List;
+
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.AccessType;
import org.eclipse.jpt.jpa.core.context.java.JavaIdClassReference;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping;
+import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.jpt.jpa.core.resource.java.IdClassAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
/**
* Java ID class reference
@@ -183,8 +189,11 @@ public class GenericJavaIdClassReference
}
protected JavaResourcePersistentType resolveResourceIdClass() {
- return (this.fullyQualifiedIdClassName == null) ?
- null : this.getJpaProject().getJavaResourcePersistentType(this.fullyQualifiedIdClassName);
+ if (this.fullyQualifiedIdClassName == null) {
+ return null;
+ }
+ JavaResourcePersistentType jrpt = this.getJpaProject().getJavaResourcePersistentType(this.fullyQualifiedIdClassName);
+ return (jrpt == null) ? null : (jrpt.isMapped() ? null : jrpt);
}
protected JavaPersistentType buildIdClass(JavaResourcePersistentType resourceClass) {
@@ -230,6 +239,29 @@ public class GenericJavaIdClassReference
// ********** validation **********
+ @Override
+ public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ super.validate(messages, reporter, astRoot);
+ this.validateIdClass(messages, reporter, astRoot);
+ }
+
+ protected void validateIdClass(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ if (this.isSpecified()) {
+ JavaResourcePersistentType jrpt = this.getJpaProject().getJavaResourcePersistentType(this.getFullyQualifiedIdClassName());
+ if ((jrpt != null) && (jrpt.isMapped())) {
+ messages.add(
+ DefaultJpaValidationMessages.buildMessage(
+ IMessage.HIGH_SEVERITY,
+ JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_VALID,
+ new String[] {jrpt.getName()},
+ this,
+ this.getValidationTextRange(astRoot)
+ )
+ );
+ }
+ }
+ }
+
public TextRange getValidationTextRange(CompilationUnit astRoot) {
IdClassAnnotation annotation = this.getIdClassAnnotation();
return (annotation == null) ?
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 1fbd81fd33..b24fe397e3 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
@@ -1782,6 +1782,7 @@ public abstract class AbstractOrmEntity<X extends XmlEntity>
this.queryContainer.validate(messages, reporter);
this.validateEntityName(messages, reporter);
this.validateDuplicateEntityNames(messages, reporter);
+ this.idClassReference.validate(messages, reporter);
}
protected void validateEntityName(List<IMessage> messages, IReporter reporter) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java
index 1f503a14be..a67569ccdb 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java
@@ -190,6 +190,7 @@ public abstract class AbstractOrmMappedSuperclass<X extends XmlMappedSuperclass>
public void validate(List<IMessage> messages, IReporter reporter) {
super.validate(messages, reporter);
this.validatePrimaryKey(messages, reporter);
+ this.idClassReference.validate(messages, reporter);
}
@Override
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 b3f7677a18..801b500dbe 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
@@ -10,9 +10,13 @@
package org.eclipse.jpt.jpa.core.internal.context.orm;
import java.util.List;
+
+import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jpt.common.core.internal.utility.JDTTools;
import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable;
import org.eclipse.jpt.jpa.core.context.AccessType;
@@ -23,6 +27,8 @@ import org.eclipse.jpt.jpa.core.context.orm.OrmIdClassReference;
import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
import org.eclipse.jpt.jpa.core.internal.context.AbstractXmlContextNode;
+import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.jpt.jpa.core.resource.java.JavaResourcePersistentType;
import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
import org.eclipse.jpt.jpa.core.resource.orm.XmlClassReference;
@@ -221,7 +227,11 @@ public class GenericOrmIdClassReference
// our name if it is taken from the Java ID class reference...
protected JavaResourcePersistentType resolveJavaResourceIdClass() {
String idClassName = this.getIdClassName();
- return (idClassName == null) ? null : this.getEntityMappings().resolveJavaResourcePersistentType(idClassName);
+ if (idClassName == null) {
+ return null;
+ }
+ JavaResourcePersistentType jrpt = this.getEntityMappings().resolveJavaResourcePersistentType(idClassName);
+ return (jrpt == null) ? null : (jrpt.isMapped() ? null : jrpt);
}
protected JavaPersistentType buildIdClass(JavaResourcePersistentType resourceIdClass) {
@@ -312,6 +322,45 @@ public class GenericOrmIdClassReference
public void validate(List<IMessage> messages, IReporter reporter) {
super.validate(messages, reporter);
// most validation is done "holistically" from the type mapping level
+ this.validateIdClass(messages, reporter);
+ }
+
+ protected void validateIdClass(List<IMessage> messages, IReporter reporter) {
+ IJavaProject javaProject = getJpaProject().getJavaProject();
+ if (this.isSpecified()) {
+ JavaResourcePersistentType jrpt = getJpaProject().getJavaResourcePersistentType(this.getIdClassName());
+ if ((jrpt != null) && (jrpt.isMapped())) {
+ messages.add(
+ DefaultJpaValidationMessages.buildMessage(
+ IMessage.HIGH_SEVERITY,
+ JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_VALID,
+ new String[] {jrpt.getName()},
+ this,
+ this.getValidationTextRange()
+ )
+ );
+ } else if (StringTools.stringIsEmpty(this.getIdClassName())) {
+ messages.add(
+ DefaultJpaValidationMessages.buildMessage(
+ IMessage.HIGH_SEVERITY,
+ JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NAME_EMPTY,
+ new String[] {},
+ this,
+ this.getValidationTextRange()
+ )
+ );
+ } else if (JDTTools.findType(javaProject, this.getIdClassName()) == null) {
+ messages.add(
+ DefaultJpaValidationMessages.buildMessage(
+ IMessage.HIGH_SEVERITY,
+ JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_EXIST,
+ new String[] { this.getIdClassName()},
+ this,
+ this.getValidationTextRange()
+ )
+ );
+ }
+ }
}
public TextRange getValidationTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidationMessages.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidationMessages.java
index 57b964daed..c4a24d6350 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidationMessages.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidationMessages.java
@@ -69,6 +69,9 @@ public interface JpaValidationMessages {
public static final String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH = "TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH";
public static final String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY = "TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY";
public static final String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE = "TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE";
+ public static final String TYPE_MAPPING_ID_CLASS_NAME_EMPTY = "TYPE_MAPPING_ID_CLASS_NAME_EMPTY";
+ public static final String TYPE_MAPPING_ID_CLASS_NOT_EXIST = "TYPE_MAPPING_ID_CLASS_NOT_EXIST";
+ public static final String TYPE_MAPPING_ID_CLASS_NOT_VALID = "TYPE_MAPPING_ID_CLASS_NOT_VALID";
public static final String TYPE_MAPPING_ID_CLASS_REDEFINED = "TYPE_MAPPING_ID_CLASS_REDEFINED";
public static final String TYPE_MAPPING_ID_CLASS_REQUIRED = "TYPE_MAPPING_ID_CLASS_REQUIRED";
public static final String TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID = "TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID";
@@ -220,10 +223,10 @@ public interface JpaValidationMessages {
public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID="VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID";
public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME";
public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_INVALID_NAME = "VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_INVALID_NAME";
- public static final String VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_NAME = "VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_NAME";
- public static final String VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_TYPE = "VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_TYPE";
public static final String VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME";
public static final String VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID="VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID";
+ public static final String VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_NAME = "VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_NAME";
+ public static final String VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_TYPE = "VIRTUAL_ATTRIBUTE_OVERRIDE_INVALID_TYPE";
public static final String VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID="VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID";
public static final String VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME = "VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME";
public static final String VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_INVALID_NAME = "VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_INVALID_NAME";
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/property_files/jpt_ui_validation_preferences.properties b/jpa/plugins/org.eclipse.jpt.jpa.ui/property_files/jpt_ui_validation_preferences.properties
index 0d6885a2ad..755aaeef5d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/property_files/jpt_ui_validation_preferences.properties
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/property_files/jpt_ui_validation_preferences.properties
@@ -66,6 +66,9 @@ TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_NO_MATCH=No ID class attribute matches p
TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH=No primary key attribute matches ID class attribute:
TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY=Attribute matching ID class attribute is not mapped as a primary key:
TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE=Attribute matching ID class attribute does not have the correct type:
+TYPE_MAPPING_ID_CLASS_NAME_EMPTY=ID class has an empty name:
+TYPE_MAPPING_ID_CLASS_NOT_EXIST=ID class does not exist on the project classpath:
+TYPE_MAPPING_ID_CLASS_NOT_VALID=ID class should not be mapped:
TYPE_MAPPING_ID_CLASS_REDEFINED=ID class has already been defined on an ancestor of a class:
TYPE_MAPPING_ID_CLASS_REQUIRED=ID class must be used when multiple ID mappings defined:
TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID="Maps Id" is not allowed to use in conjunction with an ID class:
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/JptUiValidationPreferenceMessages.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/JptUiValidationPreferenceMessages.java
index 7082962165..8906affedf 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/JptUiValidationPreferenceMessages.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/JptUiValidationPreferenceMessages.java
@@ -74,6 +74,9 @@ public class JptUiValidationPreferenceMessages {
public static String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH; //3.0 M7
public static String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY; //3.0 M7
public static String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE; //3.0 M7
+ public static String TYPE_MAPPING_ID_CLASS_NAME_EMPTY; //3.0 M7
+ public static String TYPE_MAPPING_ID_CLASS_NOT_EXIST; //3.0 M7
+ public static String TYPE_MAPPING_ID_CLASS_NOT_VALID; //3.0 M7
public static String TYPE_MAPPING_ID_CLASS_REDEFINED; //3.0 M7
public static String TYPE_MAPPING_ID_CLASS_REQUIRED; //3.0 M7
public static String TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID; //3.0 M7
@@ -269,6 +272,7 @@ public class JptUiValidationPreferenceMessages {
private static final String BUNDLE_NAME = "jpt_ui_validation_preferences"; //$NON-NLS-1$
private static final Class<?> BUNDLE_CLASS = JptUiValidationPreferenceMessages.class;
+
static {
NLS.initializeMessages(BUNDLE_NAME, BUNDLE_CLASS);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/preferences/JpaProblemSeveritiesPage.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/preferences/JpaProblemSeveritiesPage.java
index b64f1e2eb3..effa2100bd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/preferences/JpaProblemSeveritiesPage.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/preferences/JpaProblemSeveritiesPage.java
@@ -304,7 +304,6 @@ public class JpaProblemSeveritiesPage extends PropertyAndPreferencePage {
addLabeledCombo(parent, JptUiValidationPreferenceMessages.PERSISTENCE_UNIT_UNSPECIFIED_JAR_FILE, JpaValidationMessages.PERSISTENCE_UNIT_UNSPECIFIED_JAR_FILE);
addLabeledCombo(parent, JptUiValidationPreferenceMessages.PERSISTENCE_UNIT_UNSPECIFIED_MAPPING_FILE, JpaValidationMessages.PERSISTENCE_UNIT_UNSPECIFIED_MAPPING_FILE);
addLabeledCombo(parent, JptUiValidationPreferenceMessages.PERSISTENCE_UNIT_UNSUPPORTED_MAPPING_FILE_CONTENT, JpaValidationMessages.PERSISTENCE_UNIT_UNSUPPORTED_MAPPING_FILE_CONTENT);
-
}
private void addTypeLevelCategory(Composite parent) {
@@ -330,6 +329,9 @@ public class JpaProblemSeveritiesPage extends PropertyAndPreferencePage {
addLabeledCombo(parent, JptUiValidationPreferenceMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH, JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH); //3.0 M7
addLabeledCombo(parent, JptUiValidationPreferenceMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY, JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY); //3.0 M7
addLabeledCombo(parent, JptUiValidationPreferenceMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE, JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE); //3.0 M7
+ addLabeledCombo(parent, JptUiValidationPreferenceMessages.TYPE_MAPPING_ID_CLASS_NAME_EMPTY, JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NAME_EMPTY); //3.0 M7
+ addLabeledCombo(parent, JptUiValidationPreferenceMessages.TYPE_MAPPING_ID_CLASS_NOT_EXIST, JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_EXIST); //3.0 M7
+ addLabeledCombo(parent, JptUiValidationPreferenceMessages.TYPE_MAPPING_ID_CLASS_NOT_VALID, JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_VALID); //3.0 M7
addLabeledCombo(parent, JptUiValidationPreferenceMessages.TYPE_MAPPING_ID_CLASS_REDEFINED, JpaValidationMessages.TYPE_MAPPING_ID_CLASS_REDEFINED); //3.0 M7
addLabeledCombo(parent, JptUiValidationPreferenceMessages.TYPE_MAPPING_ID_CLASS_REQUIRED, JpaValidationMessages.TYPE_MAPPING_ID_CLASS_REQUIRED); //3.0 M7
addLabeledCombo(parent, JptUiValidationPreferenceMessages.TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID, JpaValidationMessages.TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID); //3.0 M7

Back to the top