Package com.sas.rio
Class MVAResultSetMetaData
java.lang.Object
com.sas.rio.MVAResultSetMetaData
- All Implemented Interfaces:
- com.sas.rio.RIOResultSetMetaDataInterface,
com.sas.sql.RIOResultSetMetaData,ResultSetMetaData,Wrapper
@Immutable
public class MVAResultSetMetaData
extends Object
implements RIOResultSetMetaDataInterface
A ResultSetMetaData object can be used to find out about the types and
properties of the columns in a ResultSet.
This class is immutable - once a MVAResultSet has been created, its
metadata cannot change.
-
Field Summary
Fields inherited from interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown -
Method Summary
Modifier and TypeMethodDescriptionStringgetCatalogName(int column) Gets the catalog name of the table that the column is in.StringgetColumnClassName(int columnIndex) 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.intGets the number of columns in the ResultSet.intgetColumnDisplaySize(int column) Gets the normal maximum width of the column (in characters).intgetColumnFormatDecimal(int columnIndex) RIO Gets the format decimal of the column.int[]RIO Gets the format lengths of the columns in the ResultSet.intgetColumnFormatLength(int columnIndex) RIO Gets the format length of the column.int[]RIO Gets the format lengths of the columns in the ResultSet.StringgetColumnFormatName(int columnIndex) RIO Gets the format name of the column.String[]RIO Gets the format names of the columns in the ResultSet.intgetColumnFormatWidth(int columnIndex) RIO Gets the format width of the column.int[]RIO Gets the format widths of the columns in the ResultSet.intgetColumnInformatDecimal(int columnIndex) RIO Gets the informat decimal of the column.int[]RIO Gets the informat decimals of the columns in the ResultSet.intgetColumnInformatLength(int columnIndex) RIO Gets the informat length of the column.int[]RIO Gets the informat lengths of the columns in the ResultSet.StringgetColumnInformatName(int columnIndex) RIO Gets the informat name of the column.String[]RIO Gets the informat names of the columns in the ResultSet.intgetColumnInformatWidth(int columnIndex) RIO Gets the informat width of the column.int[]RIO Gets the informat widths of the columns in the ResultSet.StringgetColumnLabel(int column) Gets the suggested column title for use in printouts and displays.StringgetColumnName(int column) Gets the column name.intgetColumnType(int column) Gets the SQL type for the column.StringgetColumnTypeName(int column) Gets the data-source-specific type name for the column.intgetFormatDecimal(int columnIndex) int[]intgetFormatLength(int columnIndex) int[]StringgetFormatName(int columnIndex) String[]intgetFormatWidth(int columnIndex) int[]intgetInformatDecimal(int columnIndex) int[]intgetInformatLength(int columnIndex) int[]StringgetInformatName(int columnIndex) String[]intgetInformatWidth(int columnIndex) int[]intgetPrecision(int column) Gets the maximum number of decimal digits that can be in the column.intgetScale(int column) Gets the number of digits in the column that are to right of the decimal.StringgetSchemaName(int column) Gets the schema name for the table that the column is in.StringgetTableName(int column) Gets the number of digits in the column that are to right of the decimal.booleanisAutoIncrement(int column) Determines whether a column is automatically numbered.booleanisCaseSensitive(int column) Determines whether case matters in a column.booleanisCurrency(int column) Determines whether a column is a cash value.booleanisDefinitelyWritable(int column) Determines whether you can successfully write to the column.intisNullable(int column) Determines whether you can put a NULL in this column.booleanisReadOnly(int column) Determines whether a column is read-only.booleanisSearchable(int column) Determines whether a column can be used in a WHERE clause.booleanisSigned(int column) Determines whether the value in a column is a signed number.booleanisWrapperFor(Class<?> iface) booleanisWritable(int column) Determines whether it is at all possible to successfully write to the column.<T> Tunwrap(Class<T> iface) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
getColumnCount
public int getColumnCount() throws SQLExceptionGets the number of columns in the ResultSet.- Specified by:
getColumnCountin interfaceResultSetMetaData- Returns:
- Number of columns.
- Throws:
SQLException- This exception is required by the interface, but it is never thrown.
-
isAutoIncrement
public boolean isAutoIncrement(int column) throws SQLException Determines whether a column is automatically numbered.- Specified by:
isAutoIncrementin interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- False.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
isCaseSensitive
public boolean isCaseSensitive(int column) throws SQLException Determines whether case matters in a column.- Specified by:
isCaseSensitivein interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- True if the java.sql.Type is VARCHAR; otherwise False.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
isSearchable
public boolean isSearchable(int column) throws SQLException Determines whether a column can be used in a WHERE clause.- Specified by:
isSearchablein interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- True.
- Throws:
SQLException- if column index is invalid
-
isCurrency
public boolean isCurrency(int column) throws SQLException Determines whether a column is a cash value.- Specified by:
isCurrencyin interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- False.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
isNullable
public int isNullable(int column) throws SQLException Determines whether you can put a NULL in this column.- Specified by:
isNullablein interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- ResultSetMetaData.columnNoNulls or ResultSetMetaData.columnNullable.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
isSigned
public boolean isSigned(int column) throws SQLException Determines whether the value in a column is a signed number.- Specified by:
isSignedin interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- False if java.sql.Type.VARCHAR or BIT; otherwise True.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
getColumnDisplaySize
public int getColumnDisplaySize(int column) throws SQLException Gets the normal maximum width of the column (in characters).- Specified by:
getColumnDisplaySizein interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- Maximum width of the column.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
getColumnLabel
public String getColumnLabel(int column) throws SQLException Gets the suggested column title for use in printouts and displays.- Specified by:
getColumnLabelin interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- The column label.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
getColumnName
public String getColumnName(int column) throws SQLException Gets the column name.- Specified by:
getColumnNamein interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- The column name.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
getSchemaName
public String getSchemaName(int column) throws SQLException Gets the schema name for the table that the column is in. SQL pass-thru does not surface any information about which underlying table/tables a particular ResultSet is derived from.- Specified by:
getSchemaNamein interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- An empty string (""). The information is not available.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
getPrecision
public int getPrecision(int column) throws SQLException Gets the maximum number of decimal digits that can be in the column.- Specified by:
getPrecisionin interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- For numeric and date columns, the maximum number of decimal digits; for character columns, the maximum length.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
getScale
public int getScale(int column) throws SQLException Gets the number of digits in the column that are to right of the decimal.- Specified by:
getScalein interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- 0. The information is not available.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
getTableName
public String getTableName(int column) throws SQLException Gets the number of digits in the column that are to right of the decimal. NOTE SQL pass-thru does not surface any information about which underlying table/tables a particular ResultSet was derived from.- Specified by:
getTableNamein interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- 0. The information is not available.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
getCatalogName
public String getCatalogName(int column) throws SQLException Gets the catalog name of the table that the column is in.- Specified by:
getCatalogNamein interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- An empty string (""). The information is not available.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
getColumnType
public int getColumnType(int column) throws SQLException Gets the SQL type for the column.- Specified by:
getColumnTypein interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- java.sql.Type for the column.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.- See Also:
-
getColumnTypeName
public String getColumnTypeName(int column) throws SQLException Gets the data-source-specific type name for the column.- Specified by:
getColumnTypeNamein interfaceResultSetMetaData- 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:
SQLException- This exception is thrown if the value for column is not valid.
-
isReadOnly
public boolean isReadOnly(int column) throws SQLException Determines whether a column is read-only.- Specified by:
isReadOnlyin interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- False.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
isWritable
public boolean isWritable(int column) throws SQLException Determines whether it is at all possible to successfully write to the column.- Specified by:
isWritablein interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- True.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
isDefinitelyWritable
public boolean isDefinitelyWritable(int column) throws SQLException Determines whether you can successfully write to the column.- Specified by:
isDefinitelyWritablein interfaceResultSetMetaData- Parameters:
column- The column index.- Returns:
- False.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
getColumnClassName
public String getColumnClassName(int columnIndex) throws 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.- Specified by:
getColumnClassNamein interfaceResultSetMetaData- Parameters:
columnIndex- The column index.- Returns:
- String version of the class name.
- Throws:
SQLException- This exception is thrown if the value for column is not valid.
-
getColumnFormatName
RIO Gets the format name of the column.- Specified by:
getColumnFormatNamein interfaceRIOResultSetMetaDataInterface- 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:
RIOException- This exception is thrown if the column index is not valid.
-
getColumnFormatNames
RIO Gets the format names of the columns in the ResultSet.- Specified by:
getColumnFormatNamesin interfaceRIOResultSetMetaDataInterface- Returns:
- An array of Strings containing the format names of the columns.
- Throws:
RIOException- This exception is required by the interface but it is never thrown.
-
getColumnFormatLength
RIO Gets the format length of the column.- Specified by:
getColumnFormatLengthin interfaceRIOResultSetMetaDataInterface- 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:
RIOException- This exception is thrown if the column index is not valid.
-
getColumnFormatLengths
RIO Gets the format lengths of the columns in the ResultSet.- Specified by:
getColumnFormatLengthsin interfaceRIOResultSetMetaDataInterface- Returns:
- An array of integer values containing the format lengths of the columns.
- Throws:
RIOException- This exception is required by the interface but it is never thrown.
-
getColumnFormatWidth
RIO Gets the format width of the column.- Specified by:
getColumnFormatWidthin interfaceRIOResultSetMetaDataInterface- 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:
RIOException- This exception is thrown if the column index is not valid.
-
getColumnFormatWidths
RIO Gets the format widths of the columns in the ResultSet.- Specified by:
getColumnFormatWidthsin interfaceRIOResultSetMetaDataInterface- Returns:
- An array of integer values containing the format widths of the columns.
- Throws:
RIOException- This exception is required by the interface but it is never thrown.
-
getColumnFormatDecimal
RIO Gets the format decimal of the column.- Specified by:
getColumnFormatDecimalin interfaceRIOResultSetMetaDataInterface- 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:
RIOException- This exception is thrown if the column index is not valid.
-
getColumnFormatDecimals
RIO Gets the format lengths of the columns in the ResultSet.- Specified by:
getColumnFormatDecimalsin interfaceRIOResultSetMetaDataInterface- Returns:
- An array of int values containing the format lengths of the columns.
- Throws:
RIOException- This exception is required by the interface but it is never thrown.
-
getColumnInformatName
RIO Gets the informat name of the column.- Specified by:
getColumnInformatNamein interfaceRIOResultSetMetaDataInterface- 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:
RIOException- This exception is thrown if the column index is not valid.
-
getColumnInformatNames
RIO Gets the informat names of the columns in the ResultSet.- Specified by:
getColumnInformatNamesin interfaceRIOResultSetMetaDataInterface- Returns:
- An array of String values containing the informat names of the columns.
- Throws:
RIOException- This exception is required by the interface but it is never thrown.
-
getColumnInformatLength
RIO Gets the informat length of the column.- Specified by:
getColumnInformatLengthin interfaceRIOResultSetMetaDataInterface- 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:
RIOException- This exception is thrown if the column index is not valid.
-
getColumnInformatLengths
RIO Gets the informat lengths of the columns in the ResultSet.- Specified by:
getColumnInformatLengthsin interfaceRIOResultSetMetaDataInterface- Returns:
- An array of integer values containing the informat lengths of the columns.
- Throws:
RIOException- This exception is required by the interface but it is never thrown.
-
getColumnInformatWidth
RIO Gets the informat width of the column.- Specified by:
getColumnInformatWidthin interfaceRIOResultSetMetaDataInterface- 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:
RIOException- This exception is thrown if the column index is not valid.
-
getColumnInformatWidths
RIO Gets the informat widths of the columns in the ResultSet.- Specified by:
getColumnInformatWidthsin interfaceRIOResultSetMetaDataInterface- Returns:
- An array of integer values containing the informat widths of the columns.
- Throws:
RIOException- This exception is required by the interface but it is never thrown.
-
getColumnInformatDecimal
RIO Gets the informat decimal of the column.- Specified by:
getColumnInformatDecimalin interfaceRIOResultSetMetaDataInterface- 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:
RIOException- This exception is thrown if the column index is not valid.
-
getColumnInformatDecimals
RIO Gets the informat decimals of the columns in the ResultSet.- Specified by:
getColumnInformatDecimalsin interfaceRIOResultSetMetaDataInterface- Returns:
- An array of integer values containing the informat decimals of the columns.
- Throws:
RIOException- This exception is required by the interface but it is never thrown.
-
unwrap
public <T> T unwrap(Class<T> iface) throws SQLException - Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface) throws SQLException - Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
getFormatName
public String getFormatName(int columnIndex) throws SQLException - Specified by:
getFormatNamein interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getFormatNames
public String[] getFormatNames() throws SQLException- Specified by:
getFormatNamesin interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getFormatLength
public int getFormatLength(int columnIndex) throws SQLException - Specified by:
getFormatLengthin interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getFormatLengths
public int[] getFormatLengths() throws SQLException- Specified by:
getFormatLengthsin interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getFormatWidth
public int getFormatWidth(int columnIndex) throws SQLException - Specified by:
getFormatWidthin interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getFormatWidths
public int[] getFormatWidths() throws SQLException- Specified by:
getFormatWidthsin interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getFormatDecimal
public int getFormatDecimal(int columnIndex) throws SQLException - Specified by:
getFormatDecimalin interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getFormatDecimals
public int[] getFormatDecimals() throws SQLException- Specified by:
getFormatDecimalsin interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getInformatName
public String getInformatName(int columnIndex) throws SQLException - Specified by:
getInformatNamein interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getInformatNames
public String[] getInformatNames() throws SQLException- Specified by:
getInformatNamesin interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getInformatLength
public int getInformatLength(int columnIndex) throws SQLException - Specified by:
getInformatLengthin interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getInformatLengths
public int[] getInformatLengths() throws SQLException- Specified by:
getInformatLengthsin interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getInformatWidth
public int getInformatWidth(int columnIndex) throws SQLException - Specified by:
getInformatWidthin interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getInformatWidths
public int[] getInformatWidths() throws SQLException- Specified by:
getInformatWidthsin interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getInformatDecimal
public int getInformatDecimal(int columnIndex) throws SQLException - Specified by:
getInformatDecimalin interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-
getInformatDecimals
public int[] getInformatDecimals() throws SQLException- Specified by:
getInformatDecimalsin interfacecom.sas.sql.RIOResultSetMetaData- Throws:
SQLException
-