Top Fields Constructors Methods
liquibase.statement.core

public Class AddPrimaryKeyStatement

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 String
private String
private String
private final String
private boolean
private final String
private String

Constructor Summary

AccessConstructor and Description
public
AddPrimaryKeyStatement(String catalogName, String schemaName, String tableName, String columnNames, String constraintName)
Deprecated

public
AddPrimaryKeyStatement(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 AddPrimaryKeyStatement
setClustered(Boolean clustered)

public void
setForIndexCatalogName(String forIndexCatalogName)

public void
setForIndexName(String forIndexName)

public void
setForIndexSchemaName(String forIndexSchemaName)

public AddPrimaryKeyStatement
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 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.
shouldValidate
)

public AddPrimaryKeyStatement
setTablespace(String tablespace)

public boolean

Returns:

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

The VALIDATE keyword defines whether a primary key constraint on a column in a table should be checked if it refers to a valid row 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
forIndexCatalogNameback to summary
private String forIndexCatalogName
forIndexNameback to summary
private String forIndexName
forIndexSchemaNameback to summary
private String forIndexSchemaName
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

AddPrimaryKeyStatementback to summary
public AddPrimaryKeyStatement(String catalogName, String schemaName, String tableName, String columnNames, String constraintName)

Deprecated

AddPrimaryKeyStatementback to summary
public AddPrimaryKeyStatement(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()
setClusteredback to summary
public AddPrimaryKeyStatement setClustered(Boolean clustered)
setForIndexCatalogNameback to summary
public void setForIndexCatalogName(String forIndexCatalogName)
setForIndexNameback to summary
public void setForIndexName(String forIndexName)
setForIndexSchemaNameback to summary
public void setForIndexSchemaName(String forIndexSchemaName)
setShouldValidateback to summary
public AddPrimaryKeyStatement 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 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.

setTablespaceback to summary
public AddPrimaryKeyStatement setTablespace(String tablespace)
shouldValidateback to summary
public boolean shouldValidate()

The VALIDATE keyword defines whether a primary key constraint on a column in a table should be checked if it refers to a valid row or not.

Returns:boolean

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