com.sas.rio
Class MVAPreparedStatement

com.sas.rio.MVAPreparedStatement
All Implemented Interfaces:
com.sas.rio.RIOStatementInterface, com.sas.sql.RIOStatement, java.sql.PreparedStatement, java.sql.Statement, java.sql.Wrapper
Direct Known Subclasses:
MVACallableStatement

public class MVAPreparedStatement
implements java.sql.PreparedStatement

An object that represents a precompiled SQL statement.

A SQL statement is precompiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

See Also:
PreparedStatement

Field Summary
 
Fields inherited from class com.sas.rio.MVAStatement
_currentResultSet, describe, librefs, m_sasifyTableNames, maxFieldSize
 
Method Summary
 void addBatch()
          
 void clearParameters()
          
 boolean execute()
          
 java.sql.ResultSet executeQuery()
          
 int executeUpdate()
          
 java.sql.ResultSetMetaData getMetaData()
          
 java.sql.ParameterMetaData getParameterMetaData()
          The MVAPreparedStatement implementation of getParameterMetaData() is not supported.
 void setArray(int parameterIndex, java.sql.Array x)
          The MVAPreparedStatement implementation of setArray(int, java.sql.Array) is not supported.
 void setAsciiStream(int parameterIndex, java.io.InputStream x)
          The MVAPreparedStatement implementation of setAsciiStream(int, java.io.InputStream) is not supported.
 void setAsciiStream(int parameterIndex, java.io.InputStream x, int length)
          The MVAPreparedStatement implementation of setAsciiStream(int, java.io.InputStream, int) is not supported.
 void setAsciiStream(int parameterIndex, java.io.InputStream x, long length)
          The MVAPreparedStatement implementation of setAsciiStream(int, java.io.InputStream, long) is not supported.
 void setBigDecimal(int parameterIndex, java.math.BigDecimal x)
          The MVAPreparedStatement implementation of setLong(int, BigDecimal) is not supported.
 void setBinaryStream(int parameterIndex, java.io.InputStream x)
          The MVAPreparedStatement implementation of setBinaryStream(int, java.io.InputStream) is not supported.
 void setBinaryStream(int parameterIndex, java.io.InputStream x, int length)
          Sets a parameter to a Java java.io.InputStream.
 void setBinaryStream(int parameterIndex, java.io.InputStream x, long length)
          The MVAPreparedStatement implementation of setBinaryStream(int, java.io.InputStream, long) is not supported.
 void setBlob(int parameterIndex, java.sql.Blob x)
          The MVAPreparedStatement implementation of setBlob(int, java.sql.Blob) is not supported.
 void setBlob(int parameterIndex, java.io.InputStream inputStream)
          The MVAPreparedStatement implementation of setBlob(int, java.io.InputStream) is not supported.
 void setBlob(int parameterIndex, java.io.InputStream inputStream, long length)
          The MVAPreparedStatement implementation of setBlob(int, java.io.InputStream, long) is not supported.
 void setBoolean(int parameterIndex, boolean x)
          
 void setByte(int parameterIndex, byte x)
          
 void setBytes(int parameterIndex, byte[] x)
          Sets a parameter to a Java byte array value.
 void setCharacterStream(int parameterIndex, java.io.Reader reader)
          The MVAPreparedStatement implementation of setCharacterStream(int, java.io.Reader) is not supported.
 void setCharacterStream(int parameterIndex, java.io.Reader reader, int length)
          The MVAPreparedStatement implementation of setCharacterStream(int, java.io.Reader, int) is not supported.
 void setCharacterStream(int parameterIndex, java.io.Reader reader, long length)
          The MVAPreparedStatement implementation of setCharacterStream(int, java.io.Reader, long) is not supported.
 void setClob(int parameterIndex, java.sql.Clob x)
          The MVAPreparedStatement implementation of setClob(int, java.sql.Clob) is not supported.
 void setClob(int parameterIndex, java.io.Reader reader)
          The MVAPreparedStatement implementation of setClob(int, java.io.Reader) is not supported.
 void setClob(int parameterIndex, java.io.Reader reader, long length)
          The MVAPreparedStatement implementation of setClob(int, java.io.Reader, long) is not supported.
 void setDate(int parameterIndex, java.sql.Date x)
          
 void setDate(int parameterIndex, java.sql.Date x, java.util.Calendar cal)
          
 void setDouble(int parameterIndex, double x)
          
 void setFloat(int parameterIndex, float x)
          
 void setInt(int parameterIndex, int x)
          
 void setLong(int parameterIndex, long x)
          The MVAPreparedStatement implementation of setLong(int, long) is not supported.
 void setNCharacterStream(int parameterIndex, java.io.Reader value)
          The MVAPreparedStatement implementation of setNCharacterStream(int, java.io.Reader) is not supported.
 void setNCharacterStream(int parameterIndex, java.io.Reader value, long length)
          The MVAPreparedStatement implementation of setNCharacterStream(int, java.io.Reader, long) is not supported.
 void setNClob(int parameterIndex, java.sql.NClob value)
          The MVAPreparedStatement implementation of setNClob(int, java.sql.NClob) is not supported.
 void setNClob(int parameterIndex, java.io.Reader reader)
          The MVAPreparedStatement implementation of setNClob(int, java.io.Reader) is not supported.
 void setNClob(int parameterIndex, java.io.Reader reader, long length)
          The MVAPreparedStatement implementation of setNClob(int, java.io.Reader, long) is not supported.
 void setNString(int parameterIndex, java.lang.String value)
          The MVAPreparedStatement implementation of setNString(int, String) is not supported.
 void setNull(int parameterIndex, int sqlType)
          The MVAPreparedStatement implementation of setNull(int, int) will set character columns to a blank, and numeric columns to '
 void setNull(int parameterIndex, int sqlType, java.lang.String x)
          The MVAPreparedStatement implementation of setNull(int, int, String) is not supported.
 void setObject(int parameterIndex, java.lang.Object x)
          
 void setObject(int parameterIndex, java.lang.Object x, int sqlType)
          
 void setObject(int parameterIndex, java.lang.Object x, int sqlType, int scale)
          
 void setRef(int parameterIndex, java.sql.Ref x)
          The MVAPreparedStatement implementation of setRef(int, java.sql.Ref) is not supported.
 void setRowId(int parameterIndex, java.sql.RowId x)
          The MVAPreparedStatement implementation of setRowId(int, java.sql.RowId) is not supported.
 void setShort(int parameterIndex, short x)
          
 void setSQLXML(int parameterIndex, java.sql.SQLXML xmlObject)
          The MVAPreparedStatement implementation of setSQLXML(int, SQLXML) is not supported.
 void setString(int parameterIndex, java.lang.String x)
          
 void setTime(int parameterIndex, java.sql.Time x)
          
 void setTime(int parameterIndex, java.sql.Time x, java.util.Calendar cal)
          
 void setTimestamp(int parameterIndex, java.sql.Timestamp x)
          
 void setTimestamp(int parameterIndex, java.sql.Timestamp x, java.util.Calendar cal)
          
 void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length)
          The MVAPreparedStatement implementation of setUnicodeStream(int, java.io.InputStream, int) is not supported.
 void setURL(int parameterIndex, java.net.URL x)
          The MVAPreparedStatement implementation of setURL(int, java.net.URL) is not supported.
 
