javax.servlet.jsp.jstl.sql
Interface ColumnMetaData

All Known Subinterfaces:
Column

public interface ColumnMetaData

A class implementing this interface encapsulates the meta data for a column in a database query result.

Most methods may throw an SQLException. In this case, the exception instance may be the same instance as thrown by the corresponding java.sql.ResultSetMetaData method when the Column instance was created.

Note! Currently this class contains methods corresponding to all ResultSetMetaData methods. We may want to remove some of them that don't make much sense in the context where this class is used.


Method Summary
 java.lang.String getCatalogName()
          Gets the column's table's catalog name.
 java.lang.String getClassName()
          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 getDisplaySize()
          Indicates the column's normal maximum width in characters.
 java.lang.String getLabel()
          Gets the column's suggested title for use in printouts and displays.
 java.lang.String getName()
          Get the designated column's name.
 int getPrecision()
          Get the column's number of decimal digits.
 int getScale()
          Gets the column's number of digits to right of the decimal point.
 java.lang.String getSchemaName()
          Get the column's table's schema.
 java.lang.String getTableName()
          Gets the designated column's table name.
 int getType()
          Retrieves the column's SQL type.
 java.lang.String getTypeName()
          Retrieves the column's database-specific type name.
 boolean isAutoIncrement()
          Indicates whether the column is automatically numbered, thus read-only.
 boolean isCaseSensitive()
          Indicates whether a column's case matters.
 boolean isCurrency()
          Indicates whether the column is a cash value.
 boolean isDefinitelyWritable()
          Indicates whether a write on the column will definitely succeed.
 int isNullable()
          Indicates the nullability of values in the column.
 boolean isReadOnly()
          Indicates whether the column is definitely not writable.
 boolean isSearchable()
          Indicates whether the column can be used in a where clause.
 boolean isSigned()
          Indicates whether values in the column are signed numbers.
 boolean isWritable()
          Indicates whether it is possible for a write on the column to succeed.
 

Method Detail

getName

public java.lang.String getName()
                         throws java.sql.SQLException
Get the designated column's name.

getType

public int getType()
            throws java.sql.SQLException
Retrieves the column's SQL type.

Fix: maybe this method should return a String instead, with the name of the type based on the java.sql.Types statics names.


getTypeName

public java.lang.String getTypeName()
                             throws java.sql.SQLException
Retrieves the column's database-specific type name.

isAutoIncrement

public boolean isAutoIncrement()
                        throws java.sql.SQLException
Indicates whether the column is automatically numbered, thus read-only.

isCaseSensitive

public boolean isCaseSensitive()
                        throws java.sql.SQLException
Indicates whether a column's case matters.

isSearchable

public boolean isSearchable()
                     throws java.sql.SQLException
Indicates whether the column can be used in a where clause.

isCurrency

public boolean isCurrency()
                   throws java.sql.SQLException
Indicates whether the column is a cash value.

isNullable

public int isNullable()
               throws java.sql.SQLException
Indicates the nullability of values in the column.

isSigned

public boolean isSigned()
                 throws java.sql.SQLException
Indicates whether values in the column are signed numbers.

getDisplaySize

public int getDisplaySize()
                   throws java.sql.SQLException
Indicates the column's normal maximum width in characters.

getLabel

public java.lang.String getLabel()
                          throws java.sql.SQLException
Gets the column's suggested title for use in printouts and displays.

getSchemaName

public java.lang.String getSchemaName()
                               throws java.sql.SQLException
Get the column's table's schema.

getPrecision

public int getPrecision()
                 throws java.sql.SQLException
Get the column's number of decimal digits.

getScale

public int getScale()
             throws java.sql.SQLException
Gets the column's number of digits to right of the decimal point.

getTableName

public java.lang.String getTableName()
                              throws java.sql.SQLException
Gets the designated column's table name.

getCatalogName

public java.lang.String getCatalogName()
                                throws java.sql.SQLException
Gets the column's table's catalog name.

isReadOnly

public boolean isReadOnly()
                   throws java.sql.SQLException
Indicates whether the column is definitely not writable.

isWritable

public boolean isWritable()
                   throws java.sql.SQLException
Indicates whether it is possible for a write on the column to succeed.

isDefinitelyWritable

public boolean isDefinitelyWritable()
                             throws java.sql.SQLException
Indicates whether a write on the column will definitely succeed.

getClassName

public java.lang.String getClassName()
                              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.