com.tivoli.twg.engine
Class TWGDbResultSetMetaData

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGDbResultSetMetaData
All Implemented Interfaces:
java.io.Serializable

public class TWGDbResultSetMetaData
extends java.lang.Object
implements java.io.Serializable

The TWGDbResultSetMetaData class contains metat information about a query result set.

See Also:
TWGDbResultSet, Serialized Form

Constructor Summary
protected TWGDbResultSetMetaData(java.util.Hashtable metaData, int mySize)
          Constructor for TWGDbResultSetMetaData
 
Method Summary
 int getColumnCount()
          Get the number of columns in the TWGDbResultSet object.
 int getColumnId(java.lang.String token)
          Map a column token name into column number.
 java.lang.Integer getColumnLength(int columnNumber)
          for character type columns, get the maximum length in characters for the column.
 java.lang.Integer getColumnLength(java.lang.String token)
          For character type columns, get the maximum length in characters for the column.
 java.lang.String getColumnToken(int columnNumber)
          Map a column number into column token name.
 int getColumnType(int columnNumber)
          Get the data type for the column value.
 int getColumnType(java.lang.String token)
          Get the data type for the column value.
 java.lang.String getDisplayColumnName(int columnNumber)
          Get the displayable column title for the column in displays and printouts.
 java.lang.String getDisplayColumnName(java.lang.String token)
          Get the displayable column title for the column
 java.lang.String getRealColumnName(int columnNumber)
          Get the real column name for a column
 java.lang.String getRealColumnName(java.lang.String token)
          Get the real columnn name for a column
 java.lang.String getTableDisplayName(int columnNumber)
          Gets the displayable title of the table from which the specified column of the result set was derived.
 java.lang.String getTableDisplayName(java.lang.String columnToken)
          Get the displayable title of the table from which the specified column of the result set was derived.
 java.lang.String getTableTokenName(int columnNumber)
          Get the token name of the table from which the column is derived.
 java.lang.String getTableTokenName(java.lang.String token)
          Gets the token name of the table from which the column is derived.
 boolean isFilterColumn(int columnNumber)
          Is the specified column one that can be used in creating dynamic groups (filters)
 boolean isFilterColumn(java.lang.String token)
          Is the specified column one that can be used in creating dynamic groups (filters)
 boolean isMappedColumn(int columnNumber)
          Is the specified column one whose data is translated (e.g.
 boolean isMappedColumn(java.lang.String token)
          Is the specified column one whose data is translated (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TWGDbResultSetMetaData

protected TWGDbResultSetMetaData(java.util.Hashtable metaData,
                                 int mySize)
Constructor for TWGDbResultSetMetaData

Parameters:
metaData - - a hashtable that contains information about the corresponding result set
mySize - - the number of columns in the result set
Method Detail

getColumnCount

public int getColumnCount()
Get the number of columns in the TWGDbResultSet object.

Returns:
the number of columns

getTableTokenName

public java.lang.String getTableTokenName(java.lang.String token)
                                   throws TWGDbException
Gets the token name of the table from which the column is derived.

Parameters:
token - - column token name
Returns:
the table token name
Throws:
TWGDbException

getTableTokenName

public java.lang.String getTableTokenName(int columnNumber)
                                   throws TWGDbException
Get the token name of the table from which the column is derived.

Parameters:
columnNumber - - column number
Returns:
the table token name
Throws:
TWGDbException

getTableDisplayName

public java.lang.String getTableDisplayName(java.lang.String columnToken)
                                     throws TWGDbException
Get the displayable title of the table from which the specified column of the result set was derived.

Parameters:
columnToken - - column token name
Returns:
the displayable table name
Throws:
TWGDbException

getTableDisplayName

public java.lang.String getTableDisplayName(int columnNumber)
                                     throws TWGDbException
Gets the displayable title of the table from which the specified column of the result set was derived.

Parameters:
columnNumber - - column number
Returns:
the displayable name
Throws:
TWGDbException

getColumnType

public int getColumnType(java.lang.String token)
                  throws TWGDbException
Get the data type for the column value. Valid types are found in TWGDatabaseConstants

Parameters:
token - - column token name
Returns:
the type
Throws:
TWGDbException
See Also:
TWGDatabaseConstants

getColumnType

public int getColumnType(int columnNumber)
                  throws TWGDbException
Get the data type for the column value. Valid types are found in TWGDatabaseConstants

Parameters:
columnNumber - - column number
Returns:
the type
Throws:
TWGDbException
See Also:
TWGDatabaseConstants

getRealColumnName

public java.lang.String getRealColumnName(java.lang.String token)
                                   throws TWGDbException
Get the real columnn name for a column

Parameters:
token - - column token name
Returns:
the real column name
Throws:
TWGDbException

getRealColumnName

public java.lang.String getRealColumnName(int columnNumber)
                                   throws TWGDbException
Get the real column name for a column

Parameters:
columnNumber - - column id
Returns:
the real column name
Throws:
TWGDbException

getDisplayColumnName

public java.lang.String getDisplayColumnName(java.lang.String token)
                                      throws TWGDbException
Get the displayable column title for the column

Parameters:
token - - column token name
Returns:
the displayable title for the column
Throws:
TWGDbException

getDisplayColumnName

public java.lang.String getDisplayColumnName(int columnNumber)
                                      throws TWGDbException
Get the displayable column title for the column in displays and printouts.

Returns:
the displayable name for the column
Throws:
TWGDbException

getColumnLength

public java.lang.Integer getColumnLength(java.lang.String token)
                                  throws TWGDbException
For character type columns, get the maximum length in characters for the column.

Parameters:
token - - column token name
Returns:
the maximum length, or 0 if the column is not a character type column
Throws:
TWGDbException

getColumnLength

public java.lang.Integer getColumnLength(int columnNumber)
                                  throws TWGDbException
for character type columns, get the maximum length in characters for the column.

Parameters:
columnNumber - - column number
Returns:
the maximum length, or 0 if the column is not a character type column
Throws:
TWGDbException

getColumnId

public int getColumnId(java.lang.String token)
                throws TWGDbException
Map a column token name into column number.

Parameters:
token - - column token name
Returns:
column number
Throws:
TWGDbException

getColumnToken

public java.lang.String getColumnToken(int columnNumber)
                                throws TWGDbException
Map a column number into column token name.

Parameters:
columnNumber - - column number
Returns:
the column token name
Throws:
TWGDbException

isFilterColumn

public boolean isFilterColumn(java.lang.String token)
                       throws TWGDbException
Is the specified column one that can be used in creating dynamic groups (filters)

Parameters:
token - - the column token name
Returns:
true if it is a filter column, otherwise false
Throws:
TWGDbException

isFilterColumn

public boolean isFilterColumn(int columnNumber)
                       throws TWGDbException
Is the specified column one that can be used in creating dynamic groups (filters)

Parameters:
columnNumber - - the number of the column
Returns:
true if it is a filter column, otherwise false
Throws:
TWGDbException

isMappedColumn

public boolean isMappedColumn(java.lang.String token)
                       throws TWGDbException
Is the specified column one whose data is translated (e.g. enumerations)

Parameters:
token - - the token name of the column
Returns:
true if it is a filter column, otherwise false
Throws:
TWGDbException

isMappedColumn

public boolean isMappedColumn(int columnNumber)
                       throws TWGDbException
Is the specified column one whose data is translated (e.g. enumerations)

Parameters:
columnNumber - - the number of the column
Returns:
true if it is a filter column, otherwise false
Throws:
TWGDbException