Where Am I? Class Hierarchy All Classes All Fields and Methods

Class com.ibm.db.selector.SingleColumnSelector

java.lang.Object
   |
   +----com.ibm.db.selector.Selector
           |
           +----com.ibm.db.selector.SingleColumnSelector

public abstract class SingleColumnSelector
extends Selector

This class provides the function common to CellSelector and ColumnSelector. Namely, the ability to identify the column of interest by name or number.

See Also:
Selector
CellSelector
ColumnSelector

Method Index

getColumnName()
Return the name of the column currently selected from the source TableModel.
getColumnNames()
Return a String[] containing the name of the column currently referenced by this selector.
getColumnNumber()
Return the index number of the column currently selected from the source TableModel.
setColumnName(String)
Specify the name of the column selected from the source TableModel.
setColumnNumber(int)
Specify the index number of the column selected from the source TableModel.
setModel(TableModel)

Methods

getColumnName
 public String getColumnName() 
Return the name of the column currently selected from the source TableModel. If this field is blank or null, the selection is based on a column number, not on a column name.

Returns:
the name of the currently selected column.
See Also:
setColumnName
getColumnNames
 public String[] getColumnNames() 
Return a String[] containing the name of the column currently referenced by this selector. The name is obtained from the source TableModel.

Returns:
a String[] containing the name of the column currently referenced by this selector.
Throws: SelectorException
NO_MODEL - when there is no TableModel associated with this selector.
Throws: SelectorException
COLUMN_NAME - when the current selection identifies the selected column by name, and the specified column name cannot be found in the associated TableModel.
Throws: SelectorException
COLUMN_NUMBER - when the current selection column number is outside of the range of column numbers in the associated TableModel.
See Also:
NO_MODEL
COLUMN_NAME
COLUMN_NUMBER
getColumnNumber
 public int getColumnNumber() 
Return the index number of the column currently selected from the source TableModel. This value is only used for selection if the column name is blank or null.

Returns:
the index number of the currently selected column.
See Also:
setColumnNumber
setColumnName
 public void setColumnName(String columnName) 
Specify the name of the column selected from the source TableModel. The match on column name is not case sensitive. If the specified column name is blank or null, the selected column will be identified by columnNumber.

The value specified for columnName is not validated until an attempt is made to retrieve/set data through the selector. If the source TableModel does not contain the specified column, the reference columnName is set to null, the columnNumber is set to the last column in the source TableModel, and an exception is thrown.

Parameters:
columnName - the name of the selected column.
setColumnNumber
 public void setColumnNumber(int columnNumber) 
Specify the index number of the column selected from the source TableModel. This column number will only be used if getColumnName() returns a null or blank string.

The value specified for columnNumber is not validated until an attempt is made to retrieve/set data through the selector. If the source TableModel does not contain the specified column, the columnNumber is set to the last column in the source TableModel and an exception is thrown.

Parameters:
columnNumber - index number of the selected column.
See Also:
setColumnName
setIndexFromOne
setModel
 public void setModel(TableModel model) 

Overrides:
setModel in class Selector

Where Am I? Class Hierarchy All Classes All Fields and Methods