toolkit.db.queryoptimization
Class ColumnInfo

java.lang.Object
  extended by toolkit.db.queryoptimization.ColumnInfo

public class ColumnInfo
extends java.lang.Object

Interface ColumnInfo wraps column information, such as mapping name and column index in the sql statement.


Constructor Summary
ColumnInfo(java.lang.String sMappingName, int iColumnIndex)
          Constructs a ColumnInfo with specified parameters.
 
Method Summary
 int getColumnIndex()
          Gets the index of where this column should appear in Select clause of the sql string.
 java.lang.String getMappingName()
          Gets the mapping name of the column defined in a catalog file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnInfo

public ColumnInfo(java.lang.String sMappingName,
                  int iColumnIndex)
Constructs a ColumnInfo with specified parameters.

Parameters:
sMappingName - The mapping name of the column.
iColumnIndex - The index of where this column should appear in Select clause.
Method Detail

getMappingName

public java.lang.String getMappingName()
Gets the mapping name of the column defined in a catalog file.

Returns:
the mapping name of the column.

getColumnIndex

public int getColumnIndex()
Gets the index of where this column should appear in Select clause of the sql string. 1 means the first one, 2 means the second one, etc. -1 means uncertain and it should be decided by the real resultset meta data. It may appear for customized sql mode and JReport cannot parse out the select and from clause.

Returns:
the index of where this column should appear in Select clause.