public class PrimaryKey extends AbstractDatabaseObject
LiquibaseSerializable.SerializationType
GENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE
Constructor and Description |
---|
PrimaryKey() |
PrimaryKey(String name,
String tableCatalogName,
String tableSchemaName,
String tableName,
Column... columns) |
Modifier and Type | Method and Description |
---|---|
PrimaryKey |
addColumn(int position,
Column column)
Adds a new column to the column list of this PrimaryKey.
|
int |
compareTo(Object other) |
boolean |
equals(Object o) |
Index |
getBackingIndex() |
String |
getColumnNames() |
List<String> |
getColumnNamesAsList() |
List<Column> |
getColumns() |
DatabaseObject[] |
getContainingObjects() |
String |
getName() |
Schema |
getSchema() |
Table |
getTable()
Returns the Table object this PrimaryKey belongs to.
|
String |
getTablespace() |
int |
hashCode() |
boolean |
isCertainName() |
PrimaryKey |
setBackingIndex(Index backingIndex) |
PrimaryKey |
setCertainName(boolean certainName) |
PrimaryKey |
setName(String name)
Sets the name for the database object.
|
PrimaryKey |
setShouldValidate(boolean shouldValidate) |
PrimaryKey |
setTable(Table table)
Sets the Table object this PrimaryKey belongs to.
|
PrimaryKey |
setTablespace(String tablespace) |
String |
toString() |
getAttribute, getAttribute, getAttributes, getObjectTypeName, getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, getSerializedObjectName, getSerializedObjectNamespace, getSnapshotId, load, serialize, setAttribute, setSnapshotId, shouldIncludeCatalogInSpecification, snapshotByDefault
public DatabaseObject[] getContainingObjects()
public String getName()
public PrimaryKey setName(String name)
DatabaseObject
name
- the new name for the database objectpublic Schema getSchema()
public String getColumnNames()
public PrimaryKey addColumn(int position, Column column)
position
- the position where to insert or replace the columncolumn
- the new columnpublic Table getTable()
public PrimaryKey setTable(Table table)
table
- the table object to set as the container for this PrimaryKeypublic int compareTo(Object other)
compareTo
in interface Comparable
compareTo
in class AbstractDatabaseObject
public String toString()
toString
in class AbstractDatabaseObject
public boolean isCertainName()
public PrimaryKey setCertainName(boolean certainName)
public String getTablespace()
public PrimaryKey setTablespace(String tablespace)
public Index getBackingIndex()
public PrimaryKey setBackingIndex(Index backingIndex)
public PrimaryKey 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 primary keys - only new data would be checked
to see if it complies with the constraint logic. The default state for primary keys is to
have 'ENABLE VALIDATE' set.Copyright © 2023 Liquibase.org. All rights reserved.