blob: 33db00a2ab03161f0122e9347cad92dc6e162d0a [file] [log] [blame]
/*******************************************************************************
* 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;
}
}