Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2010-09-03 14:46:08 -0400
committerkmoore2010-09-03 14:46:08 -0400
commit49d227e0b1dd54d425baa7e2c9fa34312fe491d9 (patch)
tree374d6886563aa0d5442ff7f9c761819a908cb4ab
parentfb2b0808b94e85bebf70df2f8e1e497aceb63000 (diff)
downloadwebtools.dali-49d227e0b1dd54d425baa7e2c9fa34312fe491d9.tar.gz
webtools.dali-49d227e0b1dd54d425baa7e2c9fa34312fe491d9.tar.xz
webtools.dali-49d227e0b1dd54d425baa7e2c9fa34312fe491d9.zip
148262 - added support for primary key join column validation on 1-1 mappings in java and orm
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation.properties4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnJoiningStrategy.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnJoiningStrategy.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/BaseJoinColumnValidator.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/OneToOnePrimaryKeyJoinColumnValidator.java54
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationMessages.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/preferences/JpaProblemSeveritiesPage.java4
10 files changed, 149 insertions, 29 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation.properties b/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation.properties
index 421f720970..fbbfff7cbc 100644
--- a/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation.properties
+++ b/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation.properties
@@ -134,6 +134,10 @@ VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME=In implied primary key join colu
VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME=In implied primary key join column, referenced column name \"{0}\" cannot be resolved on table \"{1}\"
VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied primary key join column, name must be specified when there are multiple primary key join columns
VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied primary key join column, referenced column name must be specified when there are multiple primary key join columns
+VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME=In implied attribute \"{0}\", primary key join column name \"{1}\" cannot be resolved on table \"{2}\"
+VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME=In implied attribute \"{0}\", primary key join column referenced column name \"{1}\" cannot be resolved on table \"{2}\"
+VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied attribute \"{0}\", primary key join column name must be specified when there are multiple primary key join columns
+VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied attribute \"{0}\", primary key join column referenced column name must be specified when there are multiple primary key join columns
VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME=In implied secondary table \"{0}\", primary key join column \"{1}\" cannot be resolved on table \"{2}\"
VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME=In implied secondary table \"{0}\", primary key join column referenced column name \"{1}\" cannot be resolved on table \"{2}\"
VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied secondary table \"{0}\", name must be specified when there are multiple primary key join columns
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnJoiningStrategy.java
index 634ff4ae29..b26539e2eb 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnJoiningStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnJoiningStrategy.java
@@ -10,10 +10,10 @@
package org.eclipse.jpt.core.internal.context.java;
import java.util.Iterator;
+import java.util.List;
import java.util.ListIterator;
import java.util.Vector;
import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.context.BaseColumn;
import org.eclipse.jpt.core.context.BaseJoinColumn;
import org.eclipse.jpt.core.context.Entity;
import org.eclipse.jpt.core.context.NamedColumn;
@@ -25,8 +25,10 @@ import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumn;
import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumnEnabledRelationshipReference;
import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumnJoiningStrategy;
import org.eclipse.jpt.core.context.java.JavaRelationshipMapping;
+import org.eclipse.jpt.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.core.internal.context.JptValidator;
import org.eclipse.jpt.core.internal.context.NamedColumnTextRangeResolver;
+import org.eclipse.jpt.core.internal.jpa1.context.OneToOnePrimaryKeyJoinColumnValidator;
import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
import org.eclipse.jpt.core.resource.java.NestableAnnotation;
@@ -38,6 +40,7 @@ import org.eclipse.jpt.utility.Filter;
import org.eclipse.jpt.utility.internal.CollectionTools;
import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public class GenericJavaPrimaryKeyJoinColumnJoiningStrategy
extends AbstractJavaJpaContextNode
@@ -271,8 +274,16 @@ public class GenericJavaPrimaryKeyJoinColumnJoiningStrategy
public TextRange getValidationTextRange(CompilationUnit astRoot) {
return this.getRelationshipReference().getValidationTextRange(astRoot);
}
-
-
+
+ @Override
+ public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ super.validate(messages, reporter, astRoot);
+ for (Iterator<JavaPrimaryKeyJoinColumn> stream = this.primaryKeyJoinColumns(); stream.hasNext(); ) {
+ stream.next().validate(messages, reporter, astRoot);
+ }
+ }
+
+
// ********** join column owner adapter **********
protected class JoinColumnOwner
@@ -343,7 +354,7 @@ public class GenericJavaPrimaryKeyJoinColumnJoiningStrategy
}
public JptValidator buildColumnValidator(NamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- throw new UnsupportedOperationException("validation not supported yet"); //$NON-NLS-1$
+ return new OneToOnePrimaryKeyJoinColumnValidator((BaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnJoiningStrategy.java
index 73db34143d..3b7805fccf 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnJoiningStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnJoiningStrategy.java
@@ -10,10 +10,9 @@
package org.eclipse.jpt.core.internal.context.orm;
import java.util.Iterator;
+import java.util.List;
import java.util.ListIterator;
import java.util.Vector;
-
-import org.eclipse.jpt.core.context.BaseColumn;
import org.eclipse.jpt.core.context.BaseJoinColumn;
import org.eclipse.jpt.core.context.Entity;
import org.eclipse.jpt.core.context.NamedColumn;
@@ -26,8 +25,10 @@ import org.eclipse.jpt.core.context.orm.OrmPrimaryKeyJoinColumn;
import org.eclipse.jpt.core.context.orm.OrmPrimaryKeyJoinColumnEnabledRelationshipReference;
import org.eclipse.jpt.core.context.orm.OrmPrimaryKeyJoinColumnJoiningStrategy;
import org.eclipse.jpt.core.context.orm.OrmRelationshipMapping;
+import org.eclipse.jpt.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.core.internal.context.JptValidator;
import org.eclipse.jpt.core.internal.context.NamedColumnTextRangeResolver;
+import org.eclipse.jpt.core.internal.jpa1.context.OneToOnePrimaryKeyJoinColumnValidator;
import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
import org.eclipse.jpt.core.resource.orm.OrmFactory;
import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
@@ -38,6 +39,7 @@ import org.eclipse.jpt.utility.internal.CollectionTools;
import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public class GenericOrmPrimaryKeyJoinColumnJoiningStrategy
extends AbstractOrmXmlContextNode
@@ -206,11 +208,22 @@ public class GenericOrmPrimaryKeyJoinColumnJoiningStrategy
addPrimaryKeyJoinColumn(buildPrimaryKeyJoinColumn(xmlPkJoinColumns.next()));
}
}
-
+
+
+ // **************** validation *********************************************
+
public TextRange getValidationTextRange() {
return this.getRelationshipReference().getValidationTextRange();
}
+ @Override
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ for (Iterator<OrmPrimaryKeyJoinColumn> stream = this.primaryKeyJoinColumns(); stream.hasNext(); ) {
+ stream.next().validate(messages, reporter);
+ }
+ }
+
// ********** join column owner adapter **********
@@ -285,7 +298,7 @@ public class GenericOrmPrimaryKeyJoinColumnJoiningStrategy
}
public JptValidator buildColumnValidator(NamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- throw new UnsupportedOperationException("validation not supported yet"); //$NON-NLS-1$
+ return new OneToOnePrimaryKeyJoinColumnValidator(getPersistentAttribute(), (BaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/BaseJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/BaseJoinColumnValidator.java
index 5b6f05593c..a00dfe9263 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/BaseJoinColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/BaseJoinColumnValidator.java
@@ -75,6 +75,7 @@ public abstract class BaseJoinColumnValidator extends AbstractNamedColumnValidat
if (this.getColumn().getSpecifiedReferencedColumnName() == null && this.joinColumnOwner.joinColumnsSize() > 1) {
messages.add(this.buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage());
}
+ //bug 315292 is the reason we are only validating if there is a specified referenced column name
else if (this.getColumn().getSpecifiedReferencedColumnName() != null) {
if (this.getColumn().getReferencedColumnDbTable() != null && ! this.getColumn().isReferencedColumnResolved()) {
messages.add(this.buildUnresolvedReferencedColumnNameMessage());
@@ -109,7 +110,7 @@ public abstract class BaseJoinColumnValidator extends AbstractNamedColumnValidat
return DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
this.getVirtualAttributeUnresolvedReferencedColumnNameMessage(),
- new String[] {getPersistentAttributeName(), this.getColumn().getReferencedColumnName(), this.namedColumn.getDbTable().getName()},
+ new String[] {getPersistentAttributeName(), this.getColumn().getReferencedColumnName(), this.getColumn().getReferencedColumnDbTable().getName()},
this.getColumn(),
this.getTextRangeResolver().getReferencedColumnNameTextRange()
);
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java
index cdd119441c..c59b768ef4 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java
@@ -22,4 +22,24 @@ public class EntityPrimaryKeyJoinColumnValidator extends PrimaryKeyJoinColumnVal
BaseJoinColumnTextRangeResolver textRangeResolver) {
super(column, owner, textRangeResolver);
}
+
+ @Override
+ protected String getVirtualAttributeUnresolvedNameMessage() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ protected String getVirtualAttributeUnresolvedReferencedColumnNameMessage() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ protected String getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ protected String getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
+ throw new UnsupportedOperationException();
+ }
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/OneToOnePrimaryKeyJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/OneToOnePrimaryKeyJoinColumnValidator.java
new file mode 100644
index 0000000000..33db00a2ab
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/OneToOnePrimaryKeyJoinColumnValidator.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle.
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context;
+
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.internal.context.BaseJoinColumnTextRangeResolver;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+
+public class OneToOnePrimaryKeyJoinColumnValidator extends PrimaryKeyJoinColumnValidator
+{
+ public OneToOnePrimaryKeyJoinColumnValidator(
+ BaseJoinColumn column,
+ BaseJoinColumn.Owner owner,
+ BaseJoinColumnTextRangeResolver textRangeResolver) {
+ super(column, owner, textRangeResolver);
+ }
+
+ public OneToOnePrimaryKeyJoinColumnValidator(
+ PersistentAttribute persistentAttribute,
+ BaseJoinColumn column,
+ BaseJoinColumn.Owner owner,
+ BaseJoinColumnTextRangeResolver textRangeResolver) {
+ super(persistentAttribute, column, owner, textRangeResolver);
+ }
+
+ @Override
+ protected String getVirtualAttributeUnresolvedNameMessage() {
+ return JpaValidationMessages.VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME;
+ }
+
+ @Override
+ protected String getVirtualAttributeUnresolvedReferencedColumnNameMessage() {
+ return JpaValidationMessages.VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
+ }
+
+ @Override
+ protected String getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
+ return JpaValidationMessages.VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
+ }
+
+ @Override
+ protected String getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
+ return JpaValidationMessages.VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java
index 27cd42705a..b57bb1b362 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java
@@ -11,6 +11,7 @@
package org.eclipse.jpt.core.internal.jpa1.context;
import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
import org.eclipse.jpt.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.core.internal.jpa1.context.BaseColumnTableValidator.NullTableDescriptionProvider;
import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
@@ -24,6 +25,14 @@ public abstract class PrimaryKeyJoinColumnValidator extends BaseJoinColumnValida
BaseJoinColumnTextRangeResolver textRangeResolver) {
super(column, owner, textRangeResolver, new NullTableDescriptionProvider());
}
+
+ protected PrimaryKeyJoinColumnValidator(
+ PersistentAttribute persistentAttribute,
+ BaseJoinColumn column,
+ BaseJoinColumn.Owner owner,
+ BaseJoinColumnTextRangeResolver textRangeResolver) {
+ super(persistentAttribute, column, owner, textRangeResolver, new NullTableDescriptionProvider());
+ }
@Override
public IMessage buildUnresolvedNameMessage() {
@@ -77,11 +86,6 @@ public abstract class PrimaryKeyJoinColumnValidator extends BaseJoinColumnValida
protected String getUnresolvedNameMessage() {
return JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME;
}
-
- @Override
- protected String getVirtualAttributeUnresolvedNameMessage() {
- throw new UnsupportedOperationException();
- }
@Override
protected String getUnresolvedReferencedColumnNameMessage() {
@@ -89,27 +93,12 @@ public abstract class PrimaryKeyJoinColumnValidator extends BaseJoinColumnValida
}
@Override
- protected String getVirtualAttributeUnresolvedReferencedColumnNameMessage() {
- return JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
- }
-
- @Override
protected String getUnspecifiedNameMultipleJoinColumnsMessage() {
return JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
}
@Override
- protected String getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
- throw new UnsupportedOperationException();
- }
-
- @Override
protected String getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
return JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
}
-
- @Override
- protected String getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
- throw new UnsupportedOperationException();
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java
index f6f9f78e32..37f6fda8b0 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java
@@ -57,6 +57,11 @@ public class SecondaryTablePrimaryKeyJoinColumnValidator extends PrimaryKeyJoinC
}
@Override
+ protected String getVirtualAttributeUnresolvedNameMessage() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
public IMessage buildUnresolvedReferencedColumnNameMessage() {
if (isSecondaryTableVirtual()) {
return this.buildVirtualSecondaryTableUnresolvedReferencedColumnNameMessage();
@@ -75,6 +80,11 @@ public class SecondaryTablePrimaryKeyJoinColumnValidator extends PrimaryKeyJoinC
}
@Override
+ protected String getVirtualAttributeUnresolvedReferencedColumnNameMessage() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage() {
if (this.isSecondaryTableVirtual()) {
return this.buildVirtualSecondaryTableUnspecifiedNameMultipleJoinColumnsMessage();
@@ -93,6 +103,11 @@ public class SecondaryTablePrimaryKeyJoinColumnValidator extends PrimaryKeyJoinC
}
@Override
+ protected String getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
if (this.isSecondaryTableVirtual()) {
return this.buildVirtualSecondaryTableUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage();
@@ -109,4 +124,9 @@ public class SecondaryTablePrimaryKeyJoinColumnValidator extends PrimaryKeyJoinC
getTextRangeResolver().getReferencedColumnNameTextRange()
);
}
+
+ @Override
+ protected String getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
+ throw new UnsupportedOperationException();
+ }
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationMessages.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationMessages.java
index d462e07e75..0dfff82bd3 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationMessages.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationMessages.java
@@ -140,6 +140,10 @@ public interface JpaValidationMessages {
public static final String VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
public static final String VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
public static final String VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+ public static final String VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME";
+ public static final String VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
+ public static final String VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+ public static final String VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
public static final String VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME";
public static final String VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
public static final String VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/preferences/JpaProblemSeveritiesPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/preferences/JpaProblemSeveritiesPage.java
index de9e6462a3..69bf669853 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/preferences/JpaProblemSeveritiesPage.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/preferences/JpaProblemSeveritiesPage.java
@@ -495,6 +495,10 @@ public class JpaProblemSeveritiesPage extends PropertyAndPreferencePage {
addLabeledCombo(parent, JptUiValidationPreferenceMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS, JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS);
addLabeledCombo(parent, JptUiValidationPreferenceMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME, JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME);
addLabeledCombo(parent, JptUiValidationPreferenceMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS, JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS);
+ addLabeledCombo(parent, JptUiValidationPreferenceMessages.PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME, JpaValidationMessages.VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME);
+ addLabeledCombo(parent, JptUiValidationPreferenceMessages.PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS, JpaValidationMessages.VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS);
+ addLabeledCombo(parent, JptUiValidationPreferenceMessages.PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME, JpaValidationMessages.VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME);
+ addLabeledCombo(parent, JptUiValidationPreferenceMessages.PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS, JpaValidationMessages.VIRTUAL_ATTRIBUTE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS);
addLabeledCombo(parent, JptUiValidationPreferenceMessages.VIRTUAL_ATTRIBUTE_ORDER_COLUMN_UNRESOLVED_NAME, JpaValidationMessages.VIRTUAL_ATTRIBUTE_ORDER_COLUMN_UNRESOLVED_NAME);
addLabeledCombo(parent, JptUiValidationPreferenceMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_TABLE_NOT_VALID, JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_TABLE_NOT_VALID);
}

Back to the top