com.sas.rio
Class MVAAnnotatedResultSet

com.sas.rio.MVAAnnotatedResultSet
All Implemented Interfaces:
com.sas.sql.AnnotatedResultSet, java.sql.ResultSet, java.sql.Wrapper

public class MVAAnnotatedResultSet
implements com.sas.sql.AnnotatedResultSet

This class defines the methods that get, set, and clear the ResultSet and column annotations for the IOM JDBC Driver. These annotations correspond to the extended attributes of a SAS data set. These methods can be used with a SAS 9.4 or later workspace server and on ResultSets generated by simple "SELECT * FROM lib.foo" query without any clauses.

The methods are implemented in the MVAAnnotatedResultSet class (com.sas.rio package) and the AnnotatedResultSet interface is defined in com.sas.sql (in sas.core.jar).

Since:
9.4

Field Summary
 
Fields inherited from class com.sas.rio.MVAResultSet
_concurrency, _type, _warnings, _wasNull, CHARACTER, DATE, DATETIME, initialFetchSize, INTEGER, m_columnCount, m_maxRows, m_rowCache, m_statement, MAX_FIELD_SIZE, MAYBE_INTEGER, NOSUBTYPE, NUMERIC, TIME
 
Constructor Summary
MVAAnnotatedResultSet(MVAStatement stmt, java.lang.String libref, java.lang.String tableName, java.lang.String[] password, java.lang.String options, int bindKey, int resultSetConcurrency, java.lang.String segmentLength)
           
 
Method Summary
 void clearColumnAnnotation(int columnIndex, java.lang.String annotationName)
           
 void clearColumnAnnotation(java.lang.String columnName, java.lang.String annotationName)
           
 void clearColumnAnnotations(int columnIndex)
           
 void clearColumnAnnotations(java.lang.String columnName)
           
 void clearResultSetAnnotation(java.lang.String annotationName)
           
 void clearResultSetAnnotations()
           
 java.util.Map<java.lang.String,java.lang.Object> getColumnAnnotations(int columnIndex)
           
 java.util.Map<java.lang.String,java.lang.Object> getColumnAnnotations(java.lang.String columnName)
           
 int getColumnAnnotationType(int columnIndex, java.lang.String annotationName)
           
 int getColumnAnnotationType(java.lang.String columnName, java.lang.String annotationName)
           
 double getDoubleColumnAnnotation(int columnIndex, java.lang.String annotationName)
           
 double getDoubleColumnAnnotation(java.lang.String columnName, java.lang.String annotationName)
           
 double getDoubleResultSetAnnotation(java.lang.String annotationName)
           
 java.lang.Character getMissingValueColumnAnnotation(int columnIndex, java.lang.String annotationName)
           
 java.lang.Character getMissingValueColumnAnnotation(java.lang.String columnName, java.lang.String annotationName)
           
 java.lang.Character getMissingValueResultSetAnnotation(java.lang.String annotationName)
           
 java.util.Map<java.lang.String,java.lang.Object> getResultSetAnnotations()
           
 int getResultSetAnnotationType(java.lang.String annotationName)
           
 java.lang.String getStringColumnAnnotation(int columnIndex, java.lang.String annotationName)
           
 java.lang.String getStringColumnAnnotation(java.lang.String columnName, java.lang.String annotationName)
           
 java.lang.String getStringResultSetAnnotation(java.lang.String annotationName)
           
 boolean hasColumnAnnotation(int columnIndex, java.lang.String annotationName)
           
 boolean hasColumnAnnotation(java.lang.String columnName, java.lang.String annotationName)
           
 boolean hasColumnAnnotations(int columnIndex)
           
 boolean hasColumnAnnotations(java.lang.String columnName)
           
 boolean hasResultSetAnnotation(java.lang.String annotationName)
           
 boolean hasResultSetAnnotations()
           
 void setColumnAnnotations(int columnIndex, java.util.Map<java.lang.String,java.lang.Object> annotations)
           
 void setColumnAnnotations(java.lang.String columnName, java.util.Map<java.lang.String,java.lang.Object> annotations)
           
 void setDoubleColumnAnnotation(int columnIndex, java.lang.String annotationName, java.lang.Double annotationValue)
           
 void setDoubleColumnAnnotation(java.lang.String columnName, java.lang.String annotationName, java.lang.Double annotationValue)
           
 void setDoubleResultSetAnnotation(java.lang.String annotationName, java.lang.Double annotationValue)
           
 void setNullColumnAnnotation(int columnIndex, int jdbcType, java.lang.String annotationName)
           
 void setNullColumnAnnotation(int columnIndex, int jdbcType, java.lang.String annotationName, java.lang.String missingValue)
           
 void setNullResultSetAnnotation(int jdbcType, java.lang.String annotationName)
           
 void setNullResultSetAnnotation(int jdbcType, java.lang.String annotationName, java.lang.String missingValue)
           
 void setResultSetAnnotations(java.util.Map<java.lang.String,java.lang.Object> annotations)
           
 void setStringColumnAnnotation(int columnIndex, java.lang.String annotationName, java.lang.String annotationValue)
           
 void setStringColumnAnnotation(java.lang.String columnName, java.lang.String annotationName, java.lang.String annotationValue)
           
 void setStringResultSetAnnotation(java.lang.String annotationName, java.lang.String annotationValue)
           
 boolean wasAnnotationNull()
           
 java.lang.String[] wasAnnotationsNull()
           
 
