|
|||||||||
| Home >> All >> java >> [ sql overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.sql
Interface ResultSetMetaData

- public interface ResultSetMetaData
This interface provides a mechanism for obtaining information about
the columns that are present in a ResultSet.
Note that in this class column indices start at 1, not 0.
| Field Summary | |
static int |
columnNoNulls
The column does not allow NULL's. |
static int |
columnNullable
The column allows NULL's. |
static int |
columnNullableUnknown
It is unknown whether or not the column allows NULL's. |
| Method Summary | |
java.lang.String |
getCatalogName(int columnIndex)
This method returns the name of the catalog containing the specified column. |
java.lang.String |
getColumnClassName(int columnIndex)
This method returns the name of the Java class which will be used to create objects representing the data in this column. |
int |
getColumnCount()
This method returns the number of columns in the result set. |
int |
getColumnDisplaySize(int columnIndex)
This method returns the maximum number of characters that can be used to display a value in this column. |
java.lang.String |
getColumnLabel(int columnIndex)
This method returns a string that should be used as a caption for this column for user display purposes. |
java.lang.String |
getColumnName(int columnIndex)
This method returns the name of the specified column. |
int |
getColumnType(int columnIndex)
This method returns the SQL type of the specified column. |
java.lang.String |
getColumnTypeName(int columnIndex)
This method returns the name of the SQL type for this column. |
int |
getPrecision(int columnIndex)
This method returns the precision of the specified column, which is the number of decimal digits it contains. |
int |
getScale(int columnIndex)
This method returns the scale of the specified column, which is the number of digits to the right of the decimal point. |
java.lang.String |
getSchemaName(int columnIndex)
This method returns the name of the schema that contains the specified column. |
java.lang.String |
getTableName(int columnIndex)
This method returns the name of the table containing the specified column. |
boolean |
isAutoIncrement(int columnIndex)
This method test whether or not the column is an auto-increment column. |
boolean |
isCaseSensitive(int columnIndex)
This method tests whether or not a column is case sensitive in its values. |
boolean |
isCurrency(int columnIndex)
This method tests whether or not the column stores a monetary value. |
boolean |
isDefinitelyWritable(int columnIndex)
This method tests whether or not the column is writable. |
int |
isNullable(int columnIndex)
This method returns a value indicating whether or not the specified column may contain a NULL value. |
boolean |
isReadOnly(int columnIndex)
This method tests whether or not the specified column is read only. |
boolean |
isSearchable(int columnIndex)
This method tests whether not the specified column can be used in a WHERE clause. |
boolean |
isSigned(int columnIndex)
This method tests whether or not the value of the specified column is signed or unsigned. |
boolean |
isWritable(int columnIndex)
This method tests whether or not the column may be writable. |
| Field Detail |
columnNoNulls
public static final int columnNoNulls
- The column does not allow NULL's.
- See Also:
- Constant Field Values
columnNullable
public static final int columnNullable
- The column allows NULL's.
- See Also:
- Constant Field Values
columnNullableUnknown
public static final int columnNullableUnknown
- It is unknown whether or not the column allows NULL's.
- See Also:
- Constant Field Values
| Method Detail |
getColumnCount
public int getColumnCount()
throws SQLException
- This method returns the number of columns in the result set.
isAutoIncrement
public boolean isAutoIncrement(int columnIndex)
throws SQLException
- This method test whether or not the column is an auto-increment column.
Auto-increment columns are read-only.
isCaseSensitive
public boolean isCaseSensitive(int columnIndex)
throws SQLException
- This method tests whether or not a column is case sensitive in its values.
isSearchable
public boolean isSearchable(int columnIndex)
throws SQLException
- This method tests whether not the specified column can be used in
a WHERE clause.
isCurrency
public boolean isCurrency(int columnIndex)
throws SQLException
- This method tests whether or not the column stores a monetary value.
isNullable
public int isNullable(int columnIndex)
throws SQLException
- This method returns a value indicating whether or not the specified
column may contain a NULL value.
isSigned
public boolean isSigned(int columnIndex)
throws SQLException
- This method tests whether or not the value of the specified column
is signed or unsigned.
getColumnDisplaySize
public int getColumnDisplaySize(int columnIndex)
throws SQLException
- This method returns the maximum number of characters that can be used
to display a value in this column.
getColumnLabel
public java.lang.String getColumnLabel(int columnIndex) throws SQLException
- This method returns a string that should be used as a caption for this
column for user display purposes.
getColumnName
public java.lang.String getColumnName(int columnIndex) throws SQLException
- This method returns the name of the specified column.
getSchemaName
public java.lang.String getSchemaName(int columnIndex) throws SQLException
- This method returns the name of the schema that contains the specified
column.
getPrecision
public int getPrecision(int columnIndex)
throws SQLException
- This method returns the precision of the specified column, which is the
number of decimal digits it contains.
getScale
public int getScale(int columnIndex)
throws SQLException
- This method returns the scale of the specified column, which is the
number of digits to the right of the decimal point.
getTableName
public java.lang.String getTableName(int columnIndex) throws SQLException
- This method returns the name of the table containing the specified
column.
getCatalogName
public java.lang.String getCatalogName(int columnIndex) throws SQLException
- This method returns the name of the catalog containing the specified
column.
getColumnType
public int getColumnType(int columnIndex)
throws SQLException
- This method returns the SQL type of the specified column. This will
be one of the constants from
Types.
getColumnTypeName
public java.lang.String getColumnTypeName(int columnIndex) throws SQLException
- This method returns the name of the SQL type for this column.
isReadOnly
public boolean isReadOnly(int columnIndex)
throws SQLException
- This method tests whether or not the specified column is read only.
isWritable
public boolean isWritable(int columnIndex)
throws SQLException
- This method tests whether or not the column may be writable. This
does not guarantee that a write will be successful.
isDefinitelyWritable
public boolean isDefinitelyWritable(int columnIndex)
throws SQLException
- This method tests whether or not the column is writable. This
does guarantee that a write will be successful.
getColumnClassName
public java.lang.String getColumnClassName(int columnIndex) throws SQLException
- This method returns the name of the Java class which will be used to
create objects representing the data in this column.
|
|||||||||
| Home >> All >> java >> [ sql overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC