com.wrq.apptrieve.jdbc
Class ApptrievePreparedStatement

java.lang.Object
  extended by com.wrq.apptrieve.jdbc.ApptrieveStatement
      extended by com.wrq.apptrieve.jdbc.ApptrievePreparedStatement
All Implemented Interfaces:
java.sql.PreparedStatement, java.sql.Statement
Direct Known Subclasses:
ApptrieveCallableStatement

public class ApptrievePreparedStatement
extends ApptrieveStatement
implements java.sql.PreparedStatement

The Apptrieve prepared statement class.

Note: The Host Integrator server does not support precompiled SQL. ApptrievePreparedStatement call ApptrieveStatement methods for execute queries.

See Also:
PreparedStatement

Field Summary
 
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
 
Method Summary
 void addBatch()
          This method is not supported by the Host Integrator driver.
 void clearParameters()
          Clears all values set the the PreparedStatement object's IN parameters.
 boolean execute()
          Executes the SQL statement contained in the PreparedStatement object.
 java.sql.ResultSet executeQuery()
          Executes a prepared SQL query statement and returns the results in a ResultSet object.
 int executeUpdate()
          Executes a prepared SQL update statement and returns the number of rows updated.
 java.sql.ResultSetMetaData getMetaData()
          This method is not supported by the Host Integrator driver.
 java.sql.ParameterMetaData getParameterMetaData()
          This method is not supported by the Host Integrator driver.
 void setArray(int parameterIndex, java.sql.Array x)
          This method is not supported by the Host Integrator driver.
 void setAsciiStream(int parameterIndex, java.io.InputStream fin, int length)
          Sets the parameter in position parameterIndex to the input stream object fin, from which length bytes will be read and sent to the Host Integrator server.
 void setBigDecimal(int parameterIndex, java.math.BigDecimal n)
          Sets parameter number parameterIndex to the BigDecimal n.
 void setBinaryStream(int parameterIndex, java.io.InputStream fin, int length)
          Sets parameter number parameterIndex to the input stream object fin, from which length bytes will be read and sent to the Host Integrator server.
 void setBlob(int parameterIndex, java.sql.Blob x)
          This method is not supported by the Host Integrator driver.
 void setBoolean(int parameterIndex, boolean x)
          Sets parameter number parameterIndex to the boolean b.
 void setByte(int parameterIndex, byte x)
          Sets parameter number parameterIndex to the byte x.
 void setBytes(int parameterIndex, byte[] x)
          Sets parameter number parameterIndex to the array of bytes x[].
 void setCharacterStream(int parameterIndex, java.io.Reader reader, int length)
          This method is not supported by the Host Integrator driver.
 void setClob(int parameterIndex, java.sql.Clob x)
          This method is not supported by the Host Integrator driver.
 void setDate(int parameterIndex, java.sql.Date x)
          Sets parameter number parameterIndex to the Date x.
 void setDate(int parameterIndex, java.sql.Date x, java.util.Calendar cal)
          This method is not supported by the Host Integrator driver.
 void setDouble(int parameterIndex, double x)
          Sets parameter number parameterIndex to the double x.
 void setEscapeProcessing(boolean enable)
          ApptrievePreparedStatement does not support escape processing.
 void setFloat(int parameterIndex, float x)
          Sets parameter number parameterIndex to the float x.
 void setInt(int parameterIndex, int x)
          Sets parameter number parameterIndex to the int x.
 void setLong(int parameterIndex, long x)
          Sets parameter number parameterIndex to the long x.
 void setNull(int parameterIndex, int jdbcType)
          Sets parameter number parameterIndex to the JDBC null.
 void setNull(int parameterIndex, int jdbcType, java.lang.String typeName)
          This method is not supported by the Host Integrator driver.
 void setObject(int parameterIndex, java.lang.Object x)
          Sets parameter number parameterIndex to the Object x.
 void setObject(int parameterIndex, java.lang.Object x, int targetJdbcType)
          This method is not supported by the Host Integrator driver.
 void setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale)
          This method is not supported by the Host Integrator driver.
 void setRef(int parameterIndex, java.sql.Ref x)
          This method is not supported by the Host Integrator driver.
 void setShort(int parameterIndex, short x)
          Sets parameter number parameterIndex to the short x.
 void setString(int parameterIndex, java.lang.String x)
          Sets parameter number parameterIndex to the String x.
 void setTime(int parameterIndex, java.sql.Time x)
          Sets parameter number parameterIndex to the Time x.
 void setTime(int parameterIndex, java.sql.Time x, java.util.Calendar cal)
          This method is not supported by the Host Integrator driver.
 void setTimestamp(int parameterIndex, java.sql.Timestamp x)
          Sets parameter number parameterIndex to the Timestamp x.
 void setTimestamp(int parameterIndex, java.sql.Timestamp x, java.util.Calendar cal)
          This method is not supported by the Host Integrator driver.
 void setUnicodeStream(int parameterIndex, java.io.InputStream fin, int length)
          Deprecated. - use setCharacterStream
 void setURL(int parameterIndex, java.net.URL x)
          Deprecated. - use setCharacterStream
 java.lang.String toString()
          Returns the original SQL String.
 
