org.axiondb

Class ColumnIdentifier

public class ColumnIdentifier extends BaseSelectable implements Selectable

An identifier for a column.

Column names and aliases always stored (and returned) in upper case.

Version: $Revision: 1.25 $ $Date: 2006/01/10 21:02:37 $

Author: Rodney Waldhoff Chuck Burdick Ahimanikya Satapathy

Constructor Summary
ColumnIdentifier(String column)
ColumnIdentifier(TableIdentifier table, String columnName)
ColumnIdentifier(TableIdentifier table, String columnName, String columnAlias)
ColumnIdentifier(TableIdentifier table, String columnName, String columnAlias, DataType type)
Method Summary
booleanequals(Object otherobject)
Returns true iff otherobject is a ColumnIdentifier whose name, table identifier, and alias are equal to mine.
Objectevaluate(RowDecorator row)
Returns the value of the column I identify within the given row .
ColumnIdentifiergetCanonicalIdentifier()
DataTypegetDataType()
Returns my DataType, if any.
StringgetTableAlias()
Returns the alias name of my table or null.
TableIdentifiergetTableIdentifier()
Returns my table identifier, if any.
StringgetTableName()
Returns the name of my table or null.
inthashCode()
Returns a hash code in keeping with the standard Object#equals equals/ Object#hashCode hashCodecontract.
voidsetDataType(DataType type)
Sets my DataType, if any.
voidsetName(String column)
Sets the name of this column, and the name of my table if the given name includes " .
voidsetTableIdentifier(TableIdentifier table)
Sets my table identifier, if any.
StringtoString()
Returns a String representation of me, suitable for debugging output.

Constructor Detail

ColumnIdentifier

public ColumnIdentifier(String column)

Parameters: column the local name of my column

ColumnIdentifier

public ColumnIdentifier(TableIdentifier table, String columnName)

Parameters: table my table, which may be null column my column

ColumnIdentifier

public ColumnIdentifier(TableIdentifier table, String columnName, String columnAlias)

Parameters: table my table, which may be null column my column columnAlias the alias for my column, which may be null

ColumnIdentifier

public ColumnIdentifier(TableIdentifier table, String columnName, String columnAlias, DataType type)

Parameters: table my table, which may be null column my column columnAlias the alias for my column, which may be null type the DataTypeof my column, which may be null

Method Detail

equals

public boolean equals(Object otherobject)
Returns true iff otherobject is a ColumnIdentifier whose name, table identifier, and alias are equal to mine.

evaluate

public Object evaluate(RowDecorator row)
Returns the value of the column I identify within the given row .

getCanonicalIdentifier

public ColumnIdentifier getCanonicalIdentifier()

getDataType

public final DataType getDataType()
Returns my DataType, if any.

getTableAlias

public final String getTableAlias()
Returns the alias name of my table or null. Unlike getTableIdentifier().getTableAlias() this method will return null when I don't have a table identifier.

getTableIdentifier

public final TableIdentifier getTableIdentifier()
Returns my table identifier, if any.

getTableName

public final String getTableName()
Returns the name of my table or null. Unlike getTableIdentifier().getTableName() this method will return null when I don't have a table identifier.

hashCode

public int hashCode()
Returns a hash code in keeping with the standard Object#equals equals/ Object#hashCode hashCodecontract.

setDataType

public void setDataType(DataType type)
Sets my DataType, if any.

setName

public void setName(String column)
Sets the name of this column, and the name of my table if the given name includes " .".

setTableIdentifier

public void setTableIdentifier(TableIdentifier table)
Sets my table identifier, if any.

toString

public String toString()
Returns a String representation of me, suitable for debugging output.