All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.as400.access.AS400JDBCResultSetMetaData
java.lang.Object
|
+----com.ibm.as400.access.AS400JDBCResultSetMetaData
- public class AS400JDBCResultSetMetaData
- extends Object
- implements ResultSetMetaData
The AS400JDBCResultSetMetaData class describes the
columns in a result set.
-
getCatalogName(int)
- Returns the catalog name of the table for a column.
-
getColumnClassName(int)
- Returns the name of a Java class whose instances are
created if ResultSet.getObject() is called to retrieve
from the column.
-
getColumnCount()
- Returns the number of columns in the result set.
-
getColumnDisplaySize(int)
- Returns the normal maximum width of a column.
-
getColumnLabel(int)
- Returns the suggested label for use in printouts
or displays for a column.
-
getColumnName(int)
- Returns the name of a column.
-
getColumnType(int)
- Returns the type of a column.
-
getColumnTypeName(int)
- Returns the type name of a column.
-
getPrecision(int)
- Returns the precision of a column.
-
getScale(int)
- Returns the scale of a column.
-
getSchemaName(int)
- Returns the schema name of the table for a column.
-
getTableName(int)
- Returns the column's table name.
-
isAutoIncrement(int)
- Indicates if the column is automatically numbered.
-
isCaseSensitive(int)
- Indicates if the column is case sensitive.
-
isCurrency(int)
- Indicates if the column is a currency value.
-
isDefinitelyWritable(int)
- Indicates if a write on the column will definitely succeed.
-
isNullable(int)
- Indicates if the column can contain an SQL NULL value.
-
isReadOnly(int)
- Indicates if the column is read-only.
-
isSearchable(int)
- Indicates if the column be used in a where clause.
-
isSigned(int)
- Indicates if the column can contain a signed value.
-
isWritable(int)
- Indicates if it is possible for a write on the column
to succeed.
-
toString()
- Returns the name of the SQL cursor in use by this result set.
getCatalogName
public String getCatalogName(int columnIndex) throws SQLException
- Returns the catalog name of the table for a column.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- The catalog name.
- Throws: SQLException
- If the column index is not valid.
getColumnClassName
public String getColumnClassName(int columnIndex) throws SQLException
- Returns the name of a Java class whose instances are
created if ResultSet.getObject() is called to retrieve
from the column. The actual class created may be a subclass
of the returned class.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- The class name.
- Throws: SQLException
- If the column index is not valid.
getColumnCount
public int getColumnCount() throws SQLException
- Returns the number of columns in the result set.
- Returns:
- The number of columns.
- Throws: SQLException
- If an error occurs.
getColumnDisplaySize
public int getColumnDisplaySize(int columnIndex) throws SQLException
- Returns the normal maximum width of a column.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- The normal maximum width
(in characters).
- Throws: SQLException
- If the column index is not valid.
getColumnLabel
public String getColumnLabel(int columnIndex) throws SQLException
- Returns the suggested label for use in printouts
or displays for a column.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- The column label.
- Throws: SQLException
- If the column index is not valid.
getColumnName
public String getColumnName(int columnIndex) throws SQLException
- Returns the name of a column.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- The column name.
- Throws: SQLException
- If the column index is not valid.
getColumnType
public int getColumnType(int columnIndex) throws SQLException
- Returns the type of a column. If the type is a distinct type,
this returns the underlying type.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- The SQL type code defined in java.sql.Types.
- Throws: SQLException
- If the column index is not valid.
getColumnTypeName
public String getColumnTypeName(int columnIndex) throws SQLException
- Returns the type name of a column. If the type is a distinct
type, this returns the underlying type name.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- The column type name.
- Throws: SQLException
- If the column index is not valid.
getPrecision
public int getPrecision(int columnIndex) throws SQLException
- Returns the precision of a column. This is the number
of decimal digits the column may hold.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- The precision.
- Throws: SQLException
- If the column index is not valid.
getScale
public int getScale(int columnIndex) throws SQLException
- Returns the scale of a column. This is number of digits
to the right of the decimal point.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- The scale.
- Throws: SQLException
- If the column index is not valid.
getSchemaName
public String getSchemaName(int columnIndex) throws SQLException
- Returns the schema name of the table for a column.
This method is not supported.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- "".
- Throws: SQLException
- If the column index is not valid.
getTableName
public String getTableName(int columnIndex) throws SQLException
- Returns the column's table name. This method
is not supported.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- "".
- Throws: SQLException
- If the column index is not valid.
isAutoIncrement
public boolean isAutoIncrement(int columnIndex) throws SQLException
- Indicates if the column is automatically numbered.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- Always false. DB2 for OS/400
does not support automatically
numbered columns.
- Throws: SQLException
- If the column index is not valid.
isCaseSensitive
public boolean isCaseSensitive(int columnIndex) throws SQLException
- Indicates if the column is case sensitive.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- true if the column is case sensitive;
false otherwise.
- Throws: SQLException
- If the column index is not valid.
isCurrency
public boolean isCurrency(int columnIndex) throws SQLException
- Indicates if the column is a currency value.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- Always false. DB2 for OS/400
does not directly support currency
values.
- Throws: SQLException
- If the column index is not valid.
isDefinitelyWritable
public boolean isDefinitelyWritable(int columnIndex) throws SQLException
- Indicates if a write on the column will definitely succeed.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- Always false. The driver does
not check if the user has the
necessary authority to write to
the column.
- Throws: SQLException
- If the column index is not valid.
isNullable
public int isNullable(int columnIndex) throws SQLException
- Indicates if the column can contain an SQL NULL value.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- true if the column is can contain
an SQL NULL value; false otherwise.
- Throws: SQLException
- If the column index is not valid.
isReadOnly
public boolean isReadOnly(int columnIndex) throws SQLException
- Indicates if the column is read-only.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- true if the column is read-only;
false otherwise.
- Throws: SQLException
- If the column index is not valid.
isSearchable
public boolean isSearchable(int columnIndex) throws SQLException
- Indicates if the column be used in a where clause.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- Always true. All columns can
be used in a where clause.
- Throws: SQLException
- If the column index is not valid.
isSigned
public boolean isSigned(int columnIndex) throws SQLException
- Indicates if the column can contain a signed value.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- true if the column is signed;
false otherwise.
- Throws: SQLException
- If the column index is not valid.
isWritable
public boolean isWritable(int columnIndex) throws SQLException
- Indicates if it is possible for a write on the column
to succeed.
- Parameters:
- columnIndex - The column index (1-based).
- Returns:
- true if it is possible for a write on
the column to succeed; false otherwise.
- Throws: SQLException
- If the column index is not valid.
toString
public String toString()
- Returns the name of the SQL cursor in use by this result set.
- Returns:
- The cursor name.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index