Methods inherited from class com.wrq.apptrieve.jdbc.ApptrieveStatement
addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getConnectionTimeout, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setConnectionTimeout, setCursorName, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
 

Method Detail

addBatch

public void addBatch()
              throws java.sql.SQLException
This method is not supported by the Host Integrator driver.

Specified by:
addBatch in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
PreparedStatement.addBatch()

clearParameters

public void clearParameters()
                     throws java.sql.SQLException
Clears all values set the the PreparedStatement object's IN parameters.

Specified by:
clearParameters in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException
See Also:
PreparedStatement.clearParameters()

execute

public boolean execute()
                throws java.sql.SQLException
Executes the SQL statement contained in the PreparedStatement object.

Specified by:
execute in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException
See Also:
PreparedStatement.execute()

executeQuery

public java.sql.ResultSet executeQuery()
                                throws java.sql.SQLException
Executes a prepared SQL query statement and returns the results in a ResultSet object.

Specified by:
executeQuery in interface java.sql.PreparedStatement
Returns:
ResultSet - the result of the query execution
Throws:
java.sql.SQLException
See Also:
PreparedStatement.executeQuery()

executeUpdate

public int executeUpdate()
                  throws java.sql.SQLException
Executes a prepared SQL update statement and returns the number of rows updated.

Specified by:
executeUpdate in interface java.sql.PreparedStatement
Returns:
int - the number of rows affected by the statement execution. (NOTE: this method always returns 0 because the number of modified rows is unknown)
Throws:
java.sql.SQLException
See Also:
PreparedStatement.executeUpdate()

getMetaData

public java.sql.ResultSetMetaData getMetaData()
                                       throws java.sql.SQLException
This method is not supported by the Host Integrator driver.

Specified by:
getMetaData in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
PreparedStatement.getMetaData()

getParameterMetaData

public java.sql.ParameterMetaData getParameterMetaData()
                                                throws java.sql.SQLException
This method is not supported by the Host Integrator driver.

Specified by:
getParameterMetaData in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
PreparedStatement.getParameterMetaData()

setArray

public void setArray(int parameterIndex,
                     java.sql.Array x)
              throws java.sql.SQLException
This method is not supported by the Host Integrator driver.

Specified by:
setArray in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
PreparedStatement.setArray(int, Array)

setAsciiStream

public void setAsciiStream(int parameterIndex,
                           java.io.InputStream fin,
                           int length)
                    throws java.sql.SQLException
Sets the parameter in position parameterIndex to the input stream object fin, from which length bytes will be read and sent to the Host Integrator server.

Specified by:
setAsciiStream in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
fin - java.io.InputStream - the input stream object to use
length - - the number of bytes to read from the input stream
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setAsciiStream(int, java.io.InputStream, int)

setBigDecimal

public void setBigDecimal(int parameterIndex,
                          java.math.BigDecimal n)
                   throws java.sql.SQLException
