Top Fields Constructors Methods
liquibase.statement.core

public Class AddUniqueConstraintStatement

extends AbstractSqlStatement
Class Inheritance
Imports
liquibase.change.ColumnConfig, liquibase.statement.AbstractSqlStatement, liquibase.util.StringUtil

Field Summary

Modifier and TypeField and Description
private final String
private boolean
private final ColumnConfig[]
private final String
private boolean
private boolean
private String
private String
private String
private boolean
private final String
private boolean
private final String
private String

Constructor Summary

AccessConstructor and Description
public
AddUniqueConstraintStatement(String catalogName, String schemaName, String tableName, ColumnConfig[] columns, String constraintName)

Method Summary

Modifier and TypeMethod and Description
public String
public String
public ColumnConfig[]
public String
public String
public String
public String
public String
public String
public String
public boolean
public boolean
public boolean
public boolean
public AddUniqueConstraintStatement
setClustered(boolean clustered)

public AddUniqueConstraintStatement
setDeferrable(boolean deferrable)

public AddUniqueConstraintStatement
setDisabled(boolean disabled)

public void
setForIndexCatalogName(String forIndexCatalogName)

public void
setForIndexName(String forIndexName)

public void
setForIndexSchemaName(String forIndexSchemaName)

public AddUniqueConstraintStatement
setInitiallyDeferred(boolean initiallyDeferred)

public AddUniqueConstraintStatement
setShouldValidate(boolean
- 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.
shouldValidate
)

public AddUniqueConstraintStatement
setTablespace(String tablespace)

public boolean

Returns:

true if ENABLE VALIDATE (this is the default), or false if ENABLE NOVALIDATE.
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.

Inherited from liquibase.statement.AbstractSqlStatement:
continueOnErrorsetContinueOnErrorskipOnUnsupported

Field Detail

catalogNameback to summary
private final String catalogName
clusteredback to summary
private boolean clustered
columnsback to summary
private final ColumnConfig[] columns
constraintNameback to summary
private final String constraintName
deferrableback to summary
private boolean deferrable
disabledback to summary
private boolean disabled
forIndexCatalogNameback to summary
private String forIndexCatalogName
forIndexNameback to summary
private String forIndexName
forIndexSchemaNameback to summary
private String forIndexSchemaName
initiallyDeferredback to summary
private boolean initiallyDeferred
schemaNameback to summary
private final String schemaName
shouldValidateback to summary
private boolean shouldValidate
tableNameback to summary
private final String tableName
tablespaceback to summary
private String tablespace

Constructor Detail

AddUniqueConstraintStatementback to summary
public AddUniqueConstraintStatement(String catalogName, String schemaName, String tableName, ColumnConfig[] columns, String constraintName)

Method Detail

getCatalogNameback to summary
public String getCatalogName()
getColumnNamesback to summary
public String getColumnNames()
getColumnsback to summary
public ColumnConfig[] getColumns()
getConstraintNameback to summary
public String getConstraintName()
getForIndexCatalogNameback to summary
public String getForIndexCatalogName()
getForIndexNameback to summary
public String getForIndexName()
getForIndexSchemaNameback to summary
public String getForIndexSchemaName()
getSchemaNameback to summary
public String getSchemaName()
getTableNameback to summary
public String getTableName()
getTablespaceback to summary
public String getTablespace()
isClusteredback to summary
public boolean isClustered()
isDeferrableback to summary
public boolean isDeferrable()
isDisabledback to summary
public boolean isDisabled()
isInitiallyDeferredback to summary
public boolean isInitiallyDeferred()
setClusteredback to summary
public AddUniqueConstraintStatement setClustered(boolean clustered)
setDeferrableback to summary
public AddUniqueConstraintStatement setDeferrable(boolean deferrable)
setDisabledback to summary
public AddUniqueConstraintStatement setDisabled(boolean disabled)
setForIndexCatalogNameback to summary
public void setForIndexCatalogName(String forIndexCatalogName)
setForIndexNameback to summary
public void setForIndexName(String forIndexName)
setForIndexSchemaNameback to summary
public void setForIndexSchemaName(String forIndexSchemaName)
setInitiallyDeferredback to summary
public AddUniqueConstraintStatement setInitiallyDeferred(boolean initiallyDeferred)
setShouldValidateback to summary
public AddUniqueConstraintStatement setShouldValidate(boolean shouldValidate)
Parameters
shouldValidate:boolean

- 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.

setTablespaceback to summary
public AddUniqueConstraintStatement setTablespace(String tablespace)
shouldValidateback to summary
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:boolean

true if ENABLE VALIDATE (this is the default), or false if ENABLE NOVALIDATE.