Methods inherited from class com.sas.rio.MVAStatement
addBatch, addBatch2, cancel, checkClosed, clearBatch, clearWarnings, close, createDualResultSet, createTable, deleteRioTable, deleteRioTable, deleteTable, deleteTable, execute, execute, execute, execute, execute2, executeBatch, executeQuery, executeQuery2, executeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdate2, getConnection, getDualRioTable, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getRioTable, getRioTable, getTable, getTable, getUpdateCount, getWarnings, isClosed, isPoolable, isWrapperFor, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrap
 

Method Detail

execute

public boolean execute()
                throws java.sql.SQLException

Specified by:
execute in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

executeQuery

public java.sql.ResultSet executeQuery()
                                throws java.sql.SQLException

Specified by:
executeQuery in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

executeUpdate

public int executeUpdate()
                  throws java.sql.SQLException

Specified by:
executeUpdate in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setNull

public void setNull(int parameterIndex,
                    int sqlType)
             throws java.sql.SQLException
The MVAPreparedStatement implementation of setNull(int, int) will set character columns to a blank, and numeric columns to '.', the numeric missing value.

Specified by:
setNull in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setBoolean

public void setBoolean(int parameterIndex,
                       boolean x)
                throws java.sql.SQLException

Specified by:
setBoolean in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setByte

