Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2011-03-03 00:01:17 +0000
committerkmoore2011-03-03 00:01:17 +0000
commit61759f66147f032a5e54092e636e62ce14358c37 (patch)
tree98885c89c87290d22edf4e431adde29a67ad1504 /jpa/plugins
parent7d2dcd8f071b28f54548acb0399bfb9d625ce79a (diff)
downloadwebtools.dali-61759f66147f032a5e54092e636e62ce14358c37.tar.gz
webtools.dali-61759f66147f032a5e54092e636e62ce14358c37.tar.xz
webtools.dali-61759f66147f032a5e54092e636e62ce14358c37.zip
204132 - need a validation error when the same class is specified twice in the orm.xml - patch from Nan
Diffstat (limited to 'jpa/plugins')
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/property_files/jpa_validation.properties3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnit.java15
-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/orm/AbstractOrmEntity.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java103
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/validation/JpaValidationMessages.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/property_files/eclipselink_jpa_validation.properties2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLinkJpaValidationMessages.java4
9 files changed, 114 insertions, 71 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 77c501eeb5..a905b8157e 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
@@ -19,7 +19,6 @@ PERSISTENCE_XML_INVALID_CONTENT=The persistence.xml file does not have recognize
PERSISTENCE_XML_UNSUPPORTED_CONTENT=The persistence.xml file does not have supported content for this JPA platform.
PERSISTENCE_NO_PERSISTENCE_UNIT=No persistence unit defined
PERSISTENCE_MULTIPLE_PERSISTENCE_UNITS=Multiple persistence units defined - only the first persistence unit will be recognized
-PERSISTENCE_UNIT_ENTITY_NAME_ATTRIBUTE_MISSING=Duplicate entity \"{0}\" found in this persistence unit. Each entity must have a unique name within a persistent unit.
PERSISTENCE_UNIT_UNSPECIFIED_MAPPING_FILE=Unspecified mapping file
PERSISTENCE_UNIT_UNSUPPORTED_MAPPING_FILE_CONTENT=Mapping file {0} does not have supported content for this JPA platform.
PERSISTENCE_UNIT_INVALID_MAPPING_FILE=Mapping file {0} does not have recognized content.
@@ -42,6 +41,7 @@ QUERY_NAME_UNDEFINED=Query is unnamed. All queries require a name.
MAPPING_FILE_EXTRANEOUS_PERSISTENCE_UNIT_METADATA=Extraneous persistence unit metadata found for mapping file \"{0}\". These metadata will not be used.
PERSISTENT_TYPE_MAPPED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT=Class \"{0}\" is mapped, but is not included in any persistence unit
PERSISTENT_TYPE_ANNOTATED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT=Class \"{0}\" is annotated, but is not included in any persistence unit
+PERSISTENT_TYPE_DUPLICATE_CLASS=Duplicate class \"{0}\" found in mapping files. This configuration is not supported by the tooling and may result in invalid error messages.
PERSISTENT_TYPE_UNSPECIFIED_CLASS=Unspecified class
PERSISTENT_TYPE_UNRESOLVED_CLASS=Class \"{0}\" cannot be resolved
TYPE_MAPPING_PK_REDEFINED_ID_CLASS=An ancestor of this class has already defined the primary key. The ID class may not be defined here.
@@ -68,6 +68,7 @@ ENTITY_SINGLE_TABLE_DESCENDANT_DEFINES_TABLE=No table should be defined for non-
ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE=No table should be defined for abstract entity \"{0}\" using table-per-concrete-class inheritance
ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED=No discriminator value should be defined for abstract entity \"{0}\"
ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_VALUE_DEFINED=No discriminator value should be defined for entity \"{0}\" using table-per-concrete-class inheritance
+ENTITY_NAME_DUPLICATED=Duplicate entity name \"{0}\" found in the persistence unit. Entity names must be unique.
ENTITY_NAME_MISSING=The given name of the entity \"{0}\" is empty
ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED=No discriminator column should be defined for non-root entity \"{0}\"
ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_COLUMN_DEFINED=No discriminator column should be defined for entity \"{0}\" using table-per-concrete-class inheritance
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnit.java
index 90b30cbb46..2ec243df61 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnit.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/persistence/PersistenceUnit.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2011 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -11,6 +11,8 @@ package org.eclipse.jpt.jpa.core.context.persistence;
import java.util.Iterator;
import java.util.ListIterator;
+import java.util.Map;
+import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
@@ -731,6 +733,17 @@ public interface PersistenceUnit
boolean containsOffset(int textOffset);
/**
+ * Return a map with entity names as the key and class names as the value.
+ * Duplicate class names are eliminated.
+ */
+ Map<String, Set<String>> mapEntityNameToClassNames();
+
+ /**
+ * Return the class names of all the mapped orm classes cross the persistent unit
+ */
+ Iterable<String> getOrmMappedClassNames();
+
+ /**
* Return all the entities defined in both the implied and specified mapping files
* of a persistence unit
*/
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 11157f3cb5..64aa721acf 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
@@ -1368,7 +1368,7 @@ public abstract class AbstractJavaEntity
messages.add(
DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENCE_UNIT_ENTITY_NAME_ATTRIBUTE_MISSING,
+ JpaValidationMessages.ENTITY_NAME_DUPLICATED,
new String[] {javaEntityName},
this,
this.getMappingAnnotation().getNameTextRange(astRoot)
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 61ea1f67a5..f3962106dd 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
@@ -13,6 +13,8 @@ import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
+import java.util.Map;
+import java.util.Set;
import java.util.Vector;
import org.eclipse.emf.common.util.EList;
@@ -1798,27 +1800,25 @@ public abstract class AbstractOrmEntity<X extends XmlEntity>
protected void validateDuplicateEntityNames(List<IMessage> messages,
IReporter reporter) {
- HashBag<String> ormEntityNames = new HashBag<String>();
- CollectionTools.addAll(ormEntityNames, this.getPersistenceUnit().ormEntityNames());
HashBag<String> javaEntityNamesExclOverridden = new HashBag<String>();
CollectionTools.addAll(javaEntityNamesExclOverridden, this.getPersistenceUnit().javaEntityNamesExclOverridden());
- String name = this.getName();
- if ((name != null) &&
- // Check whether or not this entity name has duplicates among the orm entities
- ((ormEntityNames.count(name) > 1)
- // Check whether or not this entity name has duplicates among
- // the java entities that are not defined in the mapping files
- || (javaEntityNamesExclOverridden.contains(name)))) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENCE_UNIT_ENTITY_NAME_ATTRIBUTE_MISSING,
- new String[] {name},
- this,
- this.getClassTextRange()
- )
- );
- }
+ Map<String, Set<String>> map =this.getPersistenceUnit().mapEntityNameToClassNames();
+ Set<String> classNames = map.get(this.getName());
+ // Check whether or not this entity name has duplicates among the orm entities defined with different classes
+ if (((classNames != null) && (classNames.size() > 1)) ||
+ // Check whether or not this entity name has duplicates among
+ // the java entities that are not defined in the mapping files
+ (javaEntityNamesExclOverridden.contains(this.getName()))) {
+ messages.add(
+ DefaultJpaValidationMessages.buildMessage(
+ IMessage.HIGH_SEVERITY,
+ JpaValidationMessages.ENTITY_NAME_DUPLICATED,
+ new String[] {this.getName()},
+ this,
+ this.getNameTextRange()
+ )
+ );
+ }
}
protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java
index 13f8643112..1430c05804 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java
@@ -15,6 +15,7 @@ import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IType;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
+import org.eclipse.jpt.common.utility.internal.HashBag;
import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.common.utility.internal.Tools;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
@@ -459,6 +460,20 @@ public abstract class AbstractOrmTypeMapping<X extends XmlTypeMapping>
this.getClassTextRange()
)
);
+ } else {
+ HashBag<String> ormMappedClassNames = new HashBag<String>();
+ CollectionTools.addAll(ormMappedClassNames, this.getPersistenceUnit().getOrmMappedClassNames());
+ if (ormMappedClassNames.count(this.class_) > 1) {
+ messages.add(
+ DefaultJpaValidationMessages.buildMessage(
+ IMessage.NORMAL_SEVERITY,
+ JpaValidationMessages.PERSISTENT_TYPE_DUPLICATE_CLASS,
+ new String[] {this.class_},
+ this,
+ this.getClassTextRange()
+ )
+ );
+ }
return;
}
this.buildTypeMappingValidator().validate(messages, reporter);
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 cfe13da52d..82e42423a4 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2011 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -33,6 +33,7 @@ import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.common.utility.internal.HashBag;
import org.eclipse.jpt.common.utility.internal.NotNullFilter;
+import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.common.utility.internal.Tools;
import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
import org.eclipse.jpt.common.utility.internal.iterables.CompositeListIterable;
@@ -1663,30 +1664,12 @@ public abstract class AbstractPersistenceUnit
}
protected void checkForDuplicateClasses(List<IMessage> messages) {
- HashBag<String> ormMappedClassNames = new HashBag<String>();
- CollectionTools.addAll(ormMappedClassNames, this.ormMappedClassNames());
- for (Iterator<PersistentType> ormMappedClasses = this.getMappingFilePersistentTypes().iterator(); ormMappedClasses.hasNext();){
- PersistentType ormMappedClass = ormMappedClasses.next();
- String ormMappedClassName = ormMappedClass.getName();
- if ((ormMappedClassName != null) && (ormMappedClassNames.count(ormMappedClassName) > 1)) {
- messages.add(
- DefaultJpaValidationMessages.buildMessage(
- IMessage.HIGH_SEVERITY,
- JpaValidationMessages.PERSISTENCE_UNIT_DUPLICATE_CLASS,
- new String[] {ormMappedClassName},
- ormMappedClass,
- ormMappedClass.getSelectionTextRange()
- )
- );
- }
- }
HashBag<String> javaClassNames = new HashBag<String>();
CollectionTools.addAll(javaClassNames, this.classRefNames());
for (Iterator<ClassRef> stream = this.classRefs(); stream.hasNext(); ) {
ClassRef classRef = stream.next();
String javaClassName = classRef.getClassName();
- if ((javaClassName != null) && (!ormMappedClassNames.contains(javaClassName))
- && (javaClassNames.count(javaClassName) > 1)) {
+ if ((javaClassName != null) && (javaClassNames.count(javaClassName) > 1)) {
messages.add(
DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
@@ -1935,8 +1918,8 @@ public abstract class AbstractPersistenceUnit
};
}
- protected Iterator<String> ormMappedClassNames() {
- return new TransformationIterator<PersistentType, String>(this.getMappingFilePersistentTypes()) {
+ public Iterable<String> getOrmMappedClassNames() {
+ return new TransformationIterable<PersistentType, String>(this.getMappingFilePersistentTypes()) {
@Override
protected String transform(PersistentType persistentType) {
return persistentType.getName();
@@ -1945,42 +1928,78 @@ public abstract class AbstractPersistenceUnit
}
// ------------------ orm entities --------------------
+ public Map<String, Set<String>> mapEntityNameToClassNames() {
+ HashSet<String> classNames = new HashSet<String>();
+ Map<String, Set<String>> map = new HashMap<String, Set<String>>();
+ for (String entityName : this.getFilteredEntityNames()) {
+ CollectionTools.addAll(classNames, getFilteredOrmClassNames(entityName));
+ map.put(entityName, classNames);
+ }
+ return map;
+ }
+
+ private Iterable<String> getFilteredOrmClassNames(String entityName){
+ List<String> classNames = new ArrayList<String>();
+ for (PersistentType persistentType: this.getFilteredOrmPersistentTypes()) {
+ if (StringTools.stringsAreEqual(persistentType.getMapping().getName(), entityName)) {
+ classNames.add(persistentType.getName());
+ }
+ }
+ return classNames;
+ }
+
+ private Iterable<String> getFilteredEntityNames() {
+ return new TransformationIterable<PersistentType, String>(this.getFilteredOrmPersistentTypes()) {
+ @Override
+ protected String transform(PersistentType persistentType) {
+ return persistentType.getMapping().getName();
+ }
+ };
+ }
+
+ private Iterable<PersistentType> getFilteredOrmPersistentTypes(){
+ List<PersistentType> filteredPersistentType = new ArrayList<PersistentType>();
+ HashBag<String> ormEntityNames = new HashBag<String>();
+ CollectionTools.addAll(ormEntityNames, this.ormEntityNames());
+ for (PersistentType persistentType : this.getOrmEntityPersistentTypes()) {
+ if (ormEntityNames.count(persistentType.getMapping().getName()) > 1) {
+ filteredPersistentType.add(persistentType);
+ }
+ }
+ return filteredPersistentType;
+ }
+
protected Iterator<String> ormEntityClassNames() {
- return new TransformationIterator<Entity, String>(this.getOrmEntities()) {
+ return new TransformationIterator<PersistentType, String>(this.getOrmEntityPersistentTypes()) {
@Override
- protected String transform(Entity ormEntity) {
- return ormEntity.getPersistentType().getName();
+ protected String transform(PersistentType persistentType) {
+ return persistentType.getName();
}
};
}
public Iterator<String> ormEntityNames() {
- return new TransformationIterator<Entity, String>(this.getOrmEntities()) {
+ return new TransformationIterator<PersistentType, String>(this.getOrmEntityPersistentTypes()) {
@Override
- protected String transform(Entity ormEntity) {
- return ormEntity.getName();
+ protected String transform(PersistentType persistentType) {
+ return persistentType.getMapping().getName();
}
};
}
public Iterable<Entity> getOrmEntities(){
- return new SubIterableWrapper<TypeMapping, Entity>(this.getOrmEntities_());
+ return new SubIterableWrapper<PersistentType, Entity>(this.getOrmEntityPersistentTypes());
}
- protected Iterable<TypeMapping> getOrmEntities_(){
- return new FilteringIterable<TypeMapping>(this.getOrmTypeMappings()){
- @Override
- protected boolean accept(TypeMapping typeMapping) {
- return typeMapping instanceof Entity;
- }
- };
+ private Iterable<PersistentType> getOrmEntityPersistentTypes() {
+ return (this.getOrmPersistentTypes(org.eclipse.jpt.jpa.core.MappingKeys.ENTITY_TYPE_MAPPING_KEY));
}
-
- private Iterable<? extends TypeMapping> getOrmTypeMappings() {
- return new TransformationIterable<PersistentType, TypeMapping>(this.getMappingFilePersistentTypes()) {
+
+ protected Iterable<PersistentType> getOrmPersistentTypes(final String mappingKey) {
+ return new FilteringIterable<PersistentType>(this.getMappingFilePersistentTypes()) {
@Override
- protected TypeMapping transform(PersistentType persistentType) {
- return persistentType.getMapping();
+ protected boolean accept(PersistentType persistentType) {
+ return persistentType.getMappingKey() == mappingKey;
}
};
}
@@ -1997,7 +2016,7 @@ public abstract class AbstractPersistenceUnit
public Iterator<String> javaEntityNamesExclOverridden() {
HashBag<String> ormMappedClassNames = new HashBag<String>();
- CollectionTools.addAll(ormMappedClassNames, this.ormMappedClassNames());
+ CollectionTools.addAll(ormMappedClassNames, this.getOrmMappedClassNames());
List<String> javaEntityNamesExclOverridden = new ArrayList<String>();
for (Iterator<String> javaEntityClassNames = this.javaEntityClassNames(); javaEntityClassNames.hasNext();){
String javaEntityClassName = javaEntityClassNames.next();
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 7406c7f95f..36b556ed32 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
@@ -25,7 +25,6 @@ public interface JpaValidationMessages {
public static final String PERSISTENCE_XML_UNSUPPORTED_CONTENT = "PERSISTENCE_XML_UNSUPPORTED_CONTENT";
public static final String PERSISTENCE_NO_PERSISTENCE_UNIT = "PERSISTENCE_NO_PERSISTENCE_UNIT";
public static final String PERSISTENCE_MULTIPLE_PERSISTENCE_UNITS = "PERSISTENCE_MULTIPLE_PERSISTENCE_UNITS";
- public static final String PERSISTENCE_UNIT_ENTITY_NAME_ATTRIBUTE_MISSING = "PERSISTENCE_UNIT_ENTITY_NAME_ATTRIBUTE_MISSING";
public static final String PERSISTENCE_UNIT_UNSPECIFIED_MAPPING_FILE = "PERSISTENCE_UNIT_UNSPECIFIED_MAPPING_FILE";
public static final String PERSISTENCE_UNIT_UNSUPPORTED_MAPPING_FILE_CONTENT = "PERSISTENCE_UNIT_UNSUPPORTED_MAPPING_FILE_CONTENT";
public static final String PERSISTENCE_UNIT_NONEXISTENT_MAPPING_FILE = "PERSISTENCE_UNIT_NONEXISTENT_MAPPING_FILE";
@@ -48,6 +47,7 @@ public interface JpaValidationMessages {
public static final String MAPPING_FILE_EXTRANEOUS_PERSISTENCE_UNIT_METADATA = "MAPPING_FILE_EXTRANEOUS_PERSISTENCE_UNIT_METADATA";
public static final String PERSISTENT_TYPE_MAPPED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT = "PERSISTENT_TYPE_MAPPED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT";
public static final String PERSISTENT_TYPE_ANNOTATED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT = "PERSISTENT_TYPE_ANNOTATED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT";
+ public static final String PERSISTENT_TYPE_DUPLICATE_CLASS = "PERSISTENT_TYPE_DUPLICATE_CLASS";
public static final String PERSISTENT_TYPE_UNSPECIFIED_CLASS = "PERSISTENT_TYPE_UNSPECIFIED_CLASS";
public static final String PERSISTENT_TYPE_UNRESOLVED_CLASS = "PERSISTENT_TYPE_UNRESOLVED_CLASS";
public static final String TYPE_MAPPING_PK_REDEFINED_ID_CLASS = "TYPE_MAPPING_PK_REDEFINED_ID_CLASS";
@@ -74,6 +74,7 @@ public interface JpaValidationMessages {
public static final String ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE = "ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE";
public static final String ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED = "ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED";
public static final String ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_VALUE_DEFINED = "ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_VALUE_DEFINED";
+ public static final String ENTITY_NAME_DUPLICATED = "ENTITY_NAME_DUPLICATED";
public static final String ENTITY_NAME_MISSING = "ENTITY_NAME_MISSING";
public static final String ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED = "ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED";
public static final String ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_COLUMN_DEFINED = "ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_COLUMN_DEFINED";
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/property_files/eclipselink_jpa_validation.properties b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/property_files/eclipselink_jpa_validation.properties
index a65d70e7c8..f69280624c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/property_files/eclipselink_jpa_validation.properties
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/property_files/eclipselink_jpa_validation.properties
@@ -21,8 +21,6 @@ PERSISTENT_ATTRIBUTE_INVALID_VERSION_MAPPING_TYPE=The persistent field or proper
PERSISTENCE_UNIT_LEGACY_DESCRIPTOR_CUSTOMIZER=\"{0}\" is a legacy descriptor customizer property. Consider migration to the EclipseLink customizer settings via annotation or XML mapping file
PERSISTENCE_UNIT_LEGACY_ENTITY_CACHING=\"{0}\" is a legacy entity caching property. Consider migration to JPA 2.0 and EclipseLink cache settings via annotation or XML mapping file
PERSISTENCE_UNIT_CACHING_PROPERTY_IGNORED=Property \"{0}\" will be ignored as shared-cache-mode is set to NONE
-PERSISTENCE_UNIT_DUPLICATE_ATTRIBUTE_MAPPING=Duplicate attribute mapping \"{0}\" is defined for \"{1}\"
-PERSISTENCE_UNIT_DUPLICATE_MAPPED_CLASS=Different type mappings are defined with the same class \"{0}\"
BASIC_COLLECTION_MAPPING_DEPRECATED=The type basic-collection is deprecated
BASIC_MAP_MAPPING_DEPRECATED=The type basic-map is deprecated
TYPE_MAPPING_MEMBER_CLASS_NOT_STATIC=The java class for mapped type \"{0}\" is a non-static member class
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLinkJpaValidationMessages.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLinkJpaValidationMessages.java
index d9628825b0..3eac43e2a0 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLinkJpaValidationMessages.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLinkJpaValidationMessages.java
@@ -40,10 +40,6 @@ public interface EclipseLinkJpaValidationMessages {
public static final String PERSISTENCE_UNIT_CACHING_PROPERTY_IGNORED = "PERSISTENCE_UNIT_CACHING_PROPERTY_IGNORED";
- public static final String PERSISTENCE_UNIT_DUPLICATE_ATTRIBUTE_MAPPING = "PERSISTENCE_UNIT_DUPLICATE_ATTRIBUTE_MAPPING";
-
- public static final String PERSISTENCE_UNIT_DUPLICATE_MAPPED_CLASS = "PERSISTENCE_UNIT_DUPLICATE_MAPPED_CLASS";
-
public static final String BASIC_COLLECTION_MAPPING_DEPRECATED = "BASIC_COLLECTION_MAPPING_DEPRECATED";
public static final String BASIC_MAP_MAPPING_DEPRECATED = "BASIC_MAP_MAPPING_DEPRECATED";

Back to the top