Package liquibase.statement.core
Class AddUniqueConstraintStatement
- java.lang.Object
-
- liquibase.statement.AbstractSqlStatement
-
- liquibase.statement.core.AddUniqueConstraintStatement
-
- All Implemented Interfaces:
SqlStatement
public class AddUniqueConstraintStatement extends AbstractSqlStatement
-
-
Field Summary
-
Fields inherited from interface liquibase.statement.SqlStatement
EMPTY_SQL_STATEMENT
-
-
Constructor Summary
Constructors Constructor Description AddUniqueConstraintStatement(String catalogName, String schemaName, String tableName, ColumnConfig[] columns, String constraintName)
-
Method Summary
-
Methods inherited from class liquibase.statement.AbstractSqlStatement
continueOnError, setContinueOnError, skipOnUnsupported
-
-
-
-
Constructor Detail
-
AddUniqueConstraintStatement
public AddUniqueConstraintStatement(String catalogName, String schemaName, String tableName, ColumnConfig[] columns, String constraintName)
-
-
Method Detail
-
getCatalogName
public String getCatalogName()
-
getSchemaName
public String getSchemaName()
-
getTableName
public String getTableName()
-
getColumns
public ColumnConfig[] getColumns()
-
getColumnNames
public String getColumnNames()
-
getConstraintName
public String getConstraintName()
-
getTablespace
public String getTablespace()
-
setTablespace
public AddUniqueConstraintStatement setTablespace(String tablespace)
-
isDeferrable
public boolean isDeferrable()
-
setDeferrable
public AddUniqueConstraintStatement setDeferrable(boolean deferrable)
-
isInitiallyDeferred
public boolean isInitiallyDeferred()
-
setInitiallyDeferred
public AddUniqueConstraintStatement setInitiallyDeferred(boolean initiallyDeferred)
-
isDisabled
public boolean isDisabled()
-
setDisabled
public AddUniqueConstraintStatement setDisabled(boolean disabled)
-
setClustered
public AddUniqueConstraintStatement setClustered(boolean clustered)
-
isClustered
public boolean isClustered()
-
getForIndexName
public String getForIndexName()
-
setForIndexName
public void setForIndexName(String forIndexName)
-
getForIndexSchemaName
public String getForIndexSchemaName()
-
setForIndexSchemaName
public void setForIndexSchemaName(String forIndexSchemaName)
-
getForIndexCatalogName
public String getForIndexCatalogName()
-
setForIndexCatalogName
public void setForIndexCatalogName(String forIndexCatalogName)
-
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
public AddUniqueConstraintStatement setShouldValidate(boolean shouldValidate)
- 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.
-
-