public void setByte(int parameterIndex,
                    byte x)
             throws java.sql.SQLException

Specified by:
setByte in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setShort

public void setShort(int parameterIndex,
                     short x)
              throws java.sql.SQLException

Specified by:
setShort in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setInt

public void setInt(int parameterIndex,
                   int x)
            throws java.sql.SQLException

Specified by:
setInt in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setLong

public void setLong(int parameterIndex,
                    long x)
             throws java.sql.SQLException
The MVAPreparedStatement implementation of setLong(int, long) is not supported. The SAS IOM JDBC driver does not support the BIGINT SQL type.

Specified by:
setLong in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setFloat

public void setFloat(int parameterIndex,
                     float x)
              throws java.sql.SQLException

Specified by:
setFloat in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setDouble

public void setDouble(int parameterIndex,
                      double x)
               throws java.sql.SQLException

Specified by:
setDouble in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setBigDecimal

public void setBigDecimal(int parameterIndex,
                          java.math.BigDecimal x)
                   throws java.sql.SQLException
The MVAPreparedStatement implementation of setLong(int, BigDecimal) is not supported. The SAS IOM JDBC driver does not support the NUMERIC SQL type.

Specified by:
setBigDecimal in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setString

public void setString(int parameterIndex,
                      java.lang.String x)
               throws java.sql.SQLException

Specified by:
setString in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setBytes

public void setBytes(int parameterIndex,
                     byte[] x)
              throws java.sql.SQLException
Sets a parameter to a Java byte array value. This method is not supported.

Specified by:
setBytes in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - This exception is always thrown because SAS software does not support SQL type BINARY.

setDate

public void setDate(int parameterIndex,
                    java.sql.Date x)
             throws java.sql.SQLException

Specified by:
setDate in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setTime

public void setTime(int parameterIndex,
                    java.sql.Time x)
             throws java.sql.SQLException

Specified by:
setTime in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setTimestamp

public void setTimestamp(int parameterIndex,
                         java.sql.Timestamp x)
                  throws java.sql.SQLException

Specified by:
setTimestamp in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setAsciiStream

public void setAsciiStream(int parameterIndex,
                           java.io.InputStream x,
                           int length)
                    throws java.sql.SQLException
The MVAPreparedStatement implementation of setAsciiStream(int, java.io.InputStream, int) is not supported.

Specified by:
setAsciiStream in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setUnicodeStream

public void setUnicodeStream(int parameterIndex,
                             java.io.InputStream x,
                             int length)
                      throws java.sql.SQLException
The MVAPreparedStatement implementation of setUnicodeStream(int, java.io.InputStream, int) is not supported.

Specified by:
setUnicodeStream in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setBinaryStream

public void setBinaryStream(int parameterIndex,
                            java.io.InputStream x,
                            int length)
                     throws java.sql.SQLException
Sets a parameter to a Java java.io.InputStream. This method is not supported.

Specified by:
setBinaryStream in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - This exception is always thrown because SAS software does not support SQL type LONGVARBINARY.

clearParameters

public void clearParameters()
                     throws java.sql.SQLException

Specified by:
clearParameters in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x,
                      int sqlType,
                      int scale)
               throws java.sql.SQLException

Specified by:
setObject in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x)
               throws java.sql.SQLException

