Oracle10g JDBC

oracle.jdbc.driver
Class OracleResultSetMetaData

java.lang.Object
  extended byoracle.jdbc.driver.OracleResultSetMetaData
All Implemented Interfaces:
OracleResultSetMetaData, oracle.jdbc.internal.OracleResultSetMetaData, java.sql.ResultSetMetaData

public class OracleResultSetMetaData
extends java.lang.Object
implements oracle.jdbc.internal.OracleResultSetMetaData

Oracle result set metadata class.

A ResultSetMetaData object can be used to find out about the types and properties of the columns in a ResultSet.


Field Summary
static java.lang.String BUILD_DATE
           
static boolean PRIVATE_TRACE
           
static boolean TRACE
           
 
Fields inherited from interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown
 
Method Summary
 java.lang.String getCatalogName(int column)
          What's a column's table's catalog name?
 java.lang.String getColumnClassName(int column)
          Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.
 int getColumnCount()
          What's the number of columns in the ResultSet?
 int getColumnDisplaySize(int column)
          What's the column's normal max width in chars?
 java.lang.String getColumnLabel(int column)
          What's the suggested column title for use in printouts and displays?
 java.lang.String getColumnName(int column)
          What's a column's name?
 int getColumnType(int column)
          What's a column's SQL type?
 java.lang.String getColumnTypeName(int column)
          What's a column's data source specific type name?
 int getPrecision(int column)
          What's a column's number of decimal digits? The semantic of get precision on non NUMERIC columns is weirdly defined by the JDBC test suite.
 int getScale(int column)
          What's a column's number of digits to right of decimal?
 java.lang.String getSchemaName(int column)
          What's a column's table's schema?
 java.lang.String getTableName(int column)
          What's a column's table name?
 boolean isAutoIncrement(int column)
          Is the column automatically numbered, thus read-only?
 boolean isCaseSensitive(int column)
          Does a column's case matter?
 boolean isCurrency(int column)
          Is the column a cash value?
 boolean isDefinitelyWritable(int column)
          Will a write on the column definitely succeed?
 boolean isNCHAR(int columnIndex)
          isNCHAR (int)
 int isNullable(int column)
          Can you put a NULL in this column?
 boolean isReadOnly(int column)
          Is a column definitely not writable?
 boolean isSearchable(int column)
          Can the column be used in a where clause?
 boolean isSigned(int column)
          Is the column a signed number?
 boolean isWritable(int column)
          Is it possible for a write on the column to succeed?
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACE

public static final boolean TRACE
See Also:
Constant Field Values

PRIVATE_TRACE

public static final boolean PRIVATE_TRACE
See Also:
Constant Field Values

BUILD_DATE

public static final java.lang.String BUILD_DATE
See Also:
Constant Field Values
Method Detail

getColumnCount

public int getColumnCount()
                   throws java.sql.SQLException
What's the number of columns in the ResultSet?

Specified by:
getColumnCount in interface java.sql.ResultSetMetaData
Returns:
the number
Throws:
java.sql.SQLException

isAutoIncrement

public boolean isAutoIncrement(int column)
                        throws java.sql.SQLException
Is the column automatically numbered, thus read-only?

Specified by:
isAutoIncrement in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so
Throws:
java.sql.SQLException

isCaseSensitive

public boolean isCaseSensitive(int column)
                        throws java.sql.SQLException
Does a column's case matter?

Specified by:
isCaseSensitive in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so
Throws:
java.sql.SQLException

isSearchable

public boolean isSearchable(int column)
                     throws java.sql.SQLException
Can the column be used in a where clause?

Specified by:
isSearchable in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so
Throws:
java.sql.SQLException

isCurrency

public boolean isCurrency(int column)
                   throws java.sql.SQLException
Is the column a cash value?

Specified by:
isCurrency in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so
Throws:
java.sql.SQLException

isNullable

public int isNullable(int column)
               throws java.sql.SQLException
Can you put a NULL in this column?

Specified by:
isNullable in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
columnNoNulls, columnNullable or columnNullableUnknown
Throws:
java.sql.SQLException

isSigned

