com.ibm.bpe.api
Class QueryColumnInfo

java.lang.Object
  extended bycom.ibm.bpe.api.QueryColumnInfo
All Implemented Interfaces:
java.io.Serializable

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

Provides information on the columns of a query result set.

See Also:
Serialized Form

Field Summary
static short TYPE_BINARY
          States that the values in the column are binares.
static short TYPE_BOOLEAN
          States that the values in the column are booleans.
static short TYPE_ID
          States that the values in the column are object IDs.
static short TYPE_NUMBER
          States that the values in the column are numbers.
static short TYPE_STRING
          States that the values in the column are strings.
static short TYPE_TIMESTAMP
          States that the values in the column are timestamps.
 
Constructor Summary
QueryColumnInfo(java.lang.String columnName, short type, boolean isNullable)
          Constructor.
 
Method Summary
 void addConstant(java.lang.String strConstantName, int value)
          Adds an enumeration constant to the column information.
 java.lang.String getColumnName()
          Returns the name of the column.
 java.lang.Integer getConstant(java.lang.String strConstantName)
          Returns the enumeration value of the specified constant.
 java.lang.String getConstantName(int constantValue)
          Returns the name of the specified enumeration constant.
 java.lang.String getTableName()
          Returns the table name.
 short getType()
          Returns the type of the column.
 boolean isNullable()
          States whether the column allows for null values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_STRING

public static final short TYPE_STRING
States that the values in the column are strings.

See Also:
Constant Field Values

TYPE_NUMBER

public static final short TYPE_NUMBER
States that the values in the column are numbers.

See Also:
Constant Field Values

TYPE_TIMESTAMP

public static final short TYPE_TIMESTAMP
States that the values in the column are timestamps.

See Also:
Constant Field Values

TYPE_BINARY

public static final short TYPE_BINARY
States that the values in the column are binares.

See Also:
Constant Field Values

TYPE_BOOLEAN

public static final short TYPE_BOOLEAN
States that the values in the column are booleans.

See Also:
Constant Field Values

TYPE_ID

public static final short TYPE_ID
States that the values in the column are object IDs.

See Also:
Constant Field Values
Constructor Detail

QueryColumnInfo

public QueryColumnInfo(java.lang.String columnName,
                       short type,
                       boolean isNullable)
Constructor.

Parameters:
columnName - The name of the column in the database.

type - The type of the values in the column.

isNullable - True if a value in the column can be null. False if a value in the column cannot be null.
Method Detail

addConstant

public void addConstant(java.lang.String strConstantName,
                        int value)
Adds an enumeration constant to the column information.

Parameters:
strConstantName - The name of the enumeration constant, for example, REASON_OWNER.

value - The value of the enumeration constant.

getConstant

public java.lang.Integer getConstant(java.lang.String strConstantName)
Returns the enumeration value of the specified constant.

Parameters:
strConstantName - The name of the enumeration constant, for example, REASON_OWNER.

Returns:
Returns the value of the enumeration constant. If the specified constant is not found, a null object is returned.

getConstantName

public java.lang.String getConstantName(int constantValue)
Returns the name of the specified enumeration constant.

Parameters:
constantValue - The integer value of the enumeration constant.

Returns:
Returns the name of the enumeration constant, e.g. REASON_OWNER. If the value is not found, a null object is returned.

getColumnName

public final java.lang.String getColumnName()
Returns the name of the column.

Returns:
The name of the column in the database.

getType

public final short getType()
Returns the type of the column.

Returns:
The type of the values in the column.

isNullable

public final boolean isNullable()
States whether the column allows for null values.

Returns:
True if a value in the column can be null. False if a value in the column cannot be null.

getTableName

public final java.lang.String getTableName()
Returns the table name.

Returns:
The name of the table.