Specified by:
setObject in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x,
                      int sqlType)
               throws java.sql.SQLException

Specified by:
setObject in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

addBatch

public void addBatch()
              throws java.sql.SQLException

Specified by:
addBatch in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setCharacterStream

public void setCharacterStream(int parameterIndex,
                               java.io.Reader reader,
                               int length)
                        throws java.sql.SQLException
The MVAPreparedStatement implementation of setCharacterStream(int, java.io.Reader, int) is not supported.

Specified by:
setCharacterStream in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setRef

public void setRef(int parameterIndex,
                   java.sql.Ref x)
            throws java.sql.SQLException
The MVAPreparedStatement implementation of setRef(int, java.sql.Ref) is not supported. The SAS IOM JDBC driver does not support the SQL Ref type.

Specified by:
setRef in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setBlob

public void setBlob(int parameterIndex,
                    java.sql.Blob x)
             throws java.sql.SQLException
The MVAPreparedStatement implementation of setBlob(int, java.sql.Blob) is not supported. The SAS IOM JDBC driver does not support the SQL Blob type.

Specified by:
setBlob in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setClob

public void setClob(int parameterIndex,
                    java.sql.Clob x)
             throws java.sql.SQLException
The MVAPreparedStatement implementation of setClob(int, java.sql.Clob) is not supported. The SAS IOM JDBC driver does not support the SQL Clob type.

Specified by:
setClob in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setArray

public void setArray(int parameterIndex,
                     java.sql.Array x)
              throws java.sql.SQLException
The MVAPreparedStatement implementation of setArray(int, java.sql.Array) is not supported. The SAS IOM JDBC driver does not support the SQL Array type.

Specified by:
setArray in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

getMetaData

public java.sql.ResultSetMetaData getMetaData()
                                       throws java.sql.SQLException

Specified by:
getMetaData in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setDate

public void setDate(int parameterIndex,
                    java.sql.Date x,
                    java.util.Calendar cal)
             throws java.sql.SQLException

Specified by:
setDate in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setTime

public void setTime(int parameterIndex,
                    java.sql.Time x,
                    java.util.Calendar cal)
             throws java.sql.SQLException

Specified by:
setTime in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setTimestamp

public void setTimestamp(int parameterIndex,
                         java.sql.Timestamp x,
                         java.util.Calendar cal)
                  throws java.sql.SQLException

Specified by:
setTimestamp in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setNull

public void setNull(int parameterIndex,
                    int sqlType,
                    java.lang.String x)
             throws java.sql.SQLException
The MVAPreparedStatement implementation of setNull(int, int, String) is not supported.

Specified by:
setNull in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

getParameterMetaData

public java.sql.ParameterMetaData getParameterMetaData()
                                                throws java.sql.SQLException
The MVAPreparedStatement implementation of getParameterMetaData() is not supported.

Specified by:
getParameterMetaData in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setURL

public void setURL(int parameterIndex,
                   java.net.URL x)
            throws java.sql.SQLException
The MVAPreparedStatement implementation of setURL(int, java.net.URL) is not supported.

Specified by:
setURL in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setRowId

public void setRowId(int parameterIndex,
                     java.sql.RowId x)
              throws java.sql.SQLException
The MVAPreparedStatement implementation of setRowId(int, java.sql.RowId) is not supported.

Specified by:
setRowId in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setNString

public void setNString(int parameterIndex,
                       java.lang.String value)
                throws java.sql.SQLException
The MVAPreparedStatement implementation of setNString(int, String) is not supported.

Specified by:
setNString in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setNCharacterStream

public void setNCharacterStream(int parameterIndex,
                                java.io.Reader value,
                                long length)
                         throws java.sql.SQLException
The MVAPreparedStatement implementation of setNCharacterStream(int, java.io.Reader, long) is not supported.

Specified by:
setNCharacterStream in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setNClob

public void setNClob(int parameterIndex,
                     java.sql.NClob value)
              throws java.sql.SQLException
The MVAPreparedStatement implementation of setNClob(int, java.sql.NClob) is not supported.

Specified by:
setNClob in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setClob

public void setClob(int parameterIndex,
                    java.io.Reader reader,
                    long length)
             throws java.sql.SQLException
The MVAPreparedStatement implementation of setClob(int, java.io.Reader, long) is not supported.

Specified by:
setClob in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setBlob

public void setBlob(int parameterIndex,
                    java.io.InputStream inputStream,
                    long length)
             throws java.sql.SQLException
The MVAPreparedStatement implementation of setBlob(int, java.io.InputStream, long) is not supported.

Specified by:
setBlob in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setNClob

public void setNClob(int parameterIndex,
                     java.io.Reader reader,
                     long length)
              throws java.sql.SQLException
The MVAPreparedStatement implementation of setNClob(int, java.io.Reader, long) is not supported.

Specified by:
setNClob in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setSQLXML

public void setSQLXML(int parameterIndex,
                      java.sql.SQLXML xmlObject)
               throws java.sql.SQLException
The MVAPreparedStatement implementation of setSQLXML(int, SQLXML) is not supported.

Specified by:
setSQLXML in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setAsciiStream

public void setAsciiStream(int parameterIndex,
                           java.io.InputStream x,
                           long length)
                    throws java.sql.SQLException
The MVAPreparedStatement implementation of setAsciiStream(int, java.io.InputStream, long) is not supported.

Specified by:
setAsciiStream in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setBinaryStream

public void setBinaryStream(int parameterIndex,
                            java.io.InputStream x,
                            long length)
                     throws java.sql.SQLException
The MVAPreparedStatement implementation of setBinaryStream(int, java.io.InputStream, long) is not supported.

Specified by:
setBinaryStream in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setCharacterStream

public void setCharacterStream(int parameterIndex,
                               java.io.Reader reader,
                               long length)
                        throws java.sql.SQLException
The MVAPreparedStatement implementation of setCharacterStream(int, java.io.Reader, long) is not supported.

Specified by:
setCharacterStream in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setAsciiStream

public void setAsciiStream(int parameterIndex,
                           java.io.InputStream x)
                    throws java.sql.SQLException
The MVAPreparedStatement implementation of setAsciiStream(int, java.io.InputStream) is not supported.

Specified by:
setAsciiStream in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setBinaryStream

public void setBinaryStream(int parameterIndex,
                            java.io.InputStream x)
                     throws java.sql.SQLException
The MVAPreparedStatement implementation of setBinaryStream(int, java.io.InputStream) is not supported.

Specified by:
setBinaryStream in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setCharacterStream

public void setCharacterStream(int parameterIndex,
                               java.io.Reader reader)
                        throws java.sql.SQLException
The MVAPreparedStatement implementation of setCharacterStream(int, java.io.Reader) is not supported.

Specified by:
setCharacterStream in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setNCharacterStream

public void setNCharacterStream(int parameterIndex,
                                java.io.Reader value)
                         throws java.sql.SQLException
The MVAPreparedStatement implementation of setNCharacterStream(int, java.io.Reader) is not supported.

Specified by:
setNCharacterStream in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setClob

public void setClob(int parameterIndex,
                    java.io.Reader reader)
             throws java.sql.SQLException
The MVAPreparedStatement implementation of setClob(int, java.io.Reader) is not supported.

Specified by:
setClob in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setBlob

public void setBlob(int parameterIndex,
                    java.io.InputStream inputStream)
             throws java.sql.SQLException
The MVAPreparedStatement implementation of setBlob(int, java.io.InputStream) is not supported.

Specified by:
setBlob in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException

setNClob

public void setNClob(int parameterIndex,
                     java.io.Reader reader)
              throws java.sql.SQLException
The MVAPreparedStatement implementation of setNClob(int, java.io.Reader) is not supported.

Specified by:
setNClob in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException



Copyright © 2009 SAS Institute Inc. All Rights Reserved.