Class jet.datasource.JRColDesc


java.lang.Object

   |

   +----jet.datasource.JRColDesc


public class JRColDesc
extends Object

A class that encapsulates all description information about a column in a result set. The description information is retrieved from the database


Variable Index

 o colName
The column name in the column description.
 o nullable
The nullable in the column description.
 o precision
The precision in the column description.
For char or date types this is the maximum number of characters, for numeric or decimal types this is precision.
 o scale
The scale in the column description.
The number of fractional digits
 o sqlType
The sql type in the column description.
The value is the SQL type from java.sql.Types.

Constructor Index

 o JRColDesc()
Constructs an uninitialized JRColDesc.
 o JRColDesc(String, int, int, int, int)
Constructs an initialized DbColDesc.

Method Index

 o clone()
Duplicates a copy of this JRColDescs
 o getColName()
Gets the column name.
 o getNullable()
Gets the nullable.
 o getPrecision()
Gets the precision.
 o getScale()
Gets the scale.
 o getSqlType()
Gets the data type.
 o setColName(String)
Sets the column name for this JRColDesc to the specified name.
 o setNullable(int)
Sets the nullable for this JRColDesc to the specified nullable.
 o setPrecision(int)
Sets the precision for this JRColDesc to the specified precision.
 o setScale(int)
Sets the scale for this JRColDesc to the specified scale.
 o setSqlType(int)
Sets the data type for this JRColDesc to the specified type.
 o typeEquals(JRColDesc)
Compares the specified column description and returns if the column description is equal in type.

Variables

 o colName


 public String colName

The column name in the column description.

 o sqlType


 public int sqlType

The sql type in the column description.
The value is the SQL type from java.sql.Types.

 o precision


 public int precision

The precision in the column description.
For char or date types this is the maximum number of characters, for numeric or decimal types this is precision.

 o scale


 public int scale

The scale in the column description.
The number of fractional digits

 o nullable


 public int nullable

The nullable in the column description.
Indicate whether the NULL value allowed.
0 - might not allow NULL values
1 - definitely allows NULL values
2 - nullability unknown

Constructors

 o JRColDesc


 public JRColDesc()

Constructs an uninitialized JRColDesc.

 o JRColDesc


 public JRColDesc(String colName,

                  int sqlType,

                  int precision,

                  int scale,

                  int nullable)

Constructs an initialized DbColDesc.
Parameters:
colName - the column name
sqlType - the data type
precision - the precision
scale - the scale
nullable - the nullable

Methods

 o getColName


 public String getColName()

Gets the column name.
Returns:
the column name.
See Also:
setColName

 o setColName


 public void setColName(String colName)

Sets the column name for this JRColDesc to the specified name.
Parameters:
colName - the column name specified.
See Also:
getColName

 o getSqlType


 public int getSqlType()

Gets the data type.
Returns:
the data type of this field.
See Also:
setSqlType

 o setSqlType


 public void setSqlType(int sqlType)

Sets the data type for this JRColDesc to the specified type.
Parameters:
iSQLType - the specified data type .
See Also:
getSqlType

 o getPrecision


 public int getPrecision()

Gets the precision.
Returns:
the precision.
See Also:
setPrecision

 o setPrecision


 public void setPrecision(int precision)

Sets the precision for this JRColDesc to the specified precision.
Parameters:
iPrecision - the specified precision.
See Also:
getPrecision

 o getScale


 public int getScale()

Gets the scale.
Returns:
the scale.
See Also:
getScale

 o setScale


 public void setScale(int scale)

Sets the scale for this JRColDesc to the specified scale.
Parameters:
iScale - the specified scale.
See Also:
setScale

 o getNullable


 public int getNullable()

Gets the nullable.
Returns:
the nullable.
See Also:
setNullable

 o setNullable


 public void setNullable(int nullable)

Sets the nullable for this JRColDesc to the specified nullable.
Parameters:
iNullable - the specified nullable.
See Also:
getNullable

 o typeEquals


 public boolean typeEquals(JRColDesc colDesc)

Compares the specified column description and returns if the column description is equal in type.
Parameters:
colDesc - the column description to compare
Returns:
if the coldesc is euals in type

 o clone


 public Object clone()

Duplicates a copy of this JRColDescs