net.sourceforge.jtds.jdbc

Class JtdsResultSetMetaData

Implemented Interfaces:
ResultSetMetaData

public class JtdsResultSetMetaData
extends java.lang.Object
implements ResultSetMetaData

jTDS implementation of the java.sql.ResultSetMetaData interface.

Implementation notes:

  1. New simple implementation required by the new column info structure.
  2. Unlike the equivalent in the older jTDS, this version is generic and does not need to know details of the TDS protocol.
Version:
$Id: JtdsResultSetMetaData.java,v 1.9 2007/07/08 18:53:30 bheineman Exp $
Author:
Mike Hutchinson

Field Summary

private int
columnCount
private ColInfo[]
columns
private boolean
useLOBs

Constructor Summary

JtdsResultSetMetaData(ColInfo[] columns, int columnCount, boolean useLOBs)
Construct ResultSetMetaData object over the current ColInfo array.

Method Summary

String
getCatalogName(int column)
(package private) ColInfo
getColumn(int column)
Return the column descriptor given a column index.
String
getColumnClassName(int column)
int
getColumnCount()
int
getColumnDisplaySize(int column)
String
getColumnLabel(int column)
String
getColumnName(int column)
int
getColumnType(int column)
String
getColumnTypeName(int column)
int
getPrecision(int column)
int
getScale(int column)
String
getSchemaName(int column)
String
getTableName(int column)
boolean
isAutoIncrement(int column)
boolean
isCaseSensitive(int column)
boolean
isCurrency(int column)
boolean
isDefinitelyWritable(int column)
int
isNullable(int column)
boolean
isReadOnly(int column)
boolean
isSearchable(int column)
boolean
isSigned(int column)
boolean
isWritable(int column)

Field Details

columnCount

private final int columnCount

columns

private final ColInfo[] columns

useLOBs

private final boolean useLOBs

Constructor Details

JtdsResultSetMetaData

(package private)  JtdsResultSetMetaData(ColInfo[] columns,
                                         int columnCount,
                                         boolean useLOBs)
Construct ResultSetMetaData object over the current ColInfo array.
Parameters:
columns - The current ColInfo row descriptor array.
columnCount - The number of visible columns.

Method Details

getCatalogName

public String getCatalogName(int column)
            throws SQLException

getColumn

(package private)  ColInfo getColumn(int column)
            throws SQLException
Return the column descriptor given a column index.
Parameters:
column - The column index (from 1 .. n).
Returns:
The column descriptor as a ColInfo.

getColumnClassName

public String getColumnClassName(int column)
            throws SQLException

getColumnCount

public int getColumnCount()
            throws SQLException

getColumnDisplaySize

public int getColumnDisplaySize(int column)
            throws SQLException

getColumnLabel

public String getColumnLabel(int column)
            throws SQLException

getColumnName

public String getColumnName(int column)
            throws SQLException

getColumnType

public int getColumnType(int column)
            throws SQLException

getColumnTypeName

public String getColumnTypeName(int column)
            throws SQLException

getPrecision

public int getPrecision(int column)
            throws SQLException

getScale

public int getScale(int column)
            throws SQLException

getSchemaName

public String getSchemaName(int column)
            throws SQLException

getTableName

public String getTableName(int column)
            throws SQLException

isAutoIncrement

public boolean isAutoIncrement(int column)
            throws SQLException

isCaseSensitive

public boolean isCaseSensitive(int column)
            throws SQLException

isCurrency

public boolean isCurrency(int column)
            throws SQLException

isDefinitelyWritable

public boolean isDefinitelyWritable(int column)
            throws SQLException

isNullable

public int isNullable(int column)
            throws SQLException

isReadOnly

public boolean isReadOnly(int column)
            throws SQLException

isSearchable

public boolean isSearchable(int column)
            throws SQLException

isSigned

public boolean isSigned(int column)
            throws SQLException

isWritable

public boolean isWritable(int column)
            throws SQLException

Generated on September 18 2009