public class UniqueConstraint extends AbstractDatabaseObject
LiquibaseSerializable.SerializationTypeGENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE| Constructor and Description |
|---|
UniqueConstraint() |
UniqueConstraint(String name,
String tableCatalog,
String tableSchema,
String tableName,
Column... columns) |
| Modifier and Type | Method and Description |
|---|---|
UniqueConstraint |
addColumn(int position,
Column column) |
int |
compareTo(Object other) |
boolean |
equals(Object o) |
Index |
getBackingIndex() |
String |
getColumnNames() |
List<Column> |
getColumns() |
DatabaseObject[] |
getContainingObjects() |
String |
getName() |
Schema |
getSchema() |
Relation |
getTable() |
int |
hashCode() |
boolean |
isClustered() |
boolean |
isDeferrable() |
boolean |
isDisabled() |
boolean |
isInitiallyDeferred() |
void |
load(ParsedNode parsedNode,
ResourceAccessor resourceAccessor) |
UniqueConstraint |
setBackingIndex(Index backingIndex) |
UniqueConstraint |
setClustered(boolean clustered) |
UniqueConstraint |
setColumns(List<Column> columns) |
UniqueConstraint |
setDeferrable(boolean deferrable) |
UniqueConstraint |
setDisabled(boolean disabled) |
UniqueConstraint |
setInitiallyDeferred(boolean initiallyDeferred) |
UniqueConstraint |
setName(String constraintName)
Sets the name for the database object.
|
UniqueConstraint |
setShouldValidate(boolean shouldValidate) |
UniqueConstraint |
setTable(Relation table) |
boolean |
shouldValidate()
In Oracle PL/SQL, the VALIDATE keyword defines whether a newly added unique constraint on a
column in a table should cause existing rows to be checked to see if they satisfy the
uniqueness constraint or not.
|
String |
toString() |
getAttribute, getAttribute, getAttributes, getObjectTypeName, getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, getSerializedObjectName, getSerializedObjectNamespace, getSnapshotId, serialize, setAttribute, setSnapshotId, snapshotByDefaultpublic DatabaseObject[] getContainingObjects()
public String getName()
public UniqueConstraint setName(String constraintName)
DatabaseObjectconstraintName - the new name for the database objectpublic Schema getSchema()
public Relation getTable()
public UniqueConstraint setTable(Relation table)
public UniqueConstraint setColumns(List<Column> columns)
public UniqueConstraint addColumn(int position, Column column)
public boolean isDeferrable()
public UniqueConstraint setDeferrable(boolean deferrable)
public boolean shouldValidate()
public UniqueConstraint 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 constraints - only new data would be checked
to see if it complies with the constraint logic. The default state for unique constraints is to
have 'ENABLE VALIDATE' set.public boolean isInitiallyDeferred()
public UniqueConstraint setInitiallyDeferred(boolean initiallyDeferred)
public String getColumnNames()
public UniqueConstraint setDisabled(boolean disabled)
public boolean isDisabled()
public Index getBackingIndex()
public UniqueConstraint setBackingIndex(Index backingIndex)
public UniqueConstraint setClustered(boolean clustered)
public boolean isClustered()
public int compareTo(Object other)
compareTo in interface ComparablecompareTo in class AbstractDatabaseObjectpublic void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException
load in interface LiquibaseSerializableload in class AbstractDatabaseObjectParsedNodeExceptionpublic String toString()
toString in class AbstractDatabaseObjectCopyright © 2018 Liquibase.org. All rights reserved.