Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.sql

Interface ResultSetMetaData

java.lang.Object
|
+--java.sql.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 indexes start at 1, not 0.

Author:

Field Summary

static intcolumnNoNulls

The column does not allow NULL's.
static intcolumnNullable

The column allows NULL's.
static intcolumnNullableUnknown

It is unknown whether or not the column allows NULL's.

Method Summary

java.lang.StringgetCatalogName(int column)

This method returns the name of the catalog containing the specified column.
java.lang.StringgetColumnClassName(int column)

This method returns the name of the Java class which will be used to create objects representing the data in this column.
intgetColumnCount()

This method returns the number of columns in the result set.
intgetColumnDisplaySize(int column)

This method returns the maximum number of characters that can be used to display a value in this column.
java.lang.StringgetColumnLabel(int column)

This method returns a string that should be used as a caption for this column for user display purposes.
java.lang.StringgetColumnName(int column)

This method returns the name of the specified column.
intgetColumnType(int column)

This method returns the SQL type of the specified column.
java.lang.StringgetColumnTypeName(int column)

This method returns the name of the SQL type for this column.
intgetPrecision(int column)

This method returns the precision of the specified column, which is the number of decimal digits it contains.
intgetScale(int column)

This method returns the scale of the specified column, which is the number of digits to the right of the decimal point.
java.lang.StringgetSchemaName(int column)

This method returns the name of the schema that contains the specified column.
java.lang.StringgetTableName(int column)

This method returns the name of the table containing the specified column.
booleanisAutoIncrement(int column)

This method test whether or not the column is an auto-increment column.
booleanisCaseSensitive(int column)

This method tests whether or not a column is case sensitive in its values.
booleanisCurrency(int column)

This method tests whether or not the column stores a monetary value.
booleanisDefinitelyWritable(int column)

This method tests whether or not the column is writable.
intisNullable(int column)

This method returns a value indicating whether or not the specified column may contain a NULL value.
booleanisReadOnly(int column)

This method tests whether or not the specified column is read only.
booleanisSearchable(int column)

This method tests whether not the specified column can be used in a WHERE clause.
booleanisSigned(int column)

This method tests whether or not the value of the specified column is signed or unsigned.
booleanisWritable(int column)

This method tests whether or not the column may be writable.

Field Details

columnNoNulls

public static final int columnNoNulls

The column does not allow NULL's.


columnNullable

public static final int columnNullable

The column allows NULL's.


columnNullableUnknown

public static final int columnNullableUnknown

It is unknown whether or not the column allows NULL's.


Method Details

getCatalogName

public String getCatalogName(int column)

This method returns the name of the catalog containing the specified column.

Parameters:

Returns:

Throws:


getColumnClassName

public String getColumnClassName(int column)

This method returns the name of the Java class which will be used to create objects representing the data in this column.

Parameters:

Returns:

Throws:


getColumnCount

public int getColumnCount()

This method returns the number of columns in the result set.

Returns:

Throws:


getColumnDisplaySize

public int getColumnDisplaySize(int column)

This method returns the maximum number of characters that can be used to display a value in this column.

Parameters:

Returns:

Throws:


getColumnLabel

public String getColumnLabel(int column)

This method returns a string that should be used as a caption for this column for user display purposes.

Parameters:

Returns:

Throws:


getColumnName

public String getColumnName(int column)

This method returns the name of the specified column.

Parameters:

Returns:

Throws:


getColumnType

public int getColumnType(int column)

This method returns the SQL type of the specified column. This will be one of the constants from Types.

Parameters:

Returns:

Throws:

See Also:


getColumnTypeName

public String getColumnTypeName(int column)

This method returns the name of the SQL type for this column.

Parameters:

Returns:

Throws:


getPrecision

public int getPrecision(int column)

This method returns the precision of the specified column, which is the number of decimal digits it contains.

Parameters:

Returns:

Throws:


getScale

public int getScale(int column)

This method returns the scale of the specified column, which is the number of digits to the right of the decimal point.

Parameters:

Returns:

Throws:


getSchemaName

public String getSchemaName(int column)

This method returns the name of the schema that contains the specified column.

Parameters:

Returns:

Throws:


getTableName

public String getTableName(int column)

This method returns the name of the table containing the specified column.

Parameters:

Returns:

Throws:


isAutoIncrement

public boolean isAutoIncrement(int column)

This method test whether or not the column is an auto-increment column. Auto-increment columns are read-only.

Parameters:

Returns:

Throws:


isCaseSensitive

public boolean isCaseSensitive(int column)

This method tests whether or not a column is case sensitive in its values.

Parameters:

Returns:

Throws:


isCurrency

public boolean isCurrency(int column)

This method tests whether or not the column stores a monetary value.

Parameters:

Returns:

Throws:


isDefinitelyWritable

public boolean isDefinitelyWritable(int column)

This method tests whether or not the column is writable. This does guarantee that a write will be successful.

Parameters:

Returns:

Throws:


isNullable

public int isNullable(int column)

This method returns a value indicating whether or not the specified column may contain a NULL value.

Parameters:

Returns:

Throws:


isReadOnly

public boolean isReadOnly(int column)

This method tests whether or not the specified column is read only.

Parameters:

Returns:

Throws:


isSearchable

public boolean isSearchable(int column)

This method tests whether not the specified column can be used in a WHERE clause.

Parameters:

Returns:

Throws:


isSigned

public boolean isSigned(int column)

This method tests whether or not the value of the specified column is signed or unsigned.

Parameters:

Returns:

Throws:


isWritable

public boolean isWritable(int column)

This method tests whether or not the column may be writable. This does not guarantee that a write will be successful.

Parameters:

Returns:

Throws: