Package liquibase.structure.core
Class Column
java.lang.Object
liquibase.structure.AbstractDatabaseObject
liquibase.structure.core.Column
- All Implemented Interfaces:
Comparable
,LiquibaseSerializable
,DatabaseObject
- Direct Known Subclasses:
LiquibaseColumn
-
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 TypeMethodDescriptionstatic Column[]
arrayFromNames
(String columnNames) int
boolean
static Column
getName()
getOrder()
getType()
boolean
VALIDATE keyword defines whether all constraints on a column in a table should be checked if it refers to a valid row or not.boolean
Returnsfalse
for Nornull
constraints created withENABLE NOVALIDATE
mode, otherwise returnstrue
.int
hashCode()
boolean
boolean
boolean
isDataTypeDifferent
(Column otherColumn) boolean
isDifferent
(Column otherColumn) boolean
boolean
isNullabilityDifferent
(Column otherColumn) listFromNames
(String columnNames) void
load
(ParsedNode parsedNode, ResourceAccessor resourceAccessor) void
setAutoIncrementInformation
(Column.AutoIncrementInformation autoIncrementInformation) setCertainDataType
(boolean certainDataType) setComputed
(Boolean computed) setDefaultValue
(Object defaultValue) setDefaultValueConstraintName
(String defaultValueConstraintName) setDescending
(Boolean descending) void
setForIndex
(boolean forIndex) setIncluded
(Boolean included) Sets the name for the database object.setNullable
(Boolean nullable) setRelation
(Relation relation) setRemarks
(String remarks) setValidateNullable
(Boolean validateNullable) toString()
toString
(boolean includeRelation) Methods inherited from class liquibase.structure.AbstractDatabaseObject
getAttribute, getAttribute, getAttributes, getObjectTypeName, getSerializableFieldNamespace, getSerializableFieldType, getSerializableFieldValue, getSerializedObjectName, getSerializedObjectNamespace, getSnapshotId, serialize, setAttribute, setSnapshotId, shouldIncludeCatalogInSpecification, snapshotByDefault
-
Constructor Details
-
Column
public Column() -
Column
-
Column
-
Column
-
-
Method Details
-
isForIndex
public boolean isForIndex() -
setForIndex
public void setForIndex(boolean forIndex) -
getRelation
-
getContainingObjects
-
setRelation
-
getSchema
-
getName
-
setName
Description copied from interface:DatabaseObject
Sets the name for the database object.- Parameters:
name
- 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).
-
setName
-
getComputed
-
setComputed
-
isNullable
-
setNullable
-
getType
-
setType
-
getDefaultValue
-
setDefaultValue
-
getDefaultValueConstraintName
-
setDefaultValueConstraintName
-
isAutoIncrement
public boolean isAutoIncrement() -
getAutoIncrementInformation
-
setAutoIncrementInformation
-
getDescending
-
getIncluded
-
setIncluded
-
setDescending
-
getValidate
public boolean getValidate()VALIDATE keyword defines whether all constraints on a column in a table should be checked if it refers to a valid row or not.- Returns:
- true if ENABLE VALIDATE (this is the default), or false if ENABLE NOVALIDATE.
-
setValidateNullable
- Parameters:
validateNullable
- - if validateNullable 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 not null constraint - only new data would be checked to see if it complies with the constraint logic. The default state for not null constraint is to have 'ENABLE VALIDATE' set.
-
getValidateNullable
public boolean getValidateNullable()Returnsfalse
for Nornull
constraints created withENABLE NOVALIDATE
mode, otherwise returnstrue
.- Returns:
true
if validation is required for nullable constraints,false
otherwise
-
toString
-
toString
- Overrides:
toString
in classAbstractDatabaseObject
-
compareTo
- Specified by:
compareTo
in interfaceComparable
- Overrides:
compareTo
in classAbstractDatabaseObject
-
equals
-
hashCode
public int hashCode() -
isDataTypeDifferent
-
isNullabilityDifferent
-
isDifferent
-
isCertainDataType
public boolean isCertainDataType() -
setCertainDataType
-
getRemarks
-
setRemarks
-
fromName
-
getOrder
-
setOrder
-
arrayFromNames
-
listFromNames
-
load
public void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException - Specified by:
load
in interfaceLiquibaseSerializable
- Overrides:
load
in classAbstractDatabaseObject
- Throws:
ParsedNodeException
-
getSerializableFields
- Specified by:
getSerializableFields
in interfaceLiquibaseSerializable
- Overrides:
getSerializableFields
in classAbstractDatabaseObject
-