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 ClassesNested classes/interfaces inherited from interface liquibase.serializer.LiquibaseSerializable
LiquibaseSerializable.SerializationType -
Field Summary
Fields inherited from class liquibase.structure.AbstractDatabaseObject
CURLY_BRACKET_PATTERNFields inherited from interface liquibase.serializer.LiquibaseSerializable
GENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Column[]arrayFromNames(String columnNames) intbooleanstatic ColumngetName()getOrder()getType()booleanVALIDATE keyword defines whether all constraints on a column in a table should be checked if it refers to a valid row or not.booleanReturnsfalsefor Nornullconstraints created withENABLE NOVALIDATEmode, otherwise returnstrue.inthashCode()booleanbooleanbooleanisDataTypeDifferent(Column otherColumn) booleanisDifferent(Column otherColumn) booleanbooleanisNullabilityDifferent(Column otherColumn) listFromNames(String columnNames) voidload(ParsedNode parsedNode, ResourceAccessor resourceAccessor) voidsetAutoIncrementInformation(Column.AutoIncrementInformation autoIncrementInformation) setCertainDataType(boolean certainDataType) setComputed(Boolean computed) setDefaultValue(Object defaultValue) setDefaultValueConstraintName(String defaultValueConstraintName) setDescending(Boolean descending) voidsetForIndex(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:DatabaseObjectSets 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()Returnsfalsefor Nornullconstraints created withENABLE NOVALIDATEmode, otherwise returnstrue.- Returns:
trueif validation is required for nullable constraints,falseotherwise
-
toString
-
toString
- Overrides:
toStringin classAbstractDatabaseObject
-
compareTo
- Specified by:
compareToin interfaceComparable- Overrides:
compareToin 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:
loadin interfaceLiquibaseSerializable- Overrides:
loadin classAbstractDatabaseObject- Throws:
ParsedNodeException
-
getSerializableFields
- Specified by:
getSerializableFieldsin interfaceLiquibaseSerializable- Overrides:
getSerializableFieldsin classAbstractDatabaseObject
-