Class Column

All Implemented Interfaces:
Comparable, LiquibaseSerializable, DatabaseObject
Direct Known Subclasses:
LiquibaseColumn

public class Column extends AbstractDatabaseObject
  • Constructor Details

  • Method Details

    • isForIndex

      public boolean isForIndex()
    • setForIndex

      public void setForIndex(boolean forIndex)
    • getRelation

      public Relation getRelation()
    • getContainingObjects

      public DatabaseObject[] getContainingObjects()
    • setRelation

      public Column setRelation(Relation relation)
    • 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).
    • setName

      public Column setName(String name, boolean computed)
    • getComputed

      public Boolean getComputed()
    • setComputed

      public Column setComputed(Boolean computed)
    • isNullable

      public Boolean isNullable()
    • setNullable

      public Column setNullable(Boolean nullable)
    • getType

      public DataType getType()
    • setType

      public Column setType(DataType type)
    • getDefaultValue

      public Object getDefaultValue()
    • setDefaultValue

      public Column setDefaultValue(Object defaultValue)
    • 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()
    • setDescending

      public Column setDescending(Boolean descending)
    • 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

      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()
      Returns false for Nor null constraints created with ENABLE NOVALIDATE mode, otherwise returns true.
      Returns:
      true if validation is required for nullable constraints, false otherwise
    • toString

      public String toString(boolean includeRelation)
    • toString

      public String toString()
      Overrides:
      toString in class AbstractDatabaseObject
    • compareTo

      public int compareTo(Object other)
      Specified by:
      compareTo in interface Comparable
      Overrides:
      compareTo in class AbstractDatabaseObject
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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()
    • setRemarks

      public Column setRemarks(String remarks)
    • fromName

      public static Column fromName(String columnName)
    • getOrder

      public Integer getOrder()
    • setOrder

      public Column setOrder(Integer order)
    • arrayFromNames

      public static Column[] arrayFromNames(String columnNames)
    • listFromNames

      public static List<Column> listFromNames(String columnNames)
    • load

      public void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException
      Specified by:
      load in interface LiquibaseSerializable
      Overrides:
      load in class AbstractDatabaseObject
      Throws:
      ParsedNodeException
    • getSerializableFields

      public Set<String> getSerializableFields()
      Specified by:
      getSerializableFields in interface LiquibaseSerializable
      Overrides:
      getSerializableFields in class AbstractDatabaseObject