Package org.apache.derby.client.am
Class ColumnMetaData
- java.lang.Object
-
- org.apache.derby.client.am.ColumnMetaData
-
- All Implemented Interfaces:
java.sql.ResultSetMetaData,java.sql.Wrapper
public class ColumnMetaData extends java.lang.Object implements java.sql.ResultSetMetaData
-
-
Field Summary
Fields Modifier and Type Field Description int[]clientParamtertype_private java.util.Hashtable<java.lang.String,java.lang.Integer>columnNameToIndexCache_intcolumns_private LogWriterlogWriter_boolean[]nullable_int[][]protocolTypesCache_(package private) intresultSetConcurrency_int[]sqlCcsid_java.lang.String[]sqlComment_shortsqldFcode_shortsqldHold_shortsqldKeytype_java.lang.StringsqldRdbnam_shortsqldReturn_java.lang.StringsqldSchema_shortsqldScroll_shortsqldSensitive_java.lang.String[]sqlLabel_long[]sqlLength_java.lang.String[]sqlName_int[]sqlPrecision_int[]sqlScale_int[]sqlType_java.lang.String[]sqlUDTclassName_java.lang.String[]sqlUDTname_short[]sqlUnnamed_java.lang.String[]sqlxBasename_java.lang.String[]sqlxCorname_short[]sqlxGenerated_short[]sqlxKeymem_java.lang.String[]sqlxName_short[]sqlxParmmode_java.lang.String[]sqlxRdbnam_java.lang.String[]sqlxSchema_int[]sqlxUpdatable_private booleanstatementClosed_int[]types_
-
Constructor Summary
Constructors Constructor Description ColumnMetaData(LogWriter logWriter)ColumnMetaData(LogWriter logWriter, int upperBound)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidassignColumnName(int column)private voidcheckForClosedStatement()(package private) voidcheckForValidColumnIndex(int column)(package private) intfindColumnX(java.lang.String columnName)java.lang.StringgetCatalogName(int column)What's a column's table's catalog name?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)(package private) booleanhasLobColumns()voidinitializeCache(int upperBound)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<?> iface)Check whether this instance wraps an object that implements the interface specified byiface.booleanisWritable(int column)(package private) voidmarkClosed()private voidnullDataForGC()voidsetLogWriter(LogWriter logWriter)<T> Tunwrap(java.lang.Class<T> iface)Returnsthisif this class implements the specified interface.
-
-
-
Field Detail
-
columns_
public int columns_
-
nullable_
public boolean[] nullable_
-
sqldHold_
public short sqldHold_
-
sqldReturn_
public short sqldReturn_
-
sqldScroll_
public short sqldScroll_
-
sqldSensitive_
public short sqldSensitive_
-
sqldFcode_
public short sqldFcode_
-
sqldKeytype_
public short sqldKeytype_
-
sqldRdbnam_
public java.lang.String sqldRdbnam_
-
sqldSchema_
public java.lang.String sqldSchema_
-
sqlPrecision_
public int[] sqlPrecision_
-
sqlScale_
public int[] sqlScale_
-
sqlLength_
public long[] sqlLength_
-
sqlType_
public int[] sqlType_
-
sqlCcsid_
public int[] sqlCcsid_
-
sqlName_
public java.lang.String[] sqlName_
-
sqlLabel_
public java.lang.String[] sqlLabel_
-
sqlUnnamed_
public short[] sqlUnnamed_
-
sqlComment_
public java.lang.String[] sqlComment_
-
sqlUDTname_
public java.lang.String[] sqlUDTname_
-
sqlUDTclassName_
public java.lang.String[] sqlUDTclassName_
-
sqlxKeymem_
public short[] sqlxKeymem_
-
sqlxGenerated_
public short[] sqlxGenerated_
-
sqlxParmmode_
public short[] sqlxParmmode_
-
sqlxCorname_
public java.lang.String[] sqlxCorname_
-
sqlxName_
public java.lang.String[] sqlxName_
-
sqlxBasename_
public java.lang.String[] sqlxBasename_
-
sqlxUpdatable_
public int[] sqlxUpdatable_
-
sqlxSchema_
public java.lang.String[] sqlxSchema_
-
sqlxRdbnam_
public java.lang.String[] sqlxRdbnam_
-
protocolTypesCache_
public transient int[][] protocolTypesCache_
-
types_
public transient int[] types_
-
clientParamtertype_
public transient int[] clientParamtertype_
-
logWriter_
private transient LogWriter logWriter_
-
resultSetConcurrency_
transient int resultSetConcurrency_
-
columnNameToIndexCache_
private transient java.util.Hashtable<java.lang.String,java.lang.Integer> columnNameToIndexCache_
-
statementClosed_
private transient boolean statementClosed_
-
-
Method Detail
-
markClosed
void markClosed()
-
checkForClosedStatement
private void checkForClosedStatement() throws SqlException- Throws:
SqlException
-
initializeCache
public void initializeCache(int upperBound)
-
getColumnCount
public int getColumnCount() throws java.sql.SQLException- Specified by:
getColumnCountin 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
-
isSearchable
public boolean isSearchable(int column) throws java.sql.SQLException- Specified by:
isSearchablein 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
-
isNullable
public int isNullable(int column) throws java.sql.SQLException- Specified by:
isNullablein 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
-
getColumnDisplaySize
public int getColumnDisplaySize(int column) throws java.sql.SQLException- Specified by:
getColumnDisplaySizein 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
-
getSchemaName
public java.lang.String getSchemaName(int column) throws java.sql.SQLException- Specified by:
getSchemaNamein 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
-
getTableName
public java.lang.String getTableName(int column) throws java.sql.SQLException- Specified by:
getTableNamein interfacejava.sql.ResultSetMetaData- Throws:
java.sql.SQLException
-
getCatalogName
public java.lang.String getCatalogName(int column) throws java.sql.SQLExceptionWhat's a column's table's catalog name?- Specified by:
getCatalogNamein interfacejava.sql.ResultSetMetaData- Parameters:
column- the first column is 1, the second is 2, ...- Returns:
- column name or "" if not applicable.
- Throws:
java.sql.SQLException- thrown on failure
-
getColumnType
public int getColumnType(int column) throws java.sql.SQLException- Specified by:
getColumnTypein 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
-
isReadOnly
public boolean isReadOnly(int column) throws java.sql.SQLException- Specified by:
isReadOnlyin 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
-
isDefinitelyWritable
public boolean isDefinitelyWritable(int column) throws java.sql.SQLException- Specified by:
isDefinitelyWritablein 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
-
checkForValidColumnIndex
void checkForValidColumnIndex(int column) throws SqlException- Throws:
SqlException
-
setLogWriter
public void setLogWriter(LogWriter logWriter)
-
nullDataForGC
private void nullDataForGC()
-
hasLobColumns
boolean hasLobColumns()
-
findColumnX
int findColumnX(java.lang.String columnName) throws SqlException- Throws:
SqlException
-
assignColumnName
private void assignColumnName(int column)
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLExceptionCheck whether this instance wraps an object that implements the interface specified byiface.- Specified by:
isWrapperForin interfacejava.sql.Wrapper- Parameters:
iface- a class defining an interface- Returns:
trueif this instance implementsiface, orfalseotherwise- Throws:
java.sql.SQLException- if an error occurs while determining if this instance implementsiface
-
unwrap
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLExceptionReturnsthisif this class implements the specified interface.- Specified by:
unwrapin interfacejava.sql.Wrapper- Parameters:
iface- a class defining an interface- Returns:
- an object that implements the interface
- Throws:
java.sql.SQLException- if no object is found that implements the interface
-
-