Sets parameter number parameterIndex to the BigDecimal n.

Specified by:
setBigDecimal in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
n - BigDecimal - the input value
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setBigDecimal(int, java.math.BigDecimal)

setBinaryStream

public void setBinaryStream(int parameterIndex,
                            java.io.InputStream fin,
                            int length)
                     throws java.sql.SQLException
Sets parameter number parameterIndex to the input stream object fin, from which length bytes will be read and sent to the Host Integrator server.

Specified by:
setBinaryStream in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
fin - InputStream - the input stream
length - int - the number of bytes to read
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setBinaryStream(int, java.io.InputStream, int)

setBlob

public void setBlob(int parameterIndex,
                    java.sql.Blob x)
             throws java.sql.SQLException
This method is not supported by the Host Integrator driver.

Specified by:
setBlob in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
PreparedStatement.setBlob(int, Blob)

setBoolean

public void setBoolean(int parameterIndex,
                       boolean x)
                throws java.sql.SQLException
Sets parameter number parameterIndex to the boolean b.

Specified by:
setBoolean in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
x - boolean - the input value
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setBoolean(int, boolean)

setByte

public void setByte(int parameterIndex,
                    byte x)
             throws java.sql.SQLException
Sets parameter number parameterIndex to the byte x.

Specified by:
setByte in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
x - byte - the input value
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setByte(int, byte)

setBytes

public void setBytes(int parameterIndex,
                     byte[] x)
              throws java.sql.SQLException
Sets parameter number parameterIndex to the array of bytes x[].

Specified by:
setBytes in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
x - byte[] - the input values
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setBytes(int, byte[])

setCharacterStream

public void setCharacterStream(int parameterIndex,
                               java.io.Reader reader,
                               int length)
                        throws java.sql.SQLException
This method is not supported by the Host Integrator driver.

Specified by:
setCharacterStream in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
PreparedStatement.setCharacterStream(int, Reader, int)

setClob

public void setClob(int parameterIndex,
                    java.sql.Clob x)
             throws java.sql.SQLException
This method is not supported by the Host Integrator driver.

Specified by:
setClob in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
PreparedStatement.setClob(int, Clob)

setDate

public void setDate(int parameterIndex,
                    java.sql.Date x)
             throws java.sql.SQLException
Sets parameter number parameterIndex to the Date x.

Specified by:
setDate in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
x - Date - the input value
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setDate(int, java.sql.Date)

setDate

public void setDate(int parameterIndex,
                    java.sql.Date x,
                    java.util.Calendar cal)
             throws java.sql.SQLException
This method is not supported by the Host Integrator driver.

Specified by:
setDate in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
PreparedStatement.setDate(int, java.sql.Date, Calendar)

setDouble

public void setDouble(int parameterIndex,
                      double x)
               throws java.sql.SQLException
Sets parameter number parameterIndex to the double x.

Specified by:
setDouble in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
x - double - the input value
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setDouble(int, double)

setEscapeProcessing

public void setEscapeProcessing(boolean enable)
                         throws java.sql.SQLException
ApptrievePreparedStatement does not support escape processing.

Specified by:
setEscapeProcessing in interface java.sql.Statement
Overrides:
setEscapeProcessing in class ApptrieveStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
Statement.setEscapeProcessing(boolean)

setFloat

public void setFloat(int parameterIndex,
                     float x)
              throws java.sql.SQLException
Sets parameter number parameterIndex to the float x.

Specified by:
setFloat in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
x - float - the input value
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setFloat(int, float)

setInt

public void setInt(int parameterIndex,
                   int x)
            throws java.sql.SQLException
Sets parameter number parameterIndex to the int x.

Specified by:
setInt in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
x - int - the input value
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setInt(int, int)

setLong

public void setLong(int parameterIndex,
                    long x)
             throws java.sql.SQLException
Sets parameter number parameterIndex to the long x.

Specified by:
setLong in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
x - long - the input value
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setLong(int, long)

setNull

