org.postgresql.pljava.jdbc

Class SPIPreparedStatement

Implemented Interfaces:
PreparedStatement, Statement

public class SPIPreparedStatement
extends SPIStatement
implements PreparedStatement

Constructor Summary

SPIPreparedStatement(SPIConnection conn, String statement, int paramCount)

Method Summary

void
addBatch()
void
addBatch(String statement)
The prepared statement cannot have other statements added too it.
void
clearParameters()
void
close()
boolean
execute()
boolean
execute(String statement)
The prepared statement cannot be used for executing oter statements.
protected int
executeBatchEntry(Object batchEntry)
ResultSet
executeQuery()
int
executeUpdate()
ResultSetMetaData
getMetaData()
ResultSetMetaData is not yet supported.
ParameterMetaData
getParameterMetaData()
Due to the design of the SPI_prepare, it is currently impossible to obtain the correct parameter meta data before all the parameters have been set, hence a ParameterMetaData obtained prior to setting the paramteres will have all parameters set to the default type Types.VARCHAR.
void
setArray(int columnIndex, Array value)
void
setAsciiStream(int columnIndex, InputStream value, int length)
void
setBigDecimal(int columnIndex, BigDecimal value)
void
setBinaryStream(int columnIndex, InputStream value, int length)
void
setBlob(int columnIndex, Blob value)
void
setBoolean(int columnIndex, boolean value)
void
setByte(int columnIndex, byte value)
void
setBytes(int columnIndex, byte[] value)
void
setCharacterStream(int columnIndex, Reader value, int length)
void
setClob(int columnIndex, Clob value)
void
setDate(int columnIndex, Date value)
void
setDate(int columnIndex, Date value, Calendar cal)
void
setDouble(int columnIndex, double value)
void
setFloat(int columnIndex, float value)
void
setInt(int columnIndex, int value)
void
setLong(int columnIndex, long value)
void
setNull(int columnIndex, int sqlType)
void
setNull(int columnIndex, int sqlType, String typeName)
void
setObject(int columnIndex, Object value)
void
setObject(int columnIndex, Object value, int sqlType)
void
setObject(int columnIndex, Object value, int sqlType, int scale)
void
setRef(int columnIndex, Ref value)
void
setShort(int columnIndex, short value)
void
setString(int columnIndex, String value)
void
setTime(int columnIndex, Time value)
void
setTime(int columnIndex, Time value, Calendar cal)
void
setTimestamp(int columnIndex, Timestamp value)
void
setTimestamp(int columnIndex, Timestamp value, Calendar cal)
void
setURL(int columnIndex, URL value)
void
setUnicodeStream(int columnIndex, InputStream value, int arg2)
Deprecated.
String
toString()

Methods inherited from class org.postgresql.pljava.jdbc.SPIStatement

addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeBatchEntry, executePlan, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, internalAddBatch, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout

Constructor Details

SPIPreparedStatement

public SPIPreparedStatement(SPIConnection conn,
                            String statement,
                            int paramCount)

Method Details

addBatch

public void addBatch()
            throws SQLException

addBatch

public void addBatch(String statement)
            throws SQLException
The prepared statement cannot have other statements added too it.
Overrides:
addBatch in interface SPIStatement

clearParameters

public void clearParameters()
            throws SQLException

close

public void close()
            throws SQLException
Overrides:
close in interface SPIStatement

execute

public boolean execute()
            throws SQLException

execute

public boolean execute(String statement)
            throws SQLException
The prepared statement cannot be used for executing oter statements.
Overrides:
execute in interface SPIStatement

executeBatchEntry

protected int executeBatchEntry(Object batchEntry)
            throws SQLException
Overrides:
executeBatchEntry in interface SPIStatement

executeQuery

public ResultSet executeQuery()
            throws SQLException

executeUpdate

public int executeUpdate()
            throws SQLException

getMetaData

public ResultSetMetaData getMetaData()
            throws SQLException
ResultSetMetaData is not yet supported.

getParameterMetaData

public ParameterMetaData getParameterMetaData()
            throws SQLException
Due to the design of the SPI_prepare, it is currently impossible to obtain the correct parameter meta data before all the parameters have been set, hence a ParameterMetaData obtained prior to setting the paramteres will have all parameters set to the default type Types.VARCHAR. Once the parameters have been set, a fair attempt is made to generate this object based on the supplied values.
Returns:
The meta data for parameter values.

setArray

public void setArray(int columnIndex,
                     Array value)
            throws SQLException

setAsciiStream

public void setAsciiStream(int columnIndex,
                           InputStream value,
                           int length)
            throws SQLException

setBigDecimal

public void setBigDecimal(int columnIndex,
                          BigDecimal value)
            throws SQLException

setBinaryStream

public void setBinaryStream(int columnIndex,
                            InputStream value,
                            int length)
            throws SQLException

setBlob

public void setBlob(int columnIndex,
                    Blob value)
            throws SQLException

setBoolean

public void setBoolean(int columnIndex,
                       boolean value)
            throws SQLException

setByte

public void setByte(int columnIndex,
                    byte value)
            throws SQLException

setBytes

public void setBytes(int columnIndex,
                     byte[] value)
            throws SQLException

setCharacterStream

public void setCharacterStream(int columnIndex,
                               Reader value,
                               int length)
            throws SQLException

setClob

public void setClob(int columnIndex,
                    Clob value)
            throws SQLException

setDate

public void setDate(int columnIndex,
                    Date value)
            throws SQLException

setDate

public void setDate(int columnIndex,
                    Date value,
                    Calendar cal)
            throws SQLException

setDouble

public void setDouble(int columnIndex,
                      double value)
            throws SQLException

setFloat

public void setFloat(int columnIndex,
                     float value)
            throws SQLException

setInt

public void setInt(int columnIndex,
                   int value)
            throws SQLException

setLong

public void setLong(int columnIndex,
                    long value)
            throws SQLException

setNull

public void setNull(int columnIndex,
                    int sqlType)
            throws SQLException

setNull

public void setNull(int columnIndex,
                    int sqlType,
                    String typeName)
            throws SQLException

setObject

public void setObject(int columnIndex,
                      Object value)
            throws SQLException

setObject

public void setObject(int columnIndex,
                      Object value,
                      int sqlType)
            throws SQLException

setObject

public void setObject(int columnIndex,
                      Object value,
                      int sqlType,
                      int scale)
            throws SQLException

setRef

public void setRef(int columnIndex,
                   Ref value)
            throws SQLException

setShort

public void setShort(int columnIndex,
                     short value)
            throws SQLException

setString

public void setString(int columnIndex,
                      String value)
            throws SQLException

setTime

public void setTime(int columnIndex,
                    Time value)
            throws SQLException

setTime

public void setTime(int columnIndex,
                    Time value,
                    Calendar cal)
            throws SQLException

setTimestamp

public void setTimestamp(int columnIndex,
                         Timestamp value)
            throws SQLException

setTimestamp

public void setTimestamp(int columnIndex,
                         Timestamp value,
                         Calendar cal)
            throws SQLException

setURL

public void setURL(int columnIndex,
                   URL value)
            throws SQLException

setUnicodeStream

public void setUnicodeStream(int columnIndex,
                             InputStream value,
                             int arg2)
            throws SQLException

Deprecated.


toString

public String toString()

Copyright (c) 2003, 2004, 2005 TADA AB - Taby Sweden. \ Distributed under the terms shown in COPYRIGHT