Methods inherited from class com.sas.rio.MVAResultSet
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCache, getCharacterStream, getCharacterStream, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, isWrapperFor, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, unwrap, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull
 

Constructor Detail

MVAAnnotatedResultSet

public MVAAnnotatedResultSet(MVAStatement stmt,
                             java.lang.String libref,
                             java.lang.String tableName,
                             java.lang.String[] password,
                             java.lang.String options,
                             int bindKey,
                             int resultSetConcurrency,
                             java.lang.String segmentLength)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException
Method Detail

clearColumnAnnotations

public void clearColumnAnnotations(int columnIndex)
                            throws java.sql.SQLException
Specified by:
clearColumnAnnotations in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

clearColumnAnnotations

public void clearColumnAnnotations(java.lang.String columnName)
                            throws java.sql.SQLException
Specified by:
clearColumnAnnotations in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

clearResultSetAnnotations

public void clearResultSetAnnotations()
                               throws java.sql.SQLException
Specified by:
clearResultSetAnnotations in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getStringColumnAnnotation

public java.lang.String getStringColumnAnnotation(int columnIndex,
                                                  java.lang.String annotationName)
                                           throws java.sql.SQLException
Specified by:
getStringColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getStringColumnAnnotation

public java.lang.String getStringColumnAnnotation(java.lang.String columnName,
                                                  java.lang.String annotationName)
                                           throws java.sql.SQLException
Specified by:
getStringColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getColumnAnnotations

public java.util.Map<java.lang.String,java.lang.Object> getColumnAnnotations(int columnIndex)
                                                                      throws java.sql.SQLException
Specified by:
getColumnAnnotations in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getColumnAnnotations

public java.util.Map<java.lang.String,java.lang.Object> getColumnAnnotations(java.lang.String columnName)
                                                                      throws java.sql.SQLException
Specified by:
getColumnAnnotations in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getStringResultSetAnnotation

public java.lang.String getStringResultSetAnnotation(java.lang.String annotationName)
                                              throws java.sql.SQLException
Specified by:
getStringResultSetAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getResultSetAnnotations

public java.util.Map<java.lang.String,java.lang.Object> getResultSetAnnotations()
                                                                         throws java.sql.SQLException
Specified by:
getResultSetAnnotations in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

hasColumnAnnotation

public boolean hasColumnAnnotation(int columnIndex,
                                   java.lang.String annotationName)
                            throws java.sql.SQLException
Specified by:
hasColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

hasColumnAnnotation

public boolean hasColumnAnnotation(java.lang.String columnName,
                                   java.lang.String annotationName)
                            throws java.sql.SQLException
Specified by:
hasColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

hasColumnAnnotations

public boolean hasColumnAnnotations(int columnIndex)
                             throws java.sql.SQLException
Specified by:
hasColumnAnnotations in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

hasColumnAnnotations

public boolean hasColumnAnnotations(java.lang.String columnName)
                             throws java.sql.SQLException
Specified by:
hasColumnAnnotations in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

hasResultSetAnnotation

public boolean hasResultSetAnnotation(java.lang.String annotationName)
                               throws java.sql.SQLException
Specified by:
hasResultSetAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

hasResultSetAnnotations

public boolean hasResultSetAnnotations()
                                throws java.sql.SQLException
Specified by:
hasResultSetAnnotations in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

setStringColumnAnnotation

public void setStringColumnAnnotation(int columnIndex,
                                      java.lang.String annotationName,
                                      java.lang.String annotationValue)
                               throws java.sql.SQLException
Specified by:
setStringColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

setStringColumnAnnotation

public void setStringColumnAnnotation(java.lang.String columnName,
                                      java.lang.String annotationName,
                                      java.lang.String annotationValue)
                               throws java.sql.SQLException
Specified by:
setStringColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

setColumnAnnotations

public void setColumnAnnotations(int columnIndex,
                                 java.util.Map<java.lang.String,java.lang.Object> annotations)
                          throws java.sql.SQLException
Specified by:
setColumnAnnotations in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

setColumnAnnotations

public void setColumnAnnotations(java.lang.String columnName,
                                 java.util.Map<java.lang.String,java.lang.Object> annotations)
                          throws java.sql.SQLException
Specified by:
setColumnAnnotations in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

setStringResultSetAnnotation

public void setStringResultSetAnnotation(java.lang.String annotationName,
                                         java.lang.String annotationValue)
                                  throws java.sql.SQLException
Specified by:
setStringResultSetAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

setResultSetAnnotations

public void setResultSetAnnotations(java.util.Map<java.lang.String,java.lang.Object> annotations)
                             throws java.sql.SQLException
Specified by:
setResultSetAnnotations in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getDoubleColumnAnnotation

public double getDoubleColumnAnnotation(int columnIndex,
                                        java.lang.String annotationName)
                                 throws java.sql.SQLException
Specified by:
getDoubleColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getDoubleColumnAnnotation

public double getDoubleColumnAnnotation(java.lang.String columnName,
                                        java.lang.String annotationName)
                                 throws java.sql.SQLException
Specified by:
getDoubleColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getDoubleResultSetAnnotation

public double getDoubleResultSetAnnotation(java.lang.String annotationName)
                                    throws java.sql.SQLException
Specified by:
getDoubleResultSetAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

setDoubleColumnAnnotation

public void setDoubleColumnAnnotation(int columnIndex,
                                      java.lang.String annotationName,
                                      java.lang.Double annotationValue)
                               throws java.sql.SQLException
Specified by:
setDoubleColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

setDoubleColumnAnnotation

public void setDoubleColumnAnnotation(java.lang.String columnName,
                                      java.lang.String annotationName,
                                      java.lang.Double annotationValue)
                               throws java.sql.SQLException
Specified by:
setDoubleColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

setDoubleResultSetAnnotation

public void setDoubleResultSetAnnotation(java.lang.String annotationName,
                                         java.lang.Double annotationValue)
                                  throws java.sql.SQLException
Specified by:
setDoubleResultSetAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

wasAnnotationsNull

public java.lang.String[] wasAnnotationsNull()
                                      throws java.sql.SQLException
Specified by:
wasAnnotationsNull in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

wasAnnotationNull

public boolean wasAnnotationNull()
                          throws java.sql.SQLException
Specified by:
wasAnnotationNull in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

setNullColumnAnnotation

public void setNullColumnAnnotation(int columnIndex,
                                    int jdbcType,
                                    java.lang.String annotationName)
                             throws java.sql.SQLException
Specified by:
setNullColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

setNullColumnAnnotation

public void setNullColumnAnnotation(int columnIndex,
                                    int jdbcType,
                                    java.lang.String annotationName,
                                    java.lang.String missingValue)
                             throws java.sql.SQLException
Specified by:
setNullColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

setNullResultSetAnnotation

public void setNullResultSetAnnotation(int jdbcType,
                                       java.lang.String annotationName)
                                throws java.sql.SQLException
Specified by:
setNullResultSetAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

setNullResultSetAnnotation

public void setNullResultSetAnnotation(int jdbcType,
                                       java.lang.String annotationName,
                                       java.lang.String missingValue)
                                throws java.sql.SQLException
Specified by:
setNullResultSetAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getColumnAnnotationType

public int getColumnAnnotationType(java.lang.String columnName,
                                   java.lang.String annotationName)
                            throws java.sql.SQLException
Specified by:
getColumnAnnotationType in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getColumnAnnotationType

public int getColumnAnnotationType(int columnIndex,
                                   java.lang.String annotationName)
                            throws java.sql.SQLException
Specified by:
getColumnAnnotationType in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getResultSetAnnotationType

public int getResultSetAnnotationType(java.lang.String annotationName)
                               throws java.sql.SQLException
Specified by:
getResultSetAnnotationType in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

clearColumnAnnotation

public void clearColumnAnnotation(int columnIndex,
                                  java.lang.String annotationName)
                           throws java.sql.SQLException
Specified by:
clearColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

clearColumnAnnotation

public void clearColumnAnnotation(java.lang.String columnName,
                                  java.lang.String annotationName)
                           throws java.sql.SQLException
Specified by:
clearColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

clearResultSetAnnotation

public void clearResultSetAnnotation(java.lang.String annotationName)
                              throws java.sql.SQLException
Specified by:
clearResultSetAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getMissingValueResultSetAnnotation

public java.lang.Character getMissingValueResultSetAnnotation(java.lang.String annotationName)
                                                       throws java.sql.SQLException
Specified by:
getMissingValueResultSetAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getMissingValueColumnAnnotation

public java.lang.Character getMissingValueColumnAnnotation(int columnIndex,
                                                           java.lang.String annotationName)
                                                    throws java.sql.SQLException
Specified by:
getMissingValueColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException

getMissingValueColumnAnnotation

public java.lang.Character getMissingValueColumnAnnotation(java.lang.String columnName,
                                                           java.lang.String annotationName)
                                                    throws java.sql.SQLException
Specified by:
getMissingValueColumnAnnotation in interface com.sas.sql.AnnotatedResultSet
Throws:
java.sql.SQLException



Copyright © 2009 SAS Institute Inc. All Rights Reserved.