com.sas.rio
Class MVAResultSetMetaData

java.lang.Object
  |
  +--com.sas.rio.MVAResultSetMetaData

public class MVAResultSetMetaData
extends java.lang.Object
implements RIOResultSetMetaDataInterface

A ResultSetMetaData object can be used to find out about the types and properties of the columns in a ResultSet.


Fields inherited from interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown
 
Constructor Summary
MVAResultSetMetaData(MVAResultSet rs)
          Constructs an MVAResultSetMetaData object.
MVAResultSetMetaData(MVAResultSet rs, int[] columnSqlTypes)
          Constructs an MVAResultSetMetaData object.
 
Method Summary
 java.lang.String getCatalogName(int column)
          Gets the catalog name of the table that the column is in.
 java.lang.String getColumnClassName(int column)
          JDBC 2.0 Gets the fully qualified name of the Java class whose instances are manufactured if ResultSet.getObject() is called to retrieve a value from the column.
 int getColumnCount()
          Gets the number of columns in the ResultSet.
 int getColumnDisplaySize(int column)
          Gets the normal maximum width of the column (in characters).
 int getColumnFormatDecimal(int columnIndex)
          RIO Gets the format decimal of the column.
 int[] getColumnFormatDecimals()
          RIO Gets the format lengths of the columns in the ResultSet.
 int getColumnFormatLength(int columnIndex)
          RIO Gets the format length of the column.
 int[] getColumnFormatLengths()
          RIO Gets the format lengths of the columns in the ResultSet.
 java.lang.String getColumnFormatName(int columnIndex)
          RIO Gets the format name of the column.
 java.lang.String[] getColumnFormatNames()
          RIO Gets the format names of the columns in the ResultSet.
 int getColumnFormatWidth(int columnIndex)
          RIO Gets the format width of the column.
 int[] getColumnFormatWidths()
          RIO Gets the format widths of the columns in the ResultSet.
 int getColumnInformatDecimal(int columnIndex)
          RIO Gets the informat decimal of the column.
 int[] getColumnInformatDecimals()
          RIO Gets the informat decimals of the columns in the ResultSet.
 int getColumnInformatLength(int columnIndex)
          RIO Gets the informat length of the column.
 int[] getColumnInformatLengths()
          RIO Gets the informat lengths of the columns in the ResultSet.
 java.lang.String getColumnInformatName(int columnIndex)
          RIO Gets the informat name of the column.
 java.lang.String[] getColumnInformatNames()
          RIO Gets the informat names of the columns in the ResultSet.
 int getColumnInformatWidth(int columnIndex)
          RIO Gets the informat width of the column.
 int[] getColumnInformatWidths()
          RIO Gets the informat widths of the columns in the ResultSet.
 java.lang.String getColumnLabel(int column)
          Gets the suggested column title for use in printouts and displays.
 java.lang.String getColumnName(int column)
          Gets the column name.
 int getColumnType(int column)
          Gets the SQL type for the column.
 java.lang.String getColumnTypeName(int column)
          Gets the data-source-specific type name for the column.
 int getPrecision(int column)
          Gets the maximum number of decimal digits that can be in the column.
 int getScale(int column)
          Gets the number of digits in the column that are to right of the decimal.
 java.lang.String getSchemaName(int column)
          Gets the schema name for the table that the column is in.
 java.lang.String getTableName(int column)
          Gets the number of digits in the column that are to right of the decimal.
 boolean isAutoIncrement(int column)
          Determines whether a column is automatically numbered.
 boolean isCaseSensitive(int column)
          Determines whether case matters in a column.
 boolean isCurrency(int column)
          Determines whether a column is a cash value.
 boolean isDefinitelyWritable(int column)
          Determines whether you can successfully write to the column.
 int isNullable(int column)
          Determines whether you can put a NULL in this column.
 boolean isReadOnly(int column)
          Determines whether a column is read-only.
 boolean isSearchable(int column)
          Determines whether a column can be used in a WHERE clause.
 boolean isSigned(int column)
          Determines whether the value in a column is a signed number.
 boolean isWritable(int column)
          Determines whether it is at all possible to successfully write to the column.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MVAResultSetMetaData

