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
public class Column extends AbstractDatabaseObject
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Column.AutoIncrementInformation
-
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
-
-
Method Summary
-
Methods inherited from class liquibase.structure.AbstractDatabaseObject
getAttribute, getAttribute, getAttributes, getObjectTypeName, getSerializableFieldNamespace, getSerializableFieldType, getSerializableFieldValue, getSerializedObjectName, getSerializedObjectNamespace, getSnapshotId, serialize, setAttribute, setSnapshotId, shouldIncludeCatalogInSpecification, snapshotByDefault
-
-
-
-
Method Detail
-
isForIndex
public boolean isForIndex()
-
setForIndex
public void setForIndex(boolean forIndex)
-
getRelation
public Relation getRelation()
-
getContainingObjects
public DatabaseObject[] getContainingObjects()
-
getSchema
public Schema getSchema()
-
getName
public String getName()
-
setName
public Column setName(String name)
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).
-
getComputed
public Boolean getComputed()
-
isNullable
public Boolean isNullable()
-
getType
public DataType getType()
-
getDefaultValue
public Object getDefaultValue()
-
getDefaultValueConstraintName
public String getDefaultValueConstraintName()
-
setDefaultValueConstraintName
public Column setDefaultValueConstraintName(String defaultValueConstraintName)
-
isAutoIncrement
public boolean isAutoIncrement()
-
getAutoIncrementInformation
public Column.AutoIncrementInformation getAutoIncrementInformation()
-
setAutoIncrementInformation
public void setAutoIncrementInformation(Column.AutoIncrementInformation autoIncrementInformation)
-
getDescending
public Boolean getDescending()
-
getValidate
public boolean getValidate()
VALIDATE keyword defines whether a 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
public Column setValidateNullable(Boolean validateNullable)
- 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
public String toString(boolean includeRelation)
-
toString
public String toString()
- Overrides:
toString
in classAbstractDatabaseObject
-
compareTo
public int compareTo(Object other)
- Specified by:
compareTo
in interfaceComparable
- Overrides:
compareTo
in classAbstractDatabaseObject
-
isDataTypeDifferent
public boolean isDataTypeDifferent(Column otherColumn)
-
isNullabilityDifferent
public boolean isNullabilityDifferent(Column otherColumn)
-
isDifferent
public boolean isDifferent(Column otherColumn)
-
isCertainDataType
public boolean isCertainDataType()
-
setCertainDataType
public Column setCertainDataType(boolean certainDataType)
-
getRemarks
public String getRemarks()
-
getOrder
public Integer getOrder()
-
load
public void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException
- Specified by:
load
in interfaceLiquibaseSerializable
- Overrides:
load
in classAbstractDatabaseObject
- Throws:
ParsedNodeException
-
getSerializableFields
public Set<String> getSerializableFields()
- Specified by:
getSerializableFields
in interfaceLiquibaseSerializable
- Overrides:
getSerializableFields
in classAbstractDatabaseObject
-
-