Class Column

All Implemented Interfaces:
Serializable, Expression, Model, ASTNodeAccess, MultiPartName

public class Column extends ASTNodeAccessImpl implements Expression, MultiPartName
A column. It can have the table name it belongs to.
See Also:
  • Field Details

    • table

      private Table table
    • columnName

      private String columnName
    • commentText

      private String commentText
    • arrayConstructor

      private ArrayConstructor arrayConstructor
  • Constructor Details

    • Column

      public Column()
    • Column

      public Column(Table table, String columnName)
    • Column

      public Column(List<String> nameParts)
    • Column

      public Column(String columnName)
  • Method Details

    • getArrayConstructor

      public ArrayConstructor getArrayConstructor()
    • setArrayConstructor

      public Column setArrayConstructor(ArrayConstructor arrayConstructor)
    • getTable

      public Table getTable()
      Retrieve the information regarding the Table this Column does belong to, if any can be inferred.

      The inference is based only on local information, and not on the whole SQL command. For example, consider the following query:

        SELECT x FROM Foo
       
      Given the Column called x, this method would return null, and not the info about the table Foo. On the other hand, consider:
        SELECT t.x FROM Foo t
       
      Here, we will get a Table object for a table called t. But because the inference is local, such object will not know that t is just an alias for Foo.
      Returns:
      an instance of Table representing the table this column does belong to, if it can be inferred. Can be null.
    • setTable

      public void setTable(Table table)
    • getColumnName

      public String getColumnName()
    • setColumnName

      public void setColumnName(String string)
    • getFullyQualifiedName

      public String getFullyQualifiedName()
      Specified by:
      getFullyQualifiedName in interface MultiPartName
    • getFullyQualifiedName

      public String getFullyQualifiedName(boolean aliases)
    • getName

      @Deprecated public String getName(boolean aliases)
      Deprecated.
    • accept

      public void accept(ExpressionVisitor expressionVisitor)
      Specified by:
      accept in interface Expression
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • withTable

      public Column withTable(Table table)
    • withColumnName

      public Column withColumnName(String columnName)
    • withCommentText

      public Column withCommentText(String commentText)
    • setCommentText

      public void setCommentText(String commentText)
    • getCommentText

      public String getCommentText()