public MVAResultSetMetaData(MVAResultSet rs)
                     throws java.sql.SQLException
Constructs an MVAResultSetMetaData object.
Parameters:
stmt - The MVAResultSet object.
Throws:
java.sql.SQLException - This exception is thrown if an MVAException is detected.

MVAResultSetMetaData

public MVAResultSetMetaData(MVAResultSet rs,
                            int[] columnSqlTypes)
                     throws java.sql.SQLException
Constructs an MVAResultSetMetaData object.
Parameters:
rs - an MVAResultSet object.
columnSqlTypes - an int array of SQLTypes used for modified MVAResultSets generated as a result of some MVADatabaseMetaData methods.
Method Detail

getColumnCount

public int getColumnCount()
                   throws java.sql.SQLException
Gets the number of columns in the ResultSet.
Returns:
Number of columns.
Throws:
java.sql.SQLException - This exception is required by the interface, but it is never thrown.

isAutoIncrement

public boolean isAutoIncrement(int column)
                        throws java.sql.SQLException
Determines whether a column is automatically numbered.
Parameters:
column - The column index.
Returns:
False.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

isCaseSensitive

public boolean isCaseSensitive(int column)
                        throws java.sql.SQLException
Determines whether case matters in a column.
Parameters:
column - The column index.
Returns:
True if the java.sql.Type is VARCHAR; otherwise False.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

isSearchable

public boolean isSearchable(int column)
                     throws java.sql.SQLException
Determines whether a column can be used in a WHERE clause.
Parameters:
column - The column index.
Returns:
True.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

isCurrency

public boolean isCurrency(int column)
                   throws java.sql.SQLException
Determines whether a column is a cash value.
Parameters:
column - The column index.
Returns:
False.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

isNullable

public int isNullable(int column)
               throws java.sql.SQLException
Determines whether you can put a NULL in this column.
Parameters:
column - The column index.
Returns:
ResultSetMetaData.columnNoNulls or ResultSetMetaData.columnNullable.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

isSigned

public boolean isSigned(int column)
                 throws java.sql.SQLException
Determines whether the value in a column is a signed number.
Parameters:
column - The column index.
Returns:
False if java.sql.Type.VARCHAR or BIT; otherwise True.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

getColumnDisplaySize

public int getColumnDisplaySize(int column)
                         throws java.sql.SQLException
Gets the normal maximum width of the column (in characters).
Parameters:
column - The column index.
Returns:
Maximum width of the column.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

getColumnLabel

public java.lang.String getColumnLabel(int column)
                                throws java.sql.SQLException
Gets the suggested column title for use in printouts and displays.
Parameters:
column - The column index.
Returns:
The column label.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

getColumnName

public java.lang.String getColumnName(int column)
                               throws java.sql.SQLException
Gets the column name.
Parameters:
column - The column index.
Returns:
The column name.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

getSchemaName

public java.lang.String getSchemaName(int column)
                               throws java.sql.SQLException
Gets the schema name for the table that the column is in.
Parameters:
column - The column index.
Returns:
An empty string (""). The information is not available.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

getPrecision

public int getPrecision(int column)
                 throws java.sql.SQLException
Gets the maximum number of decimal digits that can be in the column.
Parameters:
column - The column index.
Returns:
For numeric and date columns, the maximum number of decimal digits; for character columns, the maximum length.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

getScale

public int getScale(int column)
             throws java.sql.SQLException
Gets the number of digits in the column that are to right of the decimal.
Parameters:
column - The column index.
Returns:
0. The information is not available.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

getTableName

public java.lang.String getTableName(int column)
                              throws java.sql.SQLException
Gets the number of digits in the column that are to right of the decimal.
Parameters:
column - The column index.
Returns:
0. The information is not available.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

getCatalogName

public java.lang.String getCatalogName(int column)
                                throws java.sql.SQLException
Gets the catalog name of the table that the column is in.
Parameters:
column - The column index.
Returns:
An empty string (""). The information is not available.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

getColumnType

public int getColumnType(int column)
                  throws java.sql.SQLException
Gets the SQL type for the column.
Parameters:
column - The column index.
Returns:
java.sql.Type for the column.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.
See Also:
Types