public void setNull(int parameterIndex,
                    int jdbcType)
             throws java.sql.SQLException
Sets parameter number parameterIndex to the JDBC null.

Specified by:
setNull in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
jdbcType - int - the JDBC type code defined in java.sql.Types
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setNull(int, int)

setNull

public void setNull(int parameterIndex,
                    int jdbcType,
                    java.lang.String typeName)
             throws java.sql.SQLException
This method is not supported by the Host Integrator driver.

Specified by:
setNull in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown
See Also:
PreparedStatement.setNull(int, int, String)

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x)
               throws java.sql.SQLException
Sets parameter number parameterIndex to the Object x.

Specified by:
setObject in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
x - Object - the input object
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setObject(int, java.lang.Object, int, int)

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x,
                      int targetJdbcType)
               throws java.sql.SQLException
This method is not supported by the Host Integrator driver.

Specified by:
setObject in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
PreparedStatement.setObject(int, Object, int)

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x,
                      int targetSqlType,
                      int scale)
               throws java.sql.SQLException
This method is not supported by the Host Integrator driver.

Specified by:
setObject in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
PreparedStatement.setObject(int, Object, int, int)

setRef

public void setRef(int parameterIndex,
                   java.sql.Ref x)
            throws java.sql.SQLException
This method is not supported by the Host Integrator driver.

Specified by:
setRef in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
PreparedStatement.setRef(int, Ref)

setShort

public void setShort(int parameterIndex,
                     short x)
              throws java.sql.SQLException
Sets parameter number parameterIndex to the short x.

Specified by:
setShort in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
x - short - the input value
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setShort(int, short)

setString

public void setString(int parameterIndex,
                      java.lang.String x)
               throws java.sql.SQLException
Sets parameter number parameterIndex to the String x.

Specified by:
setString in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
x - java.lang.String - the input value
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setString(int, java.lang.String)

setTime

public void setTime(int parameterIndex,
                    java.sql.Time x)
             throws java.sql.SQLException
Sets parameter number parameterIndex to the Time x.

Specified by:
setTime in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
x - Time - the input value
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setTime(int, java.sql.Time)

setTime

public void setTime(int parameterIndex,
                    java.sql.Time x,
                    java.util.Calendar cal)
             throws java.sql.SQLException
This method is not supported by the Host Integrator driver.

Specified by:
setTime in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
PreparedStatement.setTime(int, Time, Calendar)

setTimestamp

public void setTimestamp(int parameterIndex,
                         java.sql.Timestamp x)
                  throws java.sql.SQLException
Sets parameter number parameterIndex to the Timestamp x.

Specified by:
setTimestamp in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
x - Timestamp - the input value
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setTimestamp(int, java.sql.Timestamp)

setTimestamp

public void setTimestamp(int parameterIndex,
                         java.sql.Timestamp x,
                         java.util.Calendar cal)
                  throws java.sql.SQLException
This method is not supported by the Host Integrator driver.

Specified by:
setTimestamp in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
PreparedStatement.setTimestamp(int, Timestamp, Calendar)

setUnicodeStream

public void setUnicodeStream(int parameterIndex,
                             java.io.InputStream fin,
                             int length)
                      throws java.sql.SQLException
Deprecated. - use setCharacterStream

Sets parameter number parameterIndex to the input stream object fin, from which length bytes will be read and sent to the Host Integrator server.

Specified by:
setUnicodeStream in interface java.sql.PreparedStatement
Parameters:
parameterIndex - int - the position of the input parameter
fin - java.io.InputStream - the input value
length - int - the number of bytes to read from fin
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setUnicodeStream(int, java.io.InputStream, int)

setURL

public void setURL(int parameterIndex,
                   java.net.URL x)
            throws java.sql.SQLException
Deprecated. - use setCharacterStream

This method is not supported by the Host Integrator driver.

Specified by:
setURL in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - - always thrown.
See Also:
PreparedStatement.setURL(int , URL)

toString

public java.lang.String toString()
Returns the original SQL String.

Overrides:
toString in class java.lang.Object
Returns:
String