Package liquibase.structure.core
Class UniqueConstraint
java.lang.Object
liquibase.structure.AbstractDatabaseObject
liquibase.structure.core.UniqueConstraint
- All Implemented Interfaces:
Comparable
,LiquibaseSerializable
,DatabaseObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface liquibase.serializer.LiquibaseSerializable
LiquibaseSerializable.SerializationType
-
Field Summary
Fields inherited from class liquibase.structure.AbstractDatabaseObject
CURLY_BRACKET_PATTERN
Fields inherited from interface liquibase.serializer.LiquibaseSerializable
GENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
getName()
getTable()
Deprecated.int
hashCode()
boolean
boolean
boolean
boolean
void
load
(ParsedNode parsedNode, ResourceAccessor resourceAccessor) setBackingIndex
(Index backingIndex) setClustered
(boolean clustered) setColumns
(List<Column> columns) setDeferrable
(boolean deferrable) setDisabled
(boolean disabled) setInitiallyDeferred
(boolean initiallyDeferred) Sets the name for the database object.setRelation
(Relation relation) setShouldValidate
(boolean shouldValidate) Deprecated.boolean
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.toString()
Methods inherited from class liquibase.structure.AbstractDatabaseObject
getAttribute, getAttribute, getAttributes, getObjectTypeName, getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, getSerializedObjectName, getSerializedObjectNamespace, getSnapshotId, serialize, setAttribute, setSnapshotId, shouldIncludeCatalogInSpecification, snapshotByDefault
-
Constructor Details
-
UniqueConstraint
public UniqueConstraint() -
UniqueConstraint
-
-
Method Details
-
getContainingObjects
-
getName
-
setName
Description copied from interface:DatabaseObject
Sets the name for the database object.- Parameters:
constraintName
- the new name for the database object- Returns:
- a reference to the same object (implementing classes are expected to return a reference to the same object).
-
getSchema
-
getTable
Deprecated.UsegetRelation()
-
setTable
Deprecated. -
getRelation
-
setRelation
-
getColumns
-
setColumns
-
addColumn
-
isDeferrable
public boolean isDeferrable() -
setDeferrable
-
shouldValidate
public 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.- Returns:
- true if ENABLE VALIDATE (this is the default), or false if ENABLE NOVALIDATE.
-
setShouldValidate
- Parameters:
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.
-
isInitiallyDeferred
public boolean isInitiallyDeferred() -
setInitiallyDeferred
-
getColumnNames
-
setDisabled
-
isDisabled
public boolean isDisabled() -
getBackingIndex
-
setBackingIndex
-
setClustered
-
isClustered
public boolean isClustered() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable
- Overrides:
compareTo
in classAbstractDatabaseObject
-
load
public void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException - Specified by:
load
in interfaceLiquibaseSerializable
- Overrides:
load
in classAbstractDatabaseObject
- Throws:
ParsedNodeException
-
hashCode
public int hashCode() -
toString
- Overrides:
toString
in classAbstractDatabaseObject
-
getRelation()