getColumnTypeName

public java.lang.String getColumnTypeName(int column)
                                   throws java.sql.SQLException
Gets the data-source-specific type name for the column.
Parameters:
column - The column index.
Returns:
String The format name of the column including format width and decimal. An empty string("") is returned if no formats are defined for the column.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

isReadOnly

public boolean isReadOnly(int column)
                   throws java.sql.SQLException
Determines whether a column is read-only.
Parameters:
column - The column index.
Returns:
False.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

isWritable

public boolean isWritable(int column)
                   throws java.sql.SQLException
Determines whether it is at all possible to successfully write to the column.
Parameters:
column - The column index.
Returns:
True.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

isDefinitelyWritable

public boolean isDefinitelyWritable(int column)
                             throws java.sql.SQLException
Determines whether you can successfully write to the column.
Parameters:
column - The column index.
Returns:
False.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

getColumnClassName

public java.lang.String getColumnClassName(int column)
                                    throws java.sql.SQLException
JDBC 2.0 Gets the fully qualified name of the Java class whose instances are manufactured if ResultSet.getObject() is called to retrieve a value from the column. ResultSet.getObject() may return a subClass of the class returned by this method.
Parameters:
column - The column index.
Returns:
String version of the class name.
Throws:
java.sql.SQLException - This exception is thrown if the value for column is not valid.

getColumnFormatName

public java.lang.String getColumnFormatName(int columnIndex)
                                     throws com.sas.rio.RIOException
RIO Gets the format name of the column.
Specified by:
getColumnFormatName in interface RIOResultSetMetaDataInterface
Parameters:
columnIndex - The first column is 1, the second column is 2, and so on.
Returns:
A String containing the format name of the column.
Throws:
com.sas.rio.RIOException - This exception is thrown if the column index is not valid.

getColumnFormatNames

public java.lang.String[] getColumnFormatNames()
                                        throws com.sas.rio.RIOException
RIO Gets the format names of the columns in the ResultSet.
Specified by:
getColumnFormatNames in interface RIOResultSetMetaDataInterface
Returns:
An array of Strings containing the format names of the columns.
Throws:
com.sas.rio.RIOException - This exception is required by the interface but it is never thrown.

getColumnFormatLength

public int getColumnFormatLength(int columnIndex)
                          throws com.sas.rio.RIOException
RIO Gets the format length of the column.
Specified by:
getColumnFormatLength in interface RIOResultSetMetaDataInterface
Parameters:
columnIndex - The first column is 1, the second column is 2, and so on.
Returns:
An integer value containing the format length of the column.
Throws:
com.sas.rio.RIOException - This exception is thrown if the column index is not valid.

getColumnFormatLengths

public int[] getColumnFormatLengths()
                             throws com.sas.rio.RIOException
RIO Gets the format lengths of the columns in the ResultSet.
Specified by:
getColumnFormatLengths in interface RIOResultSetMetaDataInterface
Returns:
An array of integer values containing the format lengths of the columns.
Throws:
com.sas.rio.RIOException - This exception is required by the interface but it is never thrown.

getColumnFormatWidth

public int getColumnFormatWidth(int columnIndex)
                         throws com.sas.rio.RIOException
RIO Gets the format width of the column.
Specified by:
getColumnFormatWidth in interface RIOResultSetMetaDataInterface
Parameters:
columnIndex - The first column is 1, the second column is 2, and so on.
Returns:
An integer value containing the format width of the column.
Throws:
com.sas.rio.RIOException - This exception is thrown if the column index is not valid.

getColumnFormatWidths

public int[] getColumnFormatWidths()
                            throws com.sas.rio.RIOException
RIO Gets the format widths of the columns in the ResultSet.
Specified by:
getColumnFormatWidths in interface RIOResultSetMetaDataInterface
Returns:
An array of integer values containing the format widths of the columns.
Throws:
com.sas.rio.RIOException - This exception is required by the interface but it is never thrown.

getColumnFormatDecimal

public int getColumnFormatDecimal(int columnIndex)
                           throws com.sas.rio.RIOException
