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_
int
columns_
private LogWriter
logWriter_
boolean[]
nullable_
int[][]
protocolTypesCache_
(package private) int
resultSetConcurrency_
int[]
sqlCcsid_
java.lang.String[]
sqlComment_
short
sqldFcode_
short
sqldHold_
short
sqldKeytype_
java.lang.String
sqldRdbnam_
short
sqldReturn_
java.lang.String
sqldSchema_
short
sqldScroll_
short
sqldSensitive_
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 boolean
statementClosed_
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 void
assignColumnName(int column)
private void
checkForClosedStatement()
(package private) void
checkForValidColumnIndex(int column)
(package private) int
findColumnX(java.lang.String columnName)
java.lang.String
getCatalogName(int column)
What's a column's table's catalog name?java.lang.String
getColumnClassName(int column)
int
getColumnCount()
int
getColumnDisplaySize(int column)
java.lang.String
getColumnLabel(int column)
java.lang.String
getColumnName(int column)
int
getColumnType(int column)
java.lang.String
getColumnTypeName(int column)
int
getPrecision(int column)
int
getScale(int column)
java.lang.String
getSchemaName(int column)
java.lang.String
getTableName(int column)
(package private) boolean
hasLobColumns()
void
initializeCache(int upperBound)
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
isWrapperFor(java.lang.Class<?> iface)
Check whether this instance wraps an object that implements the interface specified byiface
.boolean
isWritable(int column)
(package private) void
markClosed()
private void
nullDataForGC()
void
setLogWriter(LogWriter logWriter)
<T> T
unwrap(java.lang.Class<T> iface)
Returnsthis
if 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:
getColumnCount
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
isAutoIncrement
public boolean isAutoIncrement(int column) throws java.sql.SQLException
- Specified by:
isAutoIncrement
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
isCaseSensitive
public boolean isCaseSensitive(int column) throws java.sql.SQLException
- Specified by:
isCaseSensitive
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
isSearchable
public boolean isSearchable(int column) throws java.sql.SQLException
- Specified by:
isSearchable
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
isCurrency
public boolean isCurrency(int column) throws java.sql.SQLException
- Specified by:
isCurrency
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
isNullable
public int isNullable(int column) throws java.sql.SQLException
- Specified by:
isNullable
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
isSigned
public boolean isSigned(int column) throws java.sql.SQLException
- Specified by:
isSigned
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
getColumnDisplaySize
public int getColumnDisplaySize(int column) throws java.sql.SQLException
- Specified by:
getColumnDisplaySize
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
getColumnLabel
public java.lang.String getColumnLabel(int column) throws java.sql.SQLException
- Specified by:
getColumnLabel
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
getColumnName
public java.lang.String getColumnName(int column) throws java.sql.SQLException
- Specified by:
getColumnName
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
getSchemaName
public java.lang.String getSchemaName(int column) throws java.sql.SQLException
- Specified by:
getSchemaName
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
getPrecision
public int getPrecision(int column) throws java.sql.SQLException
- Specified by:
getPrecision
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
getScale
public int getScale(int column) throws java.sql.SQLException
- Specified by:
getScale
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
getTableName
public java.lang.String getTableName(int column) throws java.sql.SQLException
- Specified by:
getTableName
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
getCatalogName
public java.lang.String getCatalogName(int column) throws java.sql.SQLException
What's a column's table's catalog name?- Specified by:
getCatalogName
in 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:
getColumnType
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
getColumnTypeName
public java.lang.String getColumnTypeName(int column) throws java.sql.SQLException
- Specified by:
getColumnTypeName
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
isReadOnly
public boolean isReadOnly(int column) throws java.sql.SQLException
- Specified by:
isReadOnly
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
isWritable
public boolean isWritable(int column) throws java.sql.SQLException
- Specified by:
isWritable
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
isDefinitelyWritable
public boolean isDefinitelyWritable(int column) throws java.sql.SQLException
- Specified by:
isDefinitelyWritable
in interfacejava.sql.ResultSetMetaData
- Throws:
java.sql.SQLException
-
getColumnClassName
public java.lang.String getColumnClassName(int column) throws java.sql.SQLException
- Specified by:
getColumnClassName
in 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.SQLException
Check whether this instance wraps an object that implements the interface specified byiface
.- Specified by:
isWrapperFor
in interfacejava.sql.Wrapper
- Parameters:
iface
- a class defining an interface- Returns:
true
if this instance implementsiface
, orfalse
otherwise- 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.SQLException
Returnsthis
if this class implements the specified interface.- Specified by:
unwrap
in 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
-
-