blob: 579b90c31727e6691e9bbedba7f9800117ee0327 [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.jpa.core.internal.jpa1.context;
import org.eclipse.jpt.jpa.core.context.BaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.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;
}
}