java.sql
public
interface
java.sql.ResultSetMetaData
java.sql.ResultSetMetaData |
|
Provides information about the columns in a ResultSet.
Known Indirect Subclasses
RowSetMetaData |
An interface which provides facilities for getting information about the
columns in a RowSet. |
Summary
Constants
|
|
|
Value |
|
int |
columnNoNulls |
Indicates that a column cannot contain NULL values
|
0 |
0x00000000 |
int |
columnNullable |
Indicates that a column can contain NULL values
|
1 |
0x00000001 |
int |
columnNullableUnknown |
Indicates that it is unknown whether a column can contain NULLs or not
|
2 |
0x00000002 |
Public Methods
Details
Constants
public
static
final
int
columnNoNulls
Indicates that a column cannot contain NULL values
Constant Value:
0
(0x00000000)
public
static
final
int
columnNullable
Indicates that a column can contain NULL values
Constant Value:
1
(0x00000001)
public
static
final
int
columnNullableUnknown
Indicates that it is unknown whether a column can contain NULLs or not
Constant Value:
2
(0x00000002)
Public Methods
public
String
getCatalogName(int column)
Returns the title of indexed columns catalog
Parameters
column
| the column index, starting at 1 |
public
String
getColumnClassName(int column)
Returns the fully-qualified type of the class that is produced when
invoking ResultSet.getObject to recover this columns value.
Parameters
column
| the column index, starting at 1 |
Returns
- the fully-qualified class name
public
int
getColumnCount()
Returns a count of the columns in this set of results.
public
int
getColumnDisplaySize(int column)
Returns the indexed column's standard maximum width, expressed in number
of characters.
Parameters
column
| the column index, starting at 1 |
public
String
getColumnLabel(int column)
Returns a recommended title for the indexed column, to be used when the
title needs to be displayed.
Parameters
column
| the column index, starting at 1 |
public
String
getColumnName(int column)
Returns the title of the indexed column
Parameters
column
| the column index, starting at 1 |
public
int
getColumnType(int column)
Returns the type of the indexed column
Parameters
column
| the column index, starting at 1 |
public
String
getColumnTypeName(int column)
Returns the type name of the indexed column
Parameters
column
| the column index, starting at 1 |
public
int
getPrecision(int column)
Returns the decimal precision of the indexed column
Parameters
column
| the column index, starting at 1 |
public
int
getScale(int column)
Returns the number of decimal places in the indexed column.
Parameters
column
| the column index, starting at 1 |
public
String
getSchemaName(int column)
Returns the name of the indexed columns schema
Parameters
column
| the column index, starting at 1 |
Returns
- the name of the columns schema
public
String
getTableName(int column)
Returns the title of the indexed columns table.
Parameters
column
| the column index, starting at 1 |
public
boolean
isAutoIncrement(int column)
Returns and indication of whether the indexed column has automatic
numbering and is therefore read-only
Parameters
column
| the column index, starting at 1 |
Returns
- true if it is automatically numbered, false otherwise
public
boolean
isCaseSensitive(int column)
Returns an indicator of whether the case of the indexed column is
important
Parameters
column
| the column index, starting at 1 |
Returns
- true if case matters, false otherwise
public
boolean
isCurrency(int column)
Returns if the indexed column contains a monetary amount.
Parameters
column
| the column index, starting at 1 |
Returns
- true if it is a monetary value, false otherwise
public
boolean
isDefinitelyWritable(int column)
Returns an indication of whether writing to the indexed column is
guaranteed to be successful
Parameters
column
| the column index, starting at 1 |
Returns
- true if the write is guaranteed, false otherwise
public
int
isNullable(int column)
Returns whether the indexed column is nullable.
Parameters
column
| the column index, starting at 1 |
Returns
- true if it is nullable, false otherwise
public
boolean
isReadOnly(int column)
Returns an indication of whether writing to the indexed column is
guaranteed to be unsuccessful
Parameters
column
| the column index, starting at 1 |
Returns
- true if the column is read-only, false otherwise
public
boolean
isSearchable(int column)
Returns an indication of whether the indexed column is searchable.
Parameters
column
| the column index, starting at 1 |
Returns
- true if the indexed column is searchable, false otherwise.
public
boolean
isSigned(int column)
Returns an indicator of whether the values contained in the indexed
column are signed.
Parameters
column
| the column index, starting at 1 |
Returns
- true if they are signed, false otherwise
public
boolean
isWritable(int column)
Returns an indication of whether writing to the indexed column is
possible.
Parameters
column
| the column index, starting at 1 |
Returns
- true if it is possible to write, false otherwise