Class SelectColumn

java.lang.Object
com.j_spaces.jdbc.SelectColumn
All Implemented Interfaces:
Externalizable, Serializable
Direct Known Subclasses:
FunctionCallColumn, OrderColumn, UpdateColumn

public class SelectColumn extends Object implements Externalizable
This class represents a column in a select query.
Author:
Michael Mitrani, 2Train4, 2004
See Also:
  • Constructor Details

  • Method Details

    • createColumnData

      public void createColumnData(AbstractDMLQuery query) throws SQLException
      Throws:
      SQLException
    • hasAlias

      public boolean hasAlias()
    • getAlias

      public String getAlias()
      Gets the column's alias. If no alias was set the column name is returned. If the column is a function column.. the function name is returned. (COUNT(*) etc..)
      Returns:
      The column alias
    • setAlias

      public void setAlias(String alias)
    • setName

      public void setName(String name)
    • getName

      public String getName()
    • isAllColumns

      public boolean isAllColumns()
    • isCount

      public boolean isCount()
      Returns:
      - is this a count function select. This is done this way because group by are not yet supported so if there is a count, then there is nothing else to select.
    • isSum

      public boolean isSum()
      Returns:
      - is this a sum function select. This is done this way because group by are not yet supported so if there is a sum, then there is nothing else to select.
    • setCount

      public void setCount(boolean isCount)
      if this is a count function
    • isUid

      public boolean isUid()
      Returns:
      - is this a UID function select.
    • setValue

      public void setValue(Object initValues)
      if have default value function
    • getValue

      public Object getValue()
    • isInitValues

      public boolean isInitValues()
      if have default value function
    • setSum

      public void setSum(boolean isSum)
      if this is a sum function
    • isFunction

      public boolean isFunction()
    • isAggregatedFunction

      public boolean isAggregatedFunction()
    • isDynamic

      public boolean isDynamic()
    • equals

      public boolean equals(Object ob)
      Overrides:
      equals in class Object
    • toString

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

      public void setFunctionName(String funcName)
    • getFunctionName

      public String getFunctionName()
    • setVisible

      public void setVisible(boolean flag)
    • isVisible

      public boolean isVisible()
    • getProjectedIndex

      public int getProjectedIndex()
      Returns:
      Returns the projectedIndex.
    • setProjectedIndex

      public void setProjectedIndex(int projectedIndex)
      Parameters:
      projectedIndex - The projectedIndex to set.
    • getColumnTableData

      public QueryTableData getColumnTableData()
    • getColumnIndexInTable

      public int getColumnIndexInTable()
    • getColumnData

      public QueryColumnData getColumnData()
    • getFieldValue

      public Object getFieldValue(IEntryPacket entry)
    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Specified by:
      writeExternal in interface Externalizable
      Throws:
      IOException
    • readExternal

      public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
      Specified by:
      readExternal in interface Externalizable
      Throws:
      IOException
      ClassNotFoundException