Class AbstractColumn

java.lang.Object
org.pgcodekeeper.core.schema.PgStatement
org.pgcodekeeper.core.schema.AbstractColumn
All Implemented Interfaces:
IHashable, ISearchPath, IStatement
Direct Known Subclasses:
ChColumn, MsColumn, PgColumn

public abstract class AbstractColumn extends PgStatement implements ISearchPath
Abstract base class for database column definitions. Provides common functionality for columns across different database types.
  • Method Details

    • getStatementType

      public DbObjType getStatementType()
      Description copied from interface: IStatement
      Gets the type of this database object.
      Specified by:
      getStatementType in interface IStatement
      Returns:
      the database object type
    • setDefaultValue

      public void setDefaultValue(String defaultValue)
    • getDefaultValue

      public String getDefaultValue()
    • getFullDefinition

      public abstract String getFullDefinition()
      Returns the complete column definition including type, constraints, and other attributes.
      Returns:
      the full column definition as SQL string
    • setNullValue

      public void setNullValue(boolean nullValue)
    • getNullValue

      public boolean getNullValue()
    • setType

      public void setType(String type)
    • getType

      public String getType()
    • setCollation

      public void setCollation(String collation)
    • getCollation

      public String getCollation()
    • getLocation

      public PgObjLocation getLocation()
      Description copied from class: PgStatement
      Gets the location information for this statement.
      Overrides:
      getLocation in class PgStatement
      Returns:
      the location where this statement is defined
    • compare

      public boolean compare(PgStatement obj)
      Description copied from class: PgStatement
      This method does not account for nested child PgStatements. Shallow version of PgStatement.equals(Object)
      Overrides:
      compare in class PgStatement
    • computeHash

      public void computeHash(Hasher hasher)
      Description copied from interface: IHashable
      Computes the hash of the implementing object using the provided hasher. The implementation should call appropriate put methods on the hasher for all fields that should contribute to the hash value.
      Specified by:
      computeHash in interface IHashable
      Parameters:
      hasher - the hasher instance to use for hash computation
    • shallowCopy

      public AbstractColumn shallowCopy()
      Description copied from class: PgStatement
      Copies all object properties into a new object and leaves all its children empty.
      Specified by:
      shallowCopy in class PgStatement
      Returns:
      shallow copy of a DB object.
    • getContainingSchema

      public AbstractSchema getContainingSchema()
      Description copied from interface: ISearchPath
      Gets the schema that contains this object.
      Specified by:
      getContainingSchema in interface ISearchPath
      Returns:
      the containing schema
    • isSubElement

      public boolean isSubElement()
      Description copied from class: PgStatement
      Checks if this statement is a sub-element of another statement.
      Overrides:
      isSubElement in class PgStatement
      Returns:
      true if this is a sub-element