public class ForeignKey extends AbstractDatabaseObject
LiquibaseSerializable.SerializationType
GENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE
Constructor and Description |
---|
ForeignKey() |
ForeignKey(String name) |
ForeignKey(String name,
String foreignKeyCatalog,
String foreignKeySchema,
String foreignKeyTable,
Column... baseTableColumns) |
getAttribute, getAttribute, getAttributes, getObjectTypeName, getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, getSerializedObjectName, getSerializedObjectNamespace, getSnapshotId, load, serialize, setAttribute, setSnapshotId, shouldIncludeCatalogInSpecification, snapshotByDefault
public ForeignKey()
public ForeignKey(String name)
public DatabaseObject[] getContainingObjects()
public Schema getSchema()
public Table getPrimaryKeyTable()
public ForeignKey setPrimaryKeyTable(Table primaryKeyTable)
public ForeignKey setPrimaryKeyColumns(List<Column> primaryKeyColumns)
public ForeignKey addPrimaryKeyColumn(Column primaryKeyColumn)
public Table getForeignKeyTable()
public ForeignKey setForeignKeyTable(Table foreignKeyTable)
public ForeignKey setForeignKeyColumns(List<Column> foreignKeyColumns)
public ForeignKey addForeignKeyColumn(Column foreignKeyColumn)
public String getName()
public ForeignKey setName(String name)
DatabaseObject
name
- the new name for the database objectpublic String toString()
toString
in class AbstractDatabaseObject
public boolean isDeferrable()
public ForeignKey setDeferrable(boolean deferrable)
public boolean isInitiallyDeferred()
public ForeignKey setInitiallyDeferred(boolean initiallyDeferred)
public boolean shouldValidate()
public ForeignKey setShouldValidate(boolean shouldValidate)
shouldValidate
- - if shouldValidate is set to FALSE then the constraint will be created
with the 'ENABLE NOVALIDATE' mode. This means the constraint would be created, but that no
check will be done to ensure old data has valid foreign keys - only new data would be checked
to see if it complies with the constraint logic. The default state for foreign keys is to
have 'ENABLE VALIDATE' set.public ForeignKeyConstraintType getUpdateRule()
public ForeignKey setUpdateRule(ForeignKeyConstraintType rule)
public ForeignKeyConstraintType getDeleteRule()
public ForeignKey setDeleteRule(ForeignKeyConstraintType rule)
public int compareTo(Object other)
compareTo
in interface Comparable
compareTo
in class AbstractDatabaseObject
public Index getBackingIndex()
public ForeignKey setBackingIndex(Index backingIndex)
Copyright © 2019 Liquibase.org. All rights reserved.