RIO Gets the format decimal of the column.
Specified by:
getColumnFormatDecimal in interface RIOResultSetMetaDataInterface
Parameters:
columnIndex - The first column is 1, the second column is 2, and so on.
Returns:
An integer value containing the format decimal of the column.
Throws:
com.sas.rio.RIOException - This exception is thrown if the column index is not valid.

getColumnFormatDecimals

public int[] getColumnFormatDecimals()
                              throws com.sas.rio.RIOException
RIO Gets the format lengths of the columns in the ResultSet.
Specified by:
getColumnFormatDecimals in interface RIOResultSetMetaDataInterface
Returns:
An array of int values containing the format lengths of the columns.
Throws:
com.sas.rio.RIOException - This exception is required by the interface but it is never thrown.

getColumnInformatName

public java.lang.String getColumnInformatName(int columnIndex)
                                       throws com.sas.rio.RIOException
RIO Gets the informat name of the column.
Specified by:
getColumnInformatName in interface RIOResultSetMetaDataInterface
Parameters:
columnIndex - The first column is 1, the second column is 2, and so on.
Returns:
A String containing the informat name of the column.
Throws:
com.sas.rio.RIOException - This exception is thrown if the column index is not valid.

getColumnInformatNames

public java.lang.String[] getColumnInformatNames()
                                          throws com.sas.rio.RIOException
RIO Gets the informat names of the columns in the ResultSet.
Specified by:
getColumnInformatNames in interface RIOResultSetMetaDataInterface
Returns:
An array of String values containing the informat names of the columns.
Throws:
com.sas.rio.RIOException - This exception is required by the interface but it is never thrown.

getColumnInformatLength

public int getColumnInformatLength(int columnIndex)
                            throws com.sas.rio.RIOException
RIO Gets the informat length of the column.
Specified by:
getColumnInformatLength in interface RIOResultSetMetaDataInterface
Parameters:
columnIndex - The first column is 1, the second column is 2, and so on.
Returns:
An integer value containing the informat length of the column.
Throws:
com.sas.rio.RIOException - This exception is thrown if the column index is not valid.

getColumnInformatLengths

public int[] getColumnInformatLengths()
                               throws com.sas.rio.RIOException
RIO Gets the informat lengths of the columns in the ResultSet.
Specified by:
getColumnInformatLengths in interface RIOResultSetMetaDataInterface
Returns:
An array of integer values containing the informat lengths of the columns.
Throws:
com.sas.rio.RIOException - This exception is required by the interface but it is never thrown.

getColumnInformatWidth

public int getColumnInformatWidth(int columnIndex)
                           throws com.sas.rio.RIOException
RIO Gets the informat width of the column.
Specified by:
getColumnInformatWidth in interface RIOResultSetMetaDataInterface
Parameters:
columnIndex - The first column is 1, the second column is 2, and so on.
Returns:
An integer value containing the informat width of the column.
Throws:
com.sas.rio.RIOException - This exception is thrown if the column index is not valid.

getColumnInformatWidths

public int[] getColumnInformatWidths()
                              throws com.sas.rio.RIOException
RIO Gets the informat widths of the columns in the ResultSet.
Specified by:
getColumnInformatWidths in interface RIOResultSetMetaDataInterface
Returns:
An array of integer values containing the informat widths of the columns.
Throws:
com.sas.rio.RIOException - This exception is required by the interface but it is never thrown.

getColumnInformatDecimal

public int getColumnInformatDecimal(int columnIndex)
                             throws com.sas.rio.RIOException
RIO Gets the informat decimal of the column.
Specified by:
getColumnInformatDecimal in interface RIOResultSetMetaDataInterface
Parameters:
columnIndex - The first column is 1, the second column is 2, and so on.
Returns:
An integer value containing the informat decimal of the column.
Throws:
com.sas.rio.RIOException - This exception is thrown if the column index is not valid.

getColumnInformatDecimals

public int[] getColumnInformatDecimals()
                                throws com.sas.rio.RIOException
RIO Gets the informat decimals of the columns in the ResultSet.
Specified by:
getColumnInformatDecimals in interface RIOResultSetMetaDataInterface
Returns:
An array of integer values containing the informat decimals of the columns.
Throws:
com.sas.rio.RIOException - This exception is required by the interface but it is never thrown.