Package net.sourceforge.jtds.jdbc
Class JtdsResultSetMetaData
- java.lang.Object
-
- net.sourceforge.jtds.jdbc.JtdsResultSetMetaData
-
- All Implemented Interfaces:
java.sql.ResultSetMetaData,java.sql.Wrapper
public class JtdsResultSetMetaData extends java.lang.Object implements java.sql.ResultSetMetaDatajTDS implementation of the java.sql.ResultSetMetaData interface.Implementation notes:
- New simple implementation required by the new column info structure.
- 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.2.3 2009-12-30 08:45:34 ickzon Exp $
- Author:
- Mike Hutchinson
-
-
Field Summary
Fields Modifier and Type Field Description private intcolumnCountprivate ColInfo[]columnsprivate booleanuseLOBs
-
Constructor Summary
Constructors Constructor Description JtdsResultSetMetaData(ColInfo[] columns, int columnCount, boolean useLOBs)Construct ResultSetMetaData object over the current ColInfo array.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCatalogName(int column)(package private) ColInfogetColumn(int column)Return the column descriptor given a column index.java.lang.StringgetColumnClassName(int column)intgetColumnCount()intgetColumnDisplaySize(int column)java.lang.StringgetColumnLabel(int column)java.lang.StringgetColumnName(int column)intgetColumnType(int column)java.lang.StringgetColumnTypeName(int column)intgetPrecision(int column)intgetScale(int column)java.lang.StringgetSchemaName(int column)java.lang.StringgetTableName(int column)booleanisAutoIncrement(int column)booleanisCaseSensitive(int column)booleanisCurrency(int column)booleanisDefinitelyWritable(int column)intisNullable(int column)booleanisReadOnly(int column)booleanisSearchable(int column)booleanisSigned(int column)booleanisWrapperFor(java.lang.Class arg0)booleanisWritable(int column)java.lang.Objectunwrap(java.lang.Class arg0)
-
-
-
Field Detail
-
columns
private final ColInfo[] columns
-
columnCount
private final int columnCount
-
useLOBs
private final boolean useLOBs
-
-
Constructor Detail
-
JtdsResultSetMetaData
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 Detail
-
getColumn
ColInfo getColumn(int column) throws java.sql.SQLException
Return the column descriptor given a column index.- Parameters:
column- The column index (from 1 .. n).- Returns:
- The column descriptor as a
ColInfo. - Throws:
java.sql.SQLException
-
getColumnCount
public int getColumnCount() throws java.sql.SQLException- Specified by:
getColumnCountin interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
getColumnDisplaySize
public int getColumnDisplaySize(int column) throws java.sql.SQLException- Specified by:
getColumnDisplaySizein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
getColumnType
public int getColumnType(int column) throws java.sql.SQLException- Specified by:
getColumnTypein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
getPrecision
public int getPrecision(int column) throws java.sql.SQLException- Specified by:
getPrecisionin interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
getScale
public int getScale(int column) throws java.sql.SQLException- Specified by:
getScalein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
isNullable
public int isNullable(int column) throws java.sql.SQLException- Specified by:
isNullablein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
isAutoIncrement
public boolean isAutoIncrement(int column) throws java.sql.SQLException- Specified by:
isAutoIncrementin interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
isCaseSensitive
public boolean isCaseSensitive(int column) throws java.sql.SQLException- Specified by:
isCaseSensitivein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
isCurrency
public boolean isCurrency(int column) throws java.sql.SQLException- Specified by:
isCurrencyin interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
isDefinitelyWritable
public boolean isDefinitelyWritable(int column) throws java.sql.SQLException- Specified by:
isDefinitelyWritablein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
isReadOnly
public boolean isReadOnly(int column) throws java.sql.SQLException- Specified by:
isReadOnlyin interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
isSearchable
public boolean isSearchable(int column) throws java.sql.SQLException- Specified by:
isSearchablein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
isSigned
public boolean isSigned(int column) throws java.sql.SQLException- Specified by:
isSignedin interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
isWritable
public boolean isWritable(int column) throws java.sql.SQLException- Specified by:
isWritablein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
getCatalogName
public java.lang.String getCatalogName(int column) throws java.sql.SQLException- Specified by:
getCatalogNamein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
getColumnClassName
public java.lang.String getColumnClassName(int column) throws java.sql.SQLException- Specified by:
getColumnClassNamein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
getColumnLabel
public java.lang.String getColumnLabel(int column) throws java.sql.SQLException- Specified by:
getColumnLabelin interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
getColumnName
public java.lang.String getColumnName(int column) throws java.sql.SQLException- Specified by:
getColumnNamein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
getColumnTypeName
public java.lang.String getColumnTypeName(int column) throws java.sql.SQLException- Specified by:
getColumnTypeNamein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
getSchemaName
public java.lang.String getSchemaName(int column) throws java.sql.SQLException- Specified by:
getSchemaNamein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
getTableName
public java.lang.String getTableName(int column) throws java.sql.SQLException- Specified by:
getTableNamein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class arg0) throws java.sql.SQLException- Specified by:
isWrapperForin interfacejava.sql.Wrapper- Throws:
java.sql.SQLException
-
unwrap
public java.lang.Object unwrap(java.lang.Class arg0) throws java.sql.SQLException- Specified by:
unwrapin interfacejava.sql.Wrapper- Throws:
java.sql.SQLException
-
-