public boolean isSigned(int column)
                 throws java.sql.SQLException
Is the column a signed number?

Specified by:
isSigned in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so
Throws:
java.sql.SQLException

getColumnDisplaySize

public int getColumnDisplaySize(int column)
                         throws java.sql.SQLException
What's the column's normal max width in chars?

Specified by:
getColumnDisplaySize in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
max width
Throws:
java.sql.SQLException

getColumnLabel

public java.lang.String getColumnLabel(int column)
                                throws java.sql.SQLException
What's the suggested column title for use in printouts and displays?

Specified by:
getColumnLabel in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so
Throws:
java.sql.SQLException

getColumnName

public java.lang.String getColumnName(int column)
                               throws java.sql.SQLException
What's a column's name?

Specified by:
getColumnName in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
column name
Throws:
java.sql.SQLException

getSchemaName

public java.lang.String getSchemaName(int column)
                               throws java.sql.SQLException
What's a column's table's schema?

Specified by:
getSchemaName in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
schema name or "" if not applicable
Throws:
java.sql.SQLException

getPrecision

public int getPrecision(int column)
                 throws java.sql.SQLException
What's a column's number of decimal digits? The semantic of get precision on non NUMERIC columns is weirdly defined by the JDBC test suite.

Specified by:
getPrecision in interface java.sql.ResultSetMetaData
Throws:
java.sql.SQLException

getScale

public int getScale(int column)
             throws java.sql.SQLException
What's a column's number of digits to right of decimal?

Specified by:
getScale in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
scale
Throws:
java.sql.SQLException

getTableName

public java.lang.String getTableName(int column)
                              throws java.sql.SQLException
What's a column's table name?

Specified by:
getTableName in interface java.sql.ResultSetMetaData
Returns:
table name or "" if not applicable
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 interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
column name or "" if not applicable.
Throws:
java.sql.SQLException

getColumnType

public int getColumnType(int column)
                  throws java.sql.SQLException
What's a column's SQL type?

The Accessor structure holds the ORACLE type number (VARCHAR is 1) and we need to convert it to the Java type number (VARCHAR is 12).

Specified by:
getColumnType in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
SQL type
Throws:
java.sql.SQLException
See Also:
Types, Accessor

getColumnTypeName

public java.lang.String getColumnTypeName(int column)
                                   throws java.sql.SQLException
What's a column's data source specific type name?

Specified by:
getColumnTypeName in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
type name
Throws:
java.sql.SQLException

isReadOnly

public boolean isReadOnly(int column)
                   throws java.sql.SQLException
Is a column definitely not writable?

Specified by:
isReadOnly in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so
Throws:
java.sql.SQLException

isWritable

public boolean isWritable(int column)
                   throws java.sql.SQLException
Is it possible for a write on the column to succeed?

Specified by:
isWritable in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so
Throws:
java.sql.SQLException

isDefinitelyWritable

public boolean isDefinitelyWritable(int column)
                             throws java.sql.SQLException
Will a write on the column definitely succeed?

Specified by:
isDefinitelyWritable in interface java.sql.ResultSetMetaData
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so
Throws:
java.sql.SQLException

getColumnClassName

public java.lang.String getColumnClassName(int column)
                                    throws java.sql.SQLException

Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column. ResultSet.getObject may return a subclass of the class returned by this method.

Specified by:
getColumnClassName in interface java.sql.ResultSetMetaData
Returns:
the fully-qualified name of the class that ResultSet.getObject to retrieve the value in the specified column. This is the class name used for custom mapping.
Throws:
java.sql.SQLException - if a database access error occurs

isNCHAR

public boolean isNCHAR(int columnIndex)
                throws java.sql.SQLException
isNCHAR (int)

Specified by:
isNCHAR in interface OracleResultSetMetaData
Parameters:
columnIndex - the column index
Returns:
true if the column is of type NCHAR/NVARCHAR/NCLOB false if the column is not of type NCHAR/NVARCHAR/NCLOB
Throws:
java.sql.SQLException

Oracle10g JDBC

Copyright © 1998,2004, Oracle. All rights reserved