public class ConstraintsConfig extends AbstractLiquibaseSerializable
LiquibaseSerializable.SerializationType
GENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE
Constructor and Description |
---|
ConstraintsConfig() |
Modifier and Type | Method and Description |
---|---|
String |
getCheckConstraint()
Returns the check constraint to use on this column.
|
String |
getForeignKeyName()
Returns the name to use for the columns foreign key constraint.
|
String |
getNotNullConstraintName()
If
isNullable() is 'false' and database supports named not null constraints |
String |
getPrimaryKeyName()
Returns the name to use for the primary key constraint.
|
String |
getPrimaryKeyTablespace()
Returns the tablespace to use for the defined primary key.
|
String |
getReferencedColumnNames() |
String |
getReferencedTableCatalogName() |
String |
getReferencedTableName() |
String |
getReferencedTableSchemaName() |
String |
getReferences()
Returns the "references" clause to use for the foreign key.
|
String |
getSerializedObjectName() |
String |
getSerializedObjectNamespace() |
String |
getUniqueConstraintName()
Returns the name to use for the unique constraint.
|
Boolean |
isDeferrable()
Returns if a foreign key defined for this column should deferrable.
|
Boolean |
isDeleteCascade()
Returns if a foreign key defined for this column should cascade deletes.
|
Boolean |
isInitiallyDeferred()
Returns if a foreign key defined for this column should be "initially deferred".
|
Boolean |
isNullable()
Returns if the column should be nullable.
|
Boolean |
isPrimaryKey()
Returns true if the column should be part of the primary key.
|
Boolean |
isUnique()
Returns if the column is part of a unique constraint.
|
void |
load(ParsedNode parsedNode,
ResourceAccessor resourceAccessor) |
ConstraintsConfig |
setCheckConstraint(String checkConstraint) |
ConstraintsConfig |
setDeferrable(Boolean deferrable) |
ConstraintsConfig |
setDeferrable(String deferrable)
Set the deferrable parameter based on the passed string.
|
ConstraintsConfig |
setDeleteCascade(Boolean deleteCascade) |
ConstraintsConfig |
setDeleteCascade(String deleteCascade)
Set the deleteCascade parameter based on the passed string.
|
ConstraintsConfig |
setForeignKeyName(String foreignKeyName) |
ConstraintsConfig |
setInitiallyDeferred(Boolean initiallyDeferred) |
ConstraintsConfig |
setInitiallyDeferred(String initiallyDeferred)
Set the initiallyDeferred parameter based on the passed string.
|
ConstraintsConfig |
setNotNullConstraintName(String notNullConstraintName) |
ConstraintsConfig |
setNullable(Boolean nullable) |
ConstraintsConfig |
setNullable(String nullable)
Set the nullable parameter based on the passed string.
|
ConstraintsConfig |
setPrimaryKey(Boolean primaryKey) |
ConstraintsConfig |
setPrimaryKey(String primaryKey)
Set the primaryKey parameter based on the passed string.
|
ConstraintsConfig |
setPrimaryKeyName(String primaryKeyName) |
ConstraintsConfig |
setPrimaryKeyTablespace(String primaryKeyTablespace) |
void |
setReferencedColumnNames(String referencedColumnNames) |
void |
setReferencedTableCatalogName(String referencedTableCatalogName) |
void |
setReferencedTableName(String referencedTableName) |
void |
setReferencedTableSchemaName(String referencedTableSchemaName) |
ConstraintsConfig |
setReferences(String references) |
ConstraintsConfig |
setShouldValidateForeignKey(Boolean validateForeignKey) |
ConstraintsConfig |
setShouldValidateForeignKey(String validateForeignKey)
Set the shouldValidate field based on the passed string.
|
ConstraintsConfig |
setShouldValidateNullable(Boolean validateNullable) |
ConstraintsConfig |
setShouldValidateNullable(String validateNullable)
Set the shouldValidate field based on the passed string.
|
ConstraintsConfig |
setShouldValidatePrimaryKey(Boolean validatePrimaryKey) |
ConstraintsConfig |
setShouldValidatePrimaryKey(String validatePrimaryKey)
Set the shouldValidate field based on the passed string.
|
ConstraintsConfig |
setShouldValidateUnique(Boolean validateUnique) |
ConstraintsConfig |
setShouldValidateUnique(String validateUnique)
Set the shouldValidate field based on the passed string.
|
ConstraintsConfig |
setUnique(Boolean unique) |
ConstraintsConfig |
setUnique(String unique)
Set the unique parameter based on the passed string.
|
ConstraintsConfig |
setUniqueConstraintName(String uniqueConstraintName) |
Boolean |
shouldValidateForeignKey()
Returns whether a ForeignKeyConst defined for this column should validate.
|
Boolean |
shouldValidateNullable()
Returns whether a NotNullConst defined for this column should validate.
|
Boolean |
shouldValidatePrimaryKey()
Returns whether a PrimaryKeyConst defined for this column should validate.
|
Boolean |
shouldValidateUnique()
Returns whether a UniqueConst defined for this column should validate.
|
convertEscaped, getSerializableFieldDataTypeClass, getSerializableFieldDataTypeClassParameters, getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, serialize, serializeValue, setSerializableFieldValue, shouldAutoLoad
public Boolean isNullable()
public ConstraintsConfig setNullable(Boolean nullable)
public ConstraintsConfig setNullable(String nullable)
UnexpectedLiquibaseException
if a different value is passedpublic String getNotNullConstraintName()
isNullable()
is 'false' and database supports named not null constraintsgetUniqueConstraintName()
public ConstraintsConfig setNotNullConstraintName(String notNullConstraintName)
public Boolean isPrimaryKey()
public ConstraintsConfig setPrimaryKey(Boolean primaryKey)
public ConstraintsConfig setPrimaryKey(String primaryKey)
UnexpectedLiquibaseException
if a different value is passedpublic String getPrimaryKeyName()
public ConstraintsConfig setPrimaryKeyName(String primaryKeyName)
public String getReferences()
public ConstraintsConfig setReferences(String references)
public Boolean isUnique()
public ConstraintsConfig setUnique(Boolean unique)
public ConstraintsConfig setUnique(String unique)
UnexpectedLiquibaseException
if a different value is passedpublic String getUniqueConstraintName()
public ConstraintsConfig setUniqueConstraintName(String uniqueConstraintName)
public String getCheckConstraint()
public ConstraintsConfig setCheckConstraint(String checkConstraint)
public Boolean isDeleteCascade()
public ConstraintsConfig setDeleteCascade(Boolean deleteCascade)
public ConstraintsConfig setDeleteCascade(String deleteCascade)
UnexpectedLiquibaseException
if a different value is passedpublic String getForeignKeyName()
public ConstraintsConfig setForeignKeyName(String foreignKeyName)
public Boolean isInitiallyDeferred()
public ConstraintsConfig setInitiallyDeferred(Boolean initiallyDeferred)
public ConstraintsConfig setInitiallyDeferred(String initiallyDeferred)
UnexpectedLiquibaseException
if a different value is passedpublic Boolean isDeferrable()
public ConstraintsConfig setDeferrable(Boolean deferrable)
public ConstraintsConfig setShouldValidateNullable(String validateNullable)
UnexpectedLiquibaseException
if an invalid value is passedpublic Boolean shouldValidateNullable()
public ConstraintsConfig setShouldValidateNullable(Boolean validateNullable)
public ConstraintsConfig setShouldValidateUnique(String validateUnique)
UnexpectedLiquibaseException
if an invalid value is passedpublic Boolean shouldValidateUnique()
public ConstraintsConfig setShouldValidateUnique(Boolean validateUnique)
public ConstraintsConfig setShouldValidatePrimaryKey(String validatePrimaryKey)
UnexpectedLiquibaseException
if an invalid value is passedpublic Boolean shouldValidatePrimaryKey()
public ConstraintsConfig setShouldValidatePrimaryKey(Boolean validatePrimaryKey)
public ConstraintsConfig setShouldValidateForeignKey(String validateForeignKey)
UnexpectedLiquibaseException
if an invalid value is passedpublic Boolean shouldValidateForeignKey()
public ConstraintsConfig setShouldValidateForeignKey(Boolean validateForeignKey)
public ConstraintsConfig setDeferrable(String deferrable)
UnexpectedLiquibaseException
if a different value is passedpublic String getPrimaryKeyTablespace()
public ConstraintsConfig setPrimaryKeyTablespace(String primaryKeyTablespace)
public String getReferencedTableCatalogName()
public void setReferencedTableCatalogName(String referencedTableCatalogName)
public String getReferencedTableSchemaName()
public void setReferencedTableSchemaName(String referencedTableSchemaName)
public String getReferencedTableName()
public void setReferencedTableName(String referencedTableName)
public String getReferencedColumnNames()
public void setReferencedColumnNames(String referencedColumnNames)
public String getSerializedObjectName()
public String getSerializedObjectNamespace()
public void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException
load
in interface LiquibaseSerializable
load
in class AbstractLiquibaseSerializable
ParsedNodeException
Copyright © 2019 Liquibase.org. All rights reserved.