Top Inners Fields Constructors Methods
liquibase.structure.core

public Class Column

extends AbstractDatabaseObject
Class Inheritance
Known Direct Subclasses
liquibase.changelog.column.LiquibaseColumn
Imports
liquibase.GlobalConfiguration, .Scope, liquibase.change.ColumnConfig, .ConstraintsConfig, liquibase.configuration.LiquibaseConfiguration, liquibase.parser.core.ParsedNode, .ParsedNodeException, liquibase.resource.ResourceAccessor, liquibase.serializer.AbstractLiquibaseSerializable, liquibase.structure.AbstractDatabaseObject, .DatabaseObject, liquibase.util.BooleanUtil, .StringUtil, java.math.BigInteger, java.util.Arrays, .List, .Set

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private Boolean
private Boolean
private boolean
private String
Inherited from liquibase.structure.AbstractDatabaseObject:
CURLY_BRACKET_PATTERN

Constructor Summary

AccessConstructor and Description
public
public
Column(String columnName)

public
Column(Class<? extends Relation> relationType, String catalogName, String schemaName, String tableName, String columnName)

public
Column(ColumnConfig columnConfig)

Method Summary

Modifier and TypeMethod and Description
public static Column[]
arrayFromNames(String columnNames)

public int
compareTo(Object
the object to be compared.
other
)

Overrides liquibase.structure.AbstractDatabaseObject.compareTo.

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public boolean
equals(Object
the reference object with which to compare.
o
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public static Column
fromName(String columnName)

public Column.AutoIncrementInformation
public Boolean
public DatabaseObject[]
public Object
public String
public Boolean
public String
public Integer
public Relation
public String
public Schema
public Set<String>
public DataType
public boolean

Returns:

true if ENABLE VALIDATE (this is the default), or false if ENABLE NOVALIDATE.
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.

public boolean

Returns:

true if validation is required for nullable constraints, false otherwise
getValidateNullable
()

Returns false for Nor null constraints created with ENABLE NOVALIDATE mode, otherwise returns true.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public boolean
public boolean
public boolean
public boolean
isDifferent(Column otherColumn)

public boolean
public boolean
public Boolean
private boolean
public static List<Column>
listFromNames(String columnNames)

public void
public void
public Column
setCertainDataType(boolean certainDataType)

public Column
setComputed(Boolean computed)

public Column
setDefaultValue(Object defaultValue)

public Column
setDefaultValueConstraintName(String defaultValueConstraintName)

public Column
setDescending(Boolean descending)

public void
setForIndex(boolean forIndex)

public Column
setName(String
the new name for the database object
name
)

Implements liquibase.structure.DatabaseObject.setName.

Sets the name for the database object.

public Column
setName(String name, boolean computed)

public Column
setNullable(Boolean nullable)

public Column
public Column
public Column
setRemarks(String remarks)

public Column
public Column
setValidateNullable(Boolean
- 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.
validateNullable
)

public String
toString(boolean includeRelation)

public String
toString()

Overrides liquibase.structure.AbstractDatabaseObject.toString.

Returns a string representation of the object.

Inherited from liquibase.structure.AbstractDatabaseObject:
getAttributegetAttributegetAttributesgetObjectTypeNamegetSerializableFieldNamespacegetSerializableFieldTypegetSerializableFieldValuegetSerializedObjectNamegetSerializedObjectNamespacegetSnapshotIdserializesetAttributesetSnapshotIdshouldIncludeCatalogInSpecificationsnapshotByDefault

Field Detail

computedback to summary
private Boolean computed
descendingback to summary
private Boolean descending
forIndexback to summary
private boolean forIndex
nameback to summary
private String name

Constructor Detail

Columnback to summary
public Column()
Columnback to summary
public Column(String columnName)
Columnback to summary
public Column(Class<? extends Relation> relationType, String catalogName, String schemaName, String tableName, String columnName)
Columnback to summary
public Column(ColumnConfig columnConfig)

Method Detail

arrayFromNamesback to summary
public static Column[] arrayFromNames(String columnNames)
compareToback to summary
public int compareTo(Object other)

Overrides liquibase.structure.AbstractDatabaseObject.compareTo.

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
other:Object

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
fromNameback to summary
public static Column fromName(String columnName)
getAutoIncrementInformationback to summary
public Column.AutoIncrementInformation getAutoIncrementInformation()
getComputedback to summary
public Boolean getComputed()
getContainingObjectsback to summary
public DatabaseObject[] getContainingObjects()

Implements liquibase.structure.DatabaseObject.getContainingObjects.

Annotations
@Override
getDefaultValueback to summary
public Object getDefaultValue()
getDefaultValueConstraintNameback to summary
public String getDefaultValueConstraintName()
getDescendingback to summary
public Boolean getDescending()
getNameback to summary
public String getName()

Implements liquibase.structure.DatabaseObject.getName.

Annotations
@Override
getOrderback to summary
public Integer getOrder()
getRelationback to summary
public Relation getRelation()
getRemarksback to summary
public String getRemarks()
getSchemaback to summary
public Schema getSchema()

Implements liquibase.structure.DatabaseObject.getSchema.

Annotations
@Override
getSerializableFieldsback to summary
public Set<String> getSerializableFields()

Overrides liquibase.structure.AbstractDatabaseObject.getSerializableFields.

Implements liquibase.serializer.LiquibaseSerializable.getSerializableFields.

Annotations
@Override
getTypeback to summary
public DataType getType()
getValidateback to summary
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:boolean

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

getValidateNullableback to summary
public boolean getValidateNullable()

Returns false for Nor null constraints created with ENABLE NOVALIDATE mode, otherwise returns true.

Returns:boolean

true if validation is required for nullable constraints, false otherwise

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
isAutoIncrementback to summary
public boolean isAutoIncrement()
isCertainDataTypeback to summary
public boolean isCertainDataType()
isDataTypeDifferentback to summary
public boolean isDataTypeDifferent(Column otherColumn)
isDifferentback to summary
public boolean isDifferent(Column otherColumn)
isForIndexback to summary
public boolean isForIndex()
isNullabilityDifferentback to summary
public boolean isNullabilityDifferent(Column otherColumn)
Annotations
@SuppressWarnings:SimplifiableIfStatement
isNullableback to summary
public Boolean isNullable()
isRealObjectback to summary
private boolean isRealObject()
listFromNamesback to summary
public static List<Column> listFromNames(String columnNames)
loadback to summary
public void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException

Overrides liquibase.structure.AbstractDatabaseObject.load.

Implements liquibase.serializer.LiquibaseSerializable.load.

Annotations
@Override
setAutoIncrementInformationback to summary
public void setAutoIncrementInformation(Column.AutoIncrementInformation autoIncrementInformation)
setCertainDataTypeback to summary
public Column setCertainDataType(boolean certainDataType)
setComputedback to summary
public Column setComputed(Boolean computed)
setDefaultValueback to summary
public Column setDefaultValue(Object defaultValue)
setDefaultValueConstraintNameback to summary
public Column setDefaultValueConstraintName(String defaultValueConstraintName)
setDescendingback to summary
public Column setDescending(Boolean descending)
setForIndexback to summary
public void setForIndex(boolean forIndex)
setNameback to summary
public Column setName(String name)

Implements liquibase.structure.DatabaseObject.setName.

Doc from liquibase.structure.DatabaseObject.setName.

Sets the name for the database object.

Parameters
name:String

the new name for the database object

Returns:Column

a reference to the same object (implementing classes are expected to return a reference to the same object).

Annotations
@Override
setNameback to summary
public Column setName(String name, boolean computed)
setNullableback to summary
public Column setNullable(Boolean nullable)
setOrderback to summary
public Column setOrder(Integer order)
setRelationback to summary
public Column setRelation(Relation relation)
setRemarksback to summary
public Column setRemarks(String remarks)
setTypeback to summary
public Column setType(DataType type)
setValidateNullableback to summary
public Column setValidateNullable(Boolean validateNullable)
Parameters
validateNullable:Boolean

- 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.

toStringback to summary
public String toString(boolean includeRelation)
toStringback to summary
public String toString()

Overrides liquibase.structure.AbstractDatabaseObject.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
liquibase.structure.core back to summary

public Class Column.AutoIncrementInformation

extends AbstractLiquibaseSerializable
Class Inheritance

Field Summary

Modifier and TypeField and Description
private Boolean
private String
private BigInteger
private BigInteger

Constructor Summary

AccessConstructor and Description
public
public
AutoIncrementInformation(Number startWith, Number incrementBy)

Method Summary

Modifier and TypeMethod and Description
public Boolean
public String
public BigInteger
public String
public String
public BigInteger
public void
public void
setDefaultOnNull(Boolean defaultOnNull)

public void
setGenerationType(String generationType)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from liquibase.serializer.AbstractLiquibaseSerializable:
convertEscapedgetSerializableFieldDataTypeClassgetSerializableFieldDataTypeClassParametersgetSerializableFieldNamespacegetSerializableFieldsgetSerializableFieldTypegetSerializableFieldValueserializeserializeValuesetSerializableFieldValueshouldAutoLoad

Field Detail

defaultOnNullback to summary
private Boolean defaultOnNull
generationTypeback to summary
private String generationType
incrementByback to summary
private BigInteger incrementBy
startWithback to summary
private BigInteger startWith

Constructor Detail

AutoIncrementInformationback to summary
public AutoIncrementInformation()
AutoIncrementInformationback to summary
public AutoIncrementInformation(Number startWith, Number incrementBy)

Method Detail

getDefaultOnNullback to summary
public Boolean getDefaultOnNull()
getGenerationTypeback to summary
public String getGenerationType()
getIncrementByback to summary
public BigInteger getIncrementBy()
getSerializedObjectNameback to summary
public String getSerializedObjectName()

Implements liquibase.serializer.LiquibaseSerializable.getSerializedObjectName.

Annotations
@Override
getSerializedObjectNamespaceback to summary
public String getSerializedObjectNamespace()

Implements liquibase.serializer.LiquibaseSerializable.getSerializedObjectNamespace.

Annotations
@Override
getStartWithback to summary
public BigInteger getStartWith()
loadback to summary
public void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException

Overrides liquibase.serializer.AbstractLiquibaseSerializable.load.

Implements liquibase.serializer.LiquibaseSerializable.load.

Annotations
@Override
setDefaultOnNullback to summary
public void setDefaultOnNull(Boolean defaultOnNull)
setGenerationTypeback to summary
public void setGenerationType(String generationType)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override