org.acmsl.queryj
Class Query

java.lang.Object
  |
  +--org.acmsl.queryj.Query
All Implemented Interfaces:
java.sql.PreparedStatement, java.sql.Statement
Direct Known Subclasses:
SelectQuery

public abstract class Query
extends java.lang.Object
implements java.sql.PreparedStatement

Represents queries to access persistent data.

Version:
$Revision: 1.1 $
Author:
Jose San Leandro

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
 
Constructor Summary
Query()
          Constructs a query.
 
Method Summary
 void addBatch()
          See java.sql.PreparedStatement#addBatch().
 void addBatch(java.lang.String sql)
          See java.sql.Statement#addBatch(String).
protected  void addCondition(Condition condition)
          Adds a new condition.
protected  void addTable(Table table)
          Adds a new table.
protected  void addVariableCondition(VariableCondition variableCondition)
          Adds a new variable condition.
 void cancel()
          See java.sql.Statement#cancel().
 void clearBatch()
          See java.sql.Statement#clearBatch().
 void clearParameters()
          See java.sql.PreparedStatement#clearParameters().
 void clearWarnings()
          See java.sql.Statement#clearWarnings().
 void close()
          See java.sql.Statement#close().
 boolean execute()
          See java.sql.PreparedStatement#execute().
 boolean execute(java.lang.String sql)
          See java.sql.Statement#execute(String).
 boolean execute(java.lang.String sql, int autogeneratedKeys)
          See Statement#execute(String,int)
 boolean execute(java.lang.String sql, int[] columnIndexes)
          See Statement#execute(String,int[])
 boolean execute(java.lang.String sql, java.lang.String[] columnNames)
          See Statement#execute(String,String[])
 int[] executeBatch()
          See java.sql.Statement#executeBatch().
abstract  java.sql.ResultSet executeQuery()
          See java.sql.PreparedStatement#executeQuery().
 java.sql.ResultSet executeQuery(java.lang.String sql)
          See java.sql.Statement#executeQuery().
 int executeUpdate()
          See java.sql.PreparedStatement#executeUpdate().
 int executeUpdate(java.lang.String sql)
          See java.sql.Statement#executeUpdate().
 int executeUpdate(java.lang.String sql, int autogeneratedKeys)
          See Statement#executeUpdate(String,int)
 int executeUpdate(java.lang.String sql, int[] columnIndexes)
          See Statement#executeUpdate(String,int[])
 int executeUpdate(java.lang.String sql, java.lang.String[] columnNames)
          See Statement#executeUpdate(String,String[])
protected  java.util.List getConditions()
          Retrieves the condition collection.
 java.sql.Connection getConnection()
          See java.sql.Statement#getConnection().
 int getFetchDirection()
          See java.sql.Statement#getFetchDirection().
 int getFetchSize()
          See java.sql.Statement#getFetchSize().
abstract  java.sql.ResultSet getGeneratedKeys()
          See Statement#getGeneratedKeys()
protected  int getIndex(java.util.List list, java.lang.Object object)
          Retrieves the position of given item on the query.
 int getMaxFieldSize()
          See java.sql.Statement#getMaxFieldSize().
 int getMaxRows()
          See java.sql.Statement#getMaxRows().
 java.sql.ResultSetMetaData getMetaData()
          See java.sql.PreparedStatement#getMetaData().
 boolean getMoreResults()
          See java.sql.Statement#getMoreResults().
 boolean getMoreResults(int current)
          See Statement#getMoreResults(int)
 java.sql.ParameterMetaData getParameterMetaData()
          See PreparedStatement#getParameterMetaData()
protected  java.sql.PreparedStatement getPreparedStatement()
          Retrieves the statement.
 int getQueryTimeout()
          See java.sql.Statement#getQueryTimeout().
 java.sql.ResultSet getResultSet()
          See java.sql.Statement#getResultSet().
 int getResultSetConcurrency()
          See java.sql.Statement#getResultSetConcurrency().
 int getResultSetHoldability()
          See Statement#getResultSetHoldability()
 int getResultSetType()
          See java.sql.Statement#getResultSetType().
protected  java.util.List getTables()
          Retrieves the table collection.
 int getUpdateCount()
          See java.sql.Statement#getUpdateCount().
protected  java.util.List getVariableConditions()
          Retrieves the variable condition collection.
 java.sql.SQLWarning getWarnings()
          See java.sql.Statement#getWarnings().
 java.sql.PreparedStatement prepareStatement(java.sql.Connection connection)
          Prepares a statement.
abstract  QueryResultSet retrieveMatchingResults()
          Looks for the records that match the filter.
 void setArray(int index, java.sql.Array value)
          See java.sql.PreparedStatement#setArray(int,Array).
 void setArray(VariableCondition condition, java.sql.Array value)
          Specifies the value of an Array parameter, associated with a previously specified variable condition.
 void setAsciiStream(int index, java.io.InputStream inputStream, int length)
          See java.sql.PreparedStatement#setAsciiStream(int,InputStram,int).
 void setAsciiStream(VariableCondition condition, java.io.InputStream inputStream, int length)
          Specifies the value of a parameter formatted as an ASCII stream, associated with a previously specified variable condition.
 void setBigDecimal(int index, java.math.BigDecimal value)
          See java.sql.PreparedStatement#setBigDecimal(int,BigDecimal).
 void setBigDecimal(VariableCondition condition, java.math.BigDecimal value)
          Specifies the value of a BigDecimal parameter, associated with a previously specified variable condition.
 void setBinaryStream(int index, java.io.InputStream inputStream, int length)
          See java.sql.PreparedStatement#setBinaryStream(int,InputStream).
 void setBinaryStream(VariableCondition condition, java.io.InputStream inputStream, int length)
          Specifies the value of a parameter formatted as a binary stream, associated with a previously specified variable condition.
 void setBlob(int index, java.sql.Blob value)
          See java.sql.PreparedStatement#setBlob(int,Blob).
 void setBlob(VariableCondition condition, java.sql.Blob value)
          Specifies the value of a blob parameter, associated with a previously specified variable condition.
 void setBoolean(int index, boolean flag)
          See java.sql.PreparedStatement#setBoolean(int,boolean).
 void setBoolean(VariableCondition condition, boolean value)
          Specifies the value of a boolean parameter, associated with a previously specified variable condition.
 void setByte(int index, byte b)
          See java.sql.PreparedStatement#setByte(int,byte).
 void setByte(VariableCondition condition, byte value)
          Specifies the value of a byte parameter, associated with a previously specified variable condition.
 void setBytes(int index, byte[] value)
          See java.sql.PreparedStatement#setBytes(int,byte[]).
 void setBytes(VariableCondition condition, byte[] value)
          Specifies the value of a byte array parameter, associated with a previously specified variable condition.
 void setCharacterStream(int index, java.io.Reader reader, int length)
          See java.sql.PreparedStatement#setCharacterStream(int,Reader,int).
 void setCharacterStream(VariableCondition condition, java.io.Reader reader, int length)
          Specifies the value of a parameter formatted as a binary stream, associated with a previously specified variable condition.
 void setClob(int index, java.sql.Clob value)
          See java.sql.PreparedStatement#setClob(int,Clob).
 void setClob(VariableCondition condition, java.sql.Clob value)
          Specifies the value of a clob parameter, associated with a previously specified variable condition.
protected  void setConditions(java.util.List list)
          Specifies new condition collection.
 void setCursorName(java.lang.String name)
          See java.sql.Statement#setCursorName(String).
 void setDate(int index, java.sql.Date value)
          See java.sql.PreparedStatement#setDate(int,Date).
 void setDate(int index, java.sql.Date value, java.util.Calendar calendar)
          See java.sql.PreparedStatement#setDate(int,Date,Calendar).
 void setDate(VariableCondition condition, java.sql.Date value)
          Specifies the value of a date parameter, associated with a previously specified variable condition.
 void setDate(VariableCondition condition, java.sql.Date value, java.util.Calendar calendar)
          Specifies the value of a date parameter, associated with a previously specified variable condition.
 void setDouble(int index, double value)
          See java.sql.PreparedStatement#setDouble(int,double).
 void setDouble(VariableCondition condition, double value)
          Specifies the value of a double parameter, associated with a previously specified variable condition.
 void setEscapeProcessing(boolean flag)
          See java.sql.Statement#setEscapeProcessing(boolean).
 void setFetchDirection(int direction)
          See java.sql.Statement#setFetchDirection(int).
 void setFetchSize(int size)
          See java.sql.Statement#setFetchSize(int).
 void setFloat(int index, float value)
          See java.sql.PreparedStatement#setFloat(int,float).
 void setFloat(VariableCondition condition, float value)
          Specifies the value of a float parameter, associated with a previously specified variable condition.
 void setInt(int index, int value)
          See java.sql.PreparedStatement#setInt(int,int).
 void setInt(VariableCondition condition, int value)
          Specifies the value of an int parameter, associated with a previously specified variable condition.
 void setLong(int index, long value)
          See java.sql.PreparedStatement#setLong(int,long).
 void setLong(VariableCondition condition, long value)
          Specifies the value of a long parameter, associated with a previously specified variable condition.
 void setMaxFieldSize(int size)
          See java.sql.Statement#setMaxFieldSize(int).
 void setMaxRows(int max)
          See java.sql.Statement#setMaxRows(int).
 void setNull(int index, int sqlType)
          See java.sql.PreparedStatement#setNull(int,int).
 void setNull(int index, int sqlType, java.lang.String typeName)
          See java.sql.PreparedStatement#setNull(int,int,String).
 void setNull(VariableCondition condition, int sqlType)
          Specifies as null the value of a parameter, associated with a previously specified variable condition.
 void setNull(VariableCondition condition, int sqlType, java.lang.String typeName)
          Specifies as null the value of a parameter, associated with a previously specified variable condition.
 void setObject(int index, java.lang.Object value)
          See java.sql.PreparedStatement#setObject(int,Object).
 void setObject(int index, java.lang.Object value, int sqlType)
          See java.sql.PreparedStatement#setObject(int,Object,int).
 void setObject(int index, java.lang.Object value, int sqlType, int scale)
          See java.sql.PreparedStatement#setObject(int,Object,int,int).
 void setObject(VariableCondition condition, java.lang.Object value)
          Specifies the value of an object parameter, associated with a previously specified variable condition.
 void setObject(VariableCondition condition, java.lang.Object value, int sqlType)
          Specifies the value of an object parameter, associated with a previously specified variable condition.
 void setObject(VariableCondition condition, java.lang.Object value, int sqlType, int scale)
          Specifies the value of an object parameter, associated with a previously specified variable condition.
protected  void setPreparedStatement(java.sql.PreparedStatement statement)
          Specifies the statement.
 void setQueryTimeout(int timeout)
          See java.sql.Statement#setQueryTimeout(int).
 void setRef(int index, java.sql.Ref value)
          See java.sql.PreparedStatement#setRef(int,Ref).
 void setRef(VariableCondition condition, java.sql.Ref value)
          Specifies the value of a ref parameter, associated with a previously specified variable condition.
 void setShort(int index, short s)
          See java.sql.PreparedStatement#setShort(int,short).
 void setShort(VariableCondition condition, short value)
          Specifies the value of a short parameter, associated with a previously specified variable condition.
 void setString(int index, java.lang.String value)
          See java.sql.PreparedStatement#setString(int,String).
 void setString(VariableCondition condition, java.lang.String value)
          Specifies the value of a String parameter, associated with a previously specified variable condition.
protected  void setTables(java.util.List list)
          Specifies new table collection.
 void setTime(int index, java.sql.Time time)
          See java.sql.PreparedStatement#setTime(int,java.sql.Time).
 void setTime(int index, java.sql.Time time, java.util.Calendar calendar)
          See java.sql.PreparedStatement#setTime(int,Time,Calendar).
 void setTime(VariableCondition condition, java.sql.Time value)
          Specifies the value of a time parameter, associated with a previously specified variable condition.
 void setTime(VariableCondition condition, java.sql.Time value, java.util.Calendar calendar)
          Specifies the value of a time parameter, associated with a previously specified variable condition.
 void setTimestamp(int index, java.sql.Timestamp value)
          See java.sql.PreparedStatement#setTimestamp(int,Timestamp).
 void setTimestamp(int index, java.sql.Timestamp value, java.util.Calendar calendar)
          See java.sql.PreparedStatement#setTimestamp(int,Timestamp,Calendar).
 void setTimestamp(VariableCondition condition, java.sql.Timestamp value)
          Specifies the value of a timestamp parameter, associated with a previously specified variable condition.
 void setTimestamp(VariableCondition condition, java.sql.Timestamp value, java.util.Calendar calendar)
          Specifies the value of a timestamp parameter, associated with a previously specified variable condition.
 void setUnicodeStream(int index, java.io.InputStream inputStream, int length)
          See java.sql.PreparedStatement#setUnicodeStream(int,InputStream,int).
 void setUnicodeStream(VariableCondition condition, java.io.InputStream inputStream, int length)
          Specifies the value of a parameter formatted as an Unicode stream, associated with a previously specified variable condition.
 void setURL(int parameterIndex, java.net.URL url)
          See PreparedStatement#setURL(int,URL)
protected  void setVariableConditions(java.util.List list)
          Specifies new variable condition collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Query

public Query()
Constructs a query.

Method Detail

setPreparedStatement

protected void setPreparedStatement(java.sql.PreparedStatement statement)
Specifies the statement.

Parameters:
statement - the prepared statement.

getPreparedStatement

protected java.sql.PreparedStatement getPreparedStatement()
Retrieves the statement.

Returns:
such statement.

setTables

protected void setTables(java.util.List list)
Specifies new table collection.

Parameters:
list - the new list.

getTables

protected java.util.List getTables()
Retrieves the table collection.

Returns:
such list.

addTable

protected void addTable(Table table)
Adds a new table.

Parameters:
table - the table to add.

setConditions

protected void setConditions(java.util.List list)
Specifies new condition collection.

Parameters:
list - the new list.

getConditions

protected java.util.List getConditions()
Retrieves the condition collection.

Returns:
such list.

addCondition

protected void addCondition(Condition condition)
Adds a new condition.

Parameters:
condition - the condition to add.

setVariableConditions

protected void setVariableConditions(java.util.List list)
Specifies new variable condition collection.

Parameters:
list - the new list.

getVariableConditions

protected java.util.List getVariableConditions()
Retrieves the variable condition collection.

Returns:
such list.

addVariableCondition

protected void addVariableCondition(VariableCondition variableCondition)
Adds a new variable condition.

Parameters:
variableCondition - the variable condition to add.

getIndex

protected int getIndex(java.util.List list,
                       java.lang.Object object)
Retrieves the position of given item on the query.

Parameters:
list - the concrete list (fields, tables, conditions, etc.).
object - the object to find.
Returns:
its position, or -1 if such item doesn't belong to this query.

prepareStatement

public java.sql.PreparedStatement prepareStatement(java.sql.Connection connection)
                                            throws java.sql.SQLException
Prepares a statement.

Parameters:
connection - the JDBC connection.
Returns:
the statement.
Throws:
java.sql.SQLException - if an error occurs.

retrieveMatchingResults

public abstract QueryResultSet retrieveMatchingResults()
                                                throws java.sql.SQLException
Looks for the records that match the filter.

Returns:
(Taken from Sun's Javadoc) a ResultSet object that contains the data produced by the given query; never null.
Throws:
java.sql.SQLException - if an error occurs.

close

public void close()
           throws java.sql.SQLException
See java.sql.Statement#close().

Specified by:
close in interface java.sql.Statement
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.close()

execute

public boolean execute(java.lang.String sql)
                throws java.sql.SQLException
See java.sql.Statement#execute(String).

Specified by:
execute in interface java.sql.Statement
Parameters:
sql - (Taken from Sun's Javadoc) any SQL statement.
Returns:
(Taken from Sun's Javadoc) true if the first result is a ResultSet object; false if it is an update count or there are no results.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
java.sql.Statement#close(String)

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
See java.sql.Statement#getConnection().

Specified by:
getConnection in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) the connection that produced this statement.
Throws:
java.sql.SQLException - if an error occurs
See Also:
Statement.getConnection()

getWarnings

public java.sql.SQLWarning getWarnings()
                                throws java.sql.SQLException
See java.sql.Statement#getWarnings().

Specified by:
getWarnings in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) the first SQLWarning object or null if there are no warnings .
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.getWarnings()

clearWarnings

public void clearWarnings()
                   throws java.sql.SQLException
See java.sql.Statement#clearWarnings().

Specified by:
clearWarnings in interface java.sql.Statement
Throws:
java.sql.SQLException - if an error occurs
See Also:
Statement.clearWarnings()

executeQuery

public java.sql.ResultSet executeQuery(java.lang.String sql)
                                throws java.sql.SQLException
See java.sql.Statement#executeQuery().

Specified by:
executeQuery in interface java.sql.Statement
Parameters:
sql - (Taken from Sun's Javadoc) an SQL statement to be sent to the database, typically a static SQL SELECT statement.
Returns:
(Taken from Sun's Javadoc) a ResultSet object that contains the data produced by the given query; never null.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
java.sql.Statement#executeQuery()

executeUpdate

public int executeUpdate(java.lang.String sql)
                  throws java.sql.SQLException
See java.sql.Statement#executeUpdate().

Specified by:
executeUpdate in interface java.sql.Statement
Parameters:
sql - (Taken from Sun's Javadoc) an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing.
Returns:
(Taken from Sun's Javadoc) a ResultSet object that contains the data produced by the given query; never null.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
java.sql.Statement#executeUpdate()

getMaxFieldSize

public int getMaxFieldSize()
                    throws java.sql.SQLException
See java.sql.Statement#getMaxFieldSize().

Specified by:
getMaxFieldSize in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) the current column size limit for columns storing character and binary values; zero means there is no limit.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.getMaxFieldSize()

setMaxFieldSize

public void setMaxFieldSize(int size)
                     throws java.sql.SQLException
See java.sql.Statement#setMaxFieldSize(int).

Specified by:
setMaxFieldSize in interface java.sql.Statement
Parameters:
size - (Taken from Sun's Javadoc) the new column size limit in bytes; zero means there is no limit.
Throws:
java.sql.SQLException - if an error occurs
See Also:
Statement.setMaxFieldSize(int)

getMaxRows

public int getMaxRows()
               throws java.sql.SQLException
See java.sql.Statement#getMaxRows().

Specified by:
getMaxRows in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) the current maximum number of rows for a ResultSet object produced by this Statement object; zero means there is no limit.
Throws:
java.sql.SQLException - if an error occurs
See Also:
Statement.getMaxRows()

setMaxRows

public void setMaxRows(int max)
                throws java.sql.SQLException
See java.sql.Statement#setMaxRows(int).

Specified by:
setMaxRows in interface java.sql.Statement
Parameters:
max - (Taken from Sun's Javadoc) the new max rows limit; zero means there is no limit.
Throws:
java.sql.SQLException - if an error occurs
See Also:
Statement.setMaxRows(int)

setEscapeProcessing

public void setEscapeProcessing(boolean flag)
                         throws java.sql.SQLException
See java.sql.Statement#setEscapeProcessing(boolean).

Specified by:
setEscapeProcessing in interface java.sql.Statement
Throws:
java.sql.SQLException - if an error occurs
See Also:
Statement.setEscapeProcessing(boolean)

getQueryTimeout

public int getQueryTimeout()
                    throws java.sql.SQLException
See java.sql.Statement#getQueryTimeout().

Specified by:
getQueryTimeout in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) the current query timeout limit in seconds; zero means there is no limit.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.getQueryTimeout()

setQueryTimeout

public void setQueryTimeout(int timeout)
                     throws java.sql.SQLException
See java.sql.Statement#setQueryTimeout(int).

Specified by:
setQueryTimeout in interface java.sql.Statement
Parameters:
timeout - (Taken from Sun's Javadoc) the new query timeout limit in seconds; zero means there is no limit.
Throws:
java.sql.SQLException - if an error occurs
See Also:
Statement.setQueryTimeout(int)

cancel

public void cancel()
            throws java.sql.SQLException
See java.sql.Statement#cancel().

Specified by:
cancel in interface java.sql.Statement
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.cancel()

setCursorName

public void setCursorName(java.lang.String name)
                   throws java.sql.SQLException
See java.sql.Statement#setCursorName(String).

Specified by:
setCursorName in interface java.sql.Statement
Parameters:
name - (Taken from Sun's Javadoc) the new cursor name, which must be unique within a connection.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.setCursorName(String)

getResultSet

public java.sql.ResultSet getResultSet()
                                throws java.sql.SQLException
See java.sql.Statement#getResultSet().

Specified by:
getResultSet in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) the current result as a ResultSet object or null if the result is an update count or there are no more results.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.getResultSet()

getUpdateCount

public int getUpdateCount()
                   throws java.sql.SQLException
See java.sql.Statement#getUpdateCount().

Specified by:
getUpdateCount in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) the current result as an update count; -1 if the current result is a ResultSet object or there are no more results.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.getUpdateCount()

getMoreResults

public boolean getMoreResults()
                       throws java.sql.SQLException
See java.sql.Statement#getMoreResults().

Specified by:
getMoreResults in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) true if the next result is a ResultSet object; false if it is an update count or there are no more results.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.getMoreResults()

setFetchDirection

public void setFetchDirection(int direction)
                       throws java.sql.SQLException
See java.sql.Statement#setFetchDirection(int).

Specified by:
setFetchDirection in interface java.sql.Statement
Parameters:
direction - (Taken from Sun's Javadoc) the initial direction for processing rows.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.setFetchDirection(int)

getFetchDirection

public int getFetchDirection()
                      throws java.sql.SQLException
See java.sql.Statement#getFetchDirection().

Specified by:
getFetchDirection in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) the default fetch direction for result sets generated from this Statement object.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.getFetchDirection()

setFetchSize

public void setFetchSize(int size)
                  throws java.sql.SQLException
See java.sql.Statement#setFetchSize(int).

Specified by:
setFetchSize in interface java.sql.Statement
Parameters:
size - (Taken from Sun's Javadoc) the number of rows to fetch.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.setFetchSize(int)

getFetchSize

public int getFetchSize()
                 throws java.sql.SQLException
See java.sql.Statement#getFetchSize().

Specified by:
getFetchSize in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) the default fetch size for result sets generated from this Statement object.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.getFetchSize()

getResultSetConcurrency

public int getResultSetConcurrency()
                            throws java.sql.SQLException
See java.sql.Statement#getResultSetConcurrency().

Specified by:
getResultSetConcurrency in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) either ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.getResultSetConcurrency()

getResultSetType

public int getResultSetType()
                     throws java.sql.SQLException
See java.sql.Statement#getResultSetType().

Specified by:
getResultSetType in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.getResultSetType()

addBatch

public void addBatch(java.lang.String sql)
              throws java.sql.SQLException
See java.sql.Statement#addBatch(String).

Specified by:
addBatch in interface java.sql.Statement
Parameters:
sql - (Taken from Sun's Javadoc) typically this is a static SQL INSERT or UPDATE statement.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.addBatch(String)

clearBatch

public void clearBatch()
                throws java.sql.SQLException
See java.sql.Statement#clearBatch().

Specified by:
clearBatch in interface java.sql.Statement
Throws:
java.sql.SQLException - if an error occurs
See Also:
Statement.clearBatch()

executeBatch

public int[] executeBatch()
                   throws java.sql.SQLException
See java.sql.Statement#executeBatch().

Specified by:
executeBatch in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) an array of update counts containing one element for each command in the batch. The elements of the array are ordered according to the order in which commands were added to the batch.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.executeBatch()

setTime

public void setTime(int index,
                    java.sql.Time time)
             throws java.sql.SQLException
See java.sql.PreparedStatement#setTime(int,java.sql.Time).

Specified by:
setTime in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
time - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setTime(int,java.sql.Time)

setTime

public void setTime(int index,
                    java.sql.Time time,
                    java.util.Calendar calendar)
             throws java.sql.SQLException
See java.sql.PreparedStatement#setTime(int,Time,Calendar).

Specified by:
setTime in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
time - (Taken from Sun's Javadoc) the parameter value (!!).
calendar - (Taken from Sun's Javadoc) the Calendar object the driver will use to construct the time.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setTime(int,java.sql.Time,java.util.Calendar)

execute

public boolean execute()
                throws java.sql.SQLException
See java.sql.PreparedStatement#execute().

Specified by:
execute in interface java.sql.PreparedStatement
Returns:
(Taken from Sun's Javadoc) true if the first result is a ResultSet object; false if the first result is an update count or there is no result.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.execute()

setBoolean

public void setBoolean(int index,
                       boolean flag)
                throws java.sql.SQLException
See java.sql.PreparedStatement#setBoolean(int,boolean).

Specified by:
setBoolean in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
flag - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setBoolean(int,boolean)

setByte

public void setByte(int index,
                    byte b)
             throws java.sql.SQLException
See java.sql.PreparedStatement#setByte(int,byte).

Specified by:
setByte in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
b - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setByte(int,byte)

setShort

public void setShort(int index,
                     short s)
              throws java.sql.SQLException
See java.sql.PreparedStatement#setShort(int,short).

Specified by:
setShort in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
s - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setShort(int,short)

setInt

public void setInt(int index,
                   int value)
            throws java.sql.SQLException
See java.sql.PreparedStatement#setInt(int,int).

Specified by:
setInt in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setInt(int,int)

setLong

public void setLong(int index,
                    long value)
             throws java.sql.SQLException
See java.sql.PreparedStatement#setLong(int,long).

Specified by:
setLong in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setLong(int,long)

setFloat

public void setFloat(int index,
                     float value)
              throws java.sql.SQLException
See java.sql.PreparedStatement#setFloat(int,float).

Specified by:
setFloat in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setFloat(int,float)

setDouble

public void setDouble(int index,
                      double value)
               throws java.sql.SQLException
See java.sql.PreparedStatement#setDouble(int,double).

Specified by:
setDouble in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setDouble(int,double)

getMetaData

public java.sql.ResultSetMetaData getMetaData()
                                       throws java.sql.SQLException
See java.sql.PreparedStatement#getMetaData().

Specified by:
getMetaData in interface java.sql.PreparedStatement
Returns:
(Taken from Sun's Javadoc) a ParameterMetaData object that contains information about the number, types and properties of this PreparedStatement object's parameters.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.getMetaData()

executeQuery

public abstract java.sql.ResultSet executeQuery()
                                         throws java.sql.SQLException
See java.sql.PreparedStatement#executeQuery().

Specified by:
executeQuery in interface java.sql.PreparedStatement
Returns:
(Taken from Sun's Javadoc) a ResultSet object that contains the data produced by the query; never null.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.executeQuery()

executeUpdate

public int executeUpdate()
                  throws java.sql.SQLException
See java.sql.PreparedStatement#executeUpdate().

Specified by:
executeUpdate in interface java.sql.PreparedStatement
Returns:
(Taken from Sun's Javadoc) either (1) the row count for INSERT, UPDATE, or DELETE statements or (2) 0 for SQL statements that return nothing.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.executeUpdate()

addBatch

public void addBatch()
              throws java.sql.SQLException
See java.sql.PreparedStatement#addBatch().

Specified by:
addBatch in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.addBatch()

setNull

public void setNull(int index,
                    int sqlType)
             throws java.sql.SQLException
See java.sql.PreparedStatement#setNull(int,int).

Specified by:
setNull in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
sqlType - (Taken from Sun's Javadoc) the SQL type code defined in java.sql.Types.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setNull(int,int)

setNull

public void setNull(int index,
                    int sqlType,
                    java.lang.String typeName)
             throws java.sql.SQLException
See java.sql.PreparedStatement#setNull(int,int,String).

Specified by:
setNull in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
sqlType - (Taken from Sun's Javadoc) the SQL type code defined in java.sql.Types.
typeName - (Taken from Sun's Javadoc) the fully-qualified name of an SQL user-defined type; ignored if the parameter is not a user-defined type or REF.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setNull(int,int,String)

setString

public void setString(int index,
                      java.lang.String value)
               throws java.sql.SQLException
See java.sql.PreparedStatement#setString(int,String).

Specified by:
setString in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setString(int,String)

clearParameters

public void clearParameters()
                     throws java.sql.SQLException
See java.sql.PreparedStatement#clearParameters().

Specified by:
clearParameters in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.clearParameters()

setArray

public void setArray(int index,
                     java.sql.Array value)
              throws java.sql.SQLException
See java.sql.PreparedStatement#setArray(int,Array).

Specified by:
setArray in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setArray(int,java.sql.Array)

setAsciiStream

public void setAsciiStream(int index,
                           java.io.InputStream inputStream,
                           int length)
                    throws java.sql.SQLException
See java.sql.PreparedStatement#setAsciiStream(int,InputStram,int).

Specified by:
setAsciiStream in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
inputStream - (Taken from Sun's Javadoc) the Java input stream that contains the ASCII parameter value.
length - (Taken from Sun's Javadoc) the number of bytes in the stream.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setAsciiStream(int,java.io.InputStream,int)

setBigDecimal

public void setBigDecimal(int index,
                          java.math.BigDecimal value)
                   throws java.sql.SQLException
See java.sql.PreparedStatement#setBigDecimal(int,BigDecimal).

Specified by:
setBigDecimal in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setBigDecimal(int,java.math.BigDecimal)

setBinaryStream

public void setBinaryStream(int index,
                            java.io.InputStream inputStream,
                            int length)
                     throws java.sql.SQLException
See java.sql.PreparedStatement#setBinaryStream(int,InputStream).

Specified by:
setBinaryStream in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
inputStream - (Taken from Sun's Javadoc) the Java input stream that contains the binary parameter value.
length - (Taken from Sun's Javadoc) the number of bytes in the stream.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setBinaryStream(int,java.io.InputStream,int)

setBlob

public void setBlob(int index,
                    java.sql.Blob value)
             throws java.sql.SQLException
See java.sql.PreparedStatement#setBlob(int,Blob).

Specified by:
setBlob in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setBlob(int,java.sql.Blob)

setBytes

public void setBytes(int index,
                     byte[] value)
              throws java.sql.SQLException
See java.sql.PreparedStatement#setBytes(int,byte[]).

Specified by:
setBytes in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setBytes(int,byte[])

setCharacterStream

public void setCharacterStream(int index,
                               java.io.Reader reader,
                               int length)
                        throws java.sql.SQLException
See java.sql.PreparedStatement#setCharacterStream(int,Reader,int).

Specified by:
setCharacterStream in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
reader - (Taken from Sun's Javadoc) the java.io.Reader object that contains the Unicode data.
length - (Taken from Sun's Javadoc) the number of bytes in the stream.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setCharacterStream(int,java.io.Reader,int)

setClob

public void setClob(int index,
                    java.sql.Clob value)
             throws java.sql.SQLException
See java.sql.PreparedStatement#setClob(int,Clob).

Specified by:
setClob in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setClob(int,java.sql.Clob)

setDate

public void setDate(int index,
                    java.sql.Date value)
             throws java.sql.SQLException
See java.sql.PreparedStatement#setDate(int,Date).

Specified by:
setDate in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setDate(int,java.sql.Date)

setDate

public void setDate(int index,
                    java.sql.Date value,
                    java.util.Calendar calendar)
             throws java.sql.SQLException
See java.sql.PreparedStatement#setDate(int,Date,Calendar).

Specified by:
setDate in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
calendar - (Taken from Sun's Javadoc) the Calendar object the driver will use to construct the time.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setDate(int,java.sql.Date,java.util.Calendar)

setObject

public void setObject(int index,
                      java.lang.Object value,
                      int sqlType,
                      int scale)
               throws java.sql.SQLException
See java.sql.PreparedStatement#setObject(int,Object,int,int).

Specified by:
setObject in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
sqlType - (Taken from Sun's Javadoc) the SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.
scale - (Taken from Sun's Javadoc) for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For all other types, this value will be ignored.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setObject(int,Object,int,int)

setObject

public void setObject(int index,
                      java.lang.Object value,
                      int sqlType)
               throws java.sql.SQLException
See java.sql.PreparedStatement#setObject(int,Object,int).

Specified by:
setObject in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
sqlType - (Taken from Sun's Javadoc) the SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setObject(int,Object,int)

setObject

public void setObject(int index,
                      java.lang.Object value)
               throws java.sql.SQLException
See java.sql.PreparedStatement#setObject(int,Object).

Specified by:
setObject in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setObject(int,Object)

setRef

public void setRef(int index,
                   java.sql.Ref value)
            throws java.sql.SQLException
See java.sql.PreparedStatement#setRef(int,Ref).

Specified by:
setRef in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setRef(int,java.sql.Ref)

setTimestamp

public void setTimestamp(int index,
                         java.sql.Timestamp value)
                  throws java.sql.SQLException
See java.sql.PreparedStatement#setTimestamp(int,Timestamp).

Specified by:
setTimestamp in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setTimestamp(int,java.sql.Timestamp)

setTimestamp

public void setTimestamp(int index,
                         java.sql.Timestamp value,
                         java.util.Calendar calendar)
                  throws java.sql.SQLException
See java.sql.PreparedStatement#setTimestamp(int,Timestamp,Calendar).

Specified by:
setTimestamp in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
value - (Taken from Sun's Javadoc) the parameter value (!!).
calendar - (Taken from Sun's Javadoc) the Calendar object the driver will use to construct the time.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setTimestamp(int,java.sql.Timestamp,java.util.Calendar)

setUnicodeStream

public void setUnicodeStream(int index,
                             java.io.InputStream inputStream,
                             int length)
                      throws java.sql.SQLException
See java.sql.PreparedStatement#setUnicodeStream(int,InputStream,int).

Specified by:
setUnicodeStream in interface java.sql.PreparedStatement
Parameters:
index - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
inputStream - (Taken from Sun's Javadoc) the Java input stream that contains the Unicode parameter value.
length - (Taken from Sun's Javadoc) the number of bytes in the stream.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setUnicodeStream(int,java.io.InputStream,int)

setTime

public void setTime(VariableCondition condition,
                    java.sql.Time value)
             throws java.sql.SQLException
Specifies the value of a time parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the time value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setTime(int,java.sql.Time)

setTime

public void setTime(VariableCondition condition,
                    java.sql.Time value,
                    java.util.Calendar calendar)
             throws java.sql.SQLException
Specifies the value of a time parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the time value.
calendar - (Taken from Sun's Javadoc) the Calendar object the driver will use to construct the time.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setTime(int,java.sql.Time)

setBoolean

public void setBoolean(VariableCondition condition,
                       boolean value)
                throws java.sql.SQLException
Specifies the value of a boolean parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the boolean value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setBoolean(int,boolean)

setByte

public void setByte(VariableCondition condition,
                    byte value)
             throws java.sql.SQLException
Specifies the value of a byte parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the byte value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setByte(int,byte)

setShort

public void setShort(VariableCondition condition,
                     short value)
              throws java.sql.SQLException
Specifies the value of a short parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the short value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setShort(int,short)

setInt

public void setInt(VariableCondition condition,
                   int value)
            throws java.sql.SQLException
Specifies the value of an int parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the int value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setInt(int,int)

setLong

public void setLong(VariableCondition condition,
                    long value)
             throws java.sql.SQLException
Specifies the value of a long parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the long value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setLong(int,long)

setFloat

public void setFloat(VariableCondition condition,
                     float value)
              throws java.sql.SQLException
Specifies the value of a float parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the float value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setFloat(int,float)

setDouble

public void setDouble(VariableCondition condition,
                      double value)
               throws java.sql.SQLException
Specifies the value of a double parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the double value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setDouble(int,double)

setNull

public void setNull(VariableCondition condition,
                    int sqlType)
             throws java.sql.SQLException
Specifies as null the value of a parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
sqlType - (Taken from Sun's Javadoc) the SQL type code defined in java.sql.Types.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setNull(int,int)

setNull

public void setNull(VariableCondition condition,
                    int sqlType,
                    java.lang.String typeName)
             throws java.sql.SQLException
Specifies as null the value of a parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
sqlType - (Taken from Sun's Javadoc) the SQL type code defined in java.sql.Types.
typeName - (Taken from Sun's Javadoc) the fully-qualified name of an SQL user-defined type; ignored if the parameter is not a user-defined type or REF.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setNull(int,int,String)

setString

public void setString(VariableCondition condition,
                      java.lang.String value)
               throws java.sql.SQLException
Specifies the value of a String parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the String value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
java.sql.PreparedStatement#setString(int,int)

setArray

public void setArray(VariableCondition condition,
                     java.sql.Array value)
              throws java.sql.SQLException
Specifies the value of an Array parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the Array value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setArray(int,java.sql.Array)

setAsciiStream

public void setAsciiStream(VariableCondition condition,
                           java.io.InputStream inputStream,
                           int length)
                    throws java.sql.SQLException
Specifies the value of a parameter formatted as an ASCII stream, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
inputStream - (Taken from Sun's Javadoc) the Java input stream that contains the ASCII parameter value.
length - (Taken from Sun's Javadoc) the number of bytes in the stream.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setAsciiStream(int,java.io.InputStream,int)

setBigDecimal

public void setBigDecimal(VariableCondition condition,
                          java.math.BigDecimal value)
                   throws java.sql.SQLException
Specifies the value of a BigDecimal parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the big decimal value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setBigDecimal(int,java.math.BigDecimal)

setBinaryStream

public void setBinaryStream(VariableCondition condition,
                            java.io.InputStream inputStream,
                            int length)
                     throws java.sql.SQLException
Specifies the value of a parameter formatted as a binary stream, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
inputStream - (Taken from Sun's Javadoc) the Java input stream that contains the binary parameter value.
length - (Taken from Sun's Javadoc) the number of bytes in the stream.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setBinaryStream(int,java.io.InputStream,int)

setBlob

public void setBlob(VariableCondition condition,
                    java.sql.Blob value)
             throws java.sql.SQLException
Specifies the value of a blob parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the blob value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setBlob(int,java.sql.Blob)

setBytes

public void setBytes(VariableCondition condition,
                     byte[] value)
              throws java.sql.SQLException
Specifies the value of a byte array parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the byte array value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
java.sql.PreparedStatement#setBigDecimal(int,byte[])

setCharacterStream

public void setCharacterStream(VariableCondition condition,
                               java.io.Reader reader,
                               int length)
                        throws java.sql.SQLException
Specifies the value of a parameter formatted as a binary stream, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
reader - (Taken from Sun's Javadoc) the java.io.Reader object that contains the Unicode data.
length - (Taken from Sun's Javadoc) the number of bytes in the stream.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setCharacterStream(int,java.io.Reader,int)

setClob

public void setClob(VariableCondition condition,
                    java.sql.Clob value)
             throws java.sql.SQLException
Specifies the value of a clob parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the clob value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setClob(int,java.sql.Clob)

setDate

public void setDate(VariableCondition condition,
                    java.sql.Date value)
             throws java.sql.SQLException
Specifies the value of a date parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the date value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setDate(int,java.sql.Date)

setDate

public void setDate(VariableCondition condition,
                    java.sql.Date value,
                    java.util.Calendar calendar)
             throws java.sql.SQLException
Specifies the value of a date parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the date value.
calendar - (Taken from Sun's Javadoc) the Calendar object the driver will use to construct the date.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setDate(int,java.sql.Date)

setObject

public void setObject(VariableCondition condition,
                      java.lang.Object value,
                      int sqlType,
                      int scale)
               throws java.sql.SQLException
Specifies the value of an object parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the object value.
sqlType - (Taken from Sun's Javadoc) the SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.
scale - (Taken from Sun's Javadoc) for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For all other types, this value will be ignored.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setObject(int,Object,int,int)

setObject

public void setObject(VariableCondition condition,
                      java.lang.Object value,
                      int sqlType)
               throws java.sql.SQLException
Specifies the value of an object parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the object value.
sqlType - (Taken from Sun's Javadoc) the SQL type (as defined in java.sql.Types) to be sent to the database.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setObject(int,Object,int)

setObject

public void setObject(VariableCondition condition,
                      java.lang.Object value)
               throws java.sql.SQLException
Specifies the value of an object parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the object value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setObject(int,Object)

setRef

public void setRef(VariableCondition condition,
                   java.sql.Ref value)
            throws java.sql.SQLException
Specifies the value of a ref parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the ref value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setRef(int,java.sql.Ref)

setTimestamp

public void setTimestamp(VariableCondition condition,
                         java.sql.Timestamp value)
                  throws java.sql.SQLException
Specifies the value of a timestamp parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the timestamp value.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setTimestamp(int,java.sql.Timestamp)

setTimestamp

public void setTimestamp(VariableCondition condition,
                         java.sql.Timestamp value,
                         java.util.Calendar calendar)
                  throws java.sql.SQLException
Specifies the value of a timestamp parameter, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
value - the timestamp value.
calendar - (Taken from Sun's Javadoc) the Calendar object the driver will use to construct the timestamp.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setTimestamp(int,java.sql.Timestamp)

setUnicodeStream

public void setUnicodeStream(VariableCondition condition,
                             java.io.InputStream inputStream,
                             int length)
                      throws java.sql.SQLException
Specifies the value of a parameter formatted as an Unicode stream, associated with a previously specified variable condition.

Parameters:
condition - the variable condition.
inputStream - (Taken from Sun's Javadoc) the Java input stream that contains the Unicode parameter value.
length - (Taken from Sun's Javadoc) the number of bytes in the stream.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setUnicodeStream(int,java.io.InputStream,int)

getMoreResults

public boolean getMoreResults(int current)
                       throws java.sql.SQLException
See Statement#getMoreResults(int)

Specified by:
getMoreResults in interface java.sql.Statement
Parameters:
current - (Taken from Sun's Javadoc) one of the following Statement constants indicating what should happen to current ResultSet objects obtained using the method getResultSetCLOSE_CURRENT_RESULT, KEEP_CURRENT_RESULT, or CLOSE_ALL_RESULTS.
Returns:
(Taken from Sun's Javadoc) true if the next result is a ResultSet object; false if it is an update count or there are no more results.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.getMoreResults(int)

getGeneratedKeys

public abstract java.sql.ResultSet getGeneratedKeys()
                                             throws java.sql.SQLException
See Statement#getGeneratedKeys()

Specified by:
getGeneratedKeys in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) a ResultSet object containing the auto-generated key(s) generated by the execution of this Statement object.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.getGeneratedKeys()

executeUpdate

public int executeUpdate(java.lang.String sql,
                         int autogeneratedKeys)
                  throws java.sql.SQLException
See Statement#executeUpdate(String,int)

Specified by:
executeUpdate in interface java.sql.Statement
Parameters:
sql - (Taken from Sun's Javadoc) must be an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing.
autogeneratedKeys - (Taken from Sun's Javadoc) a flag indicating whether auto-generated keys should be made available for retrieval; one of the following constants: Statement.RETURN_GENERATED_KEYS Statement.NO_GENERATED_KEYS.
Returns:
(Taken from Sun's Javadoc) either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.executeUpdate(java.lang.String,int)

executeUpdate

public int executeUpdate(java.lang.String sql,
                         int[] columnIndexes)
                  throws java.sql.SQLException
See Statement#executeUpdate(String,int[])

Specified by:
executeUpdate in interface java.sql.Statement
Parameters:
sql - (Taken from Sun's Javadoc) must be an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing.
columnIndexes - (Taken from Sun's Javadoc) an array of column indexes indicating the columns that should be returned from the inserted row.
Returns:
(Taken from Sun's Javadoc) either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.executeUpdate(java.lang.String,int[])

executeUpdate

public int executeUpdate(java.lang.String sql,
                         java.lang.String[] columnNames)
                  throws java.sql.SQLException
See Statement#executeUpdate(String,String[])

Specified by:
executeUpdate in interface java.sql.Statement
Parameters:
sql - (Taken from Sun's Javadoc) must be an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing.
columnNames - (Taken from Sun's Javadoc) an array of column names indicating the columns that should be returned from the inserted row.
Returns:
(Taken from Sun's Javadoc) either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.executeUpdate(java.lang.String,String[])

execute

public boolean execute(java.lang.String sql,
                       int autogeneratedKeys)
                throws java.sql.SQLException
See Statement#execute(String,int)

Specified by:
execute in interface java.sql.Statement
Parameters:
sql - (Taken from Sun's Javadoc) must be an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing.
autogeneratedKeys - (Taken from Sun's Javadoc) a flag indicating whether auto-generated keys should be made available for retrieval; one of the following constants: Statement.RETURN_GENERATED_KEYS Statement.NO_GENERATED_KEYS.
Returns:
(Taken from Sun's Javadoc) true if the first result is a ResultSet object; false if it is an update count or there are no results.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.execute(java.lang.String,int)

execute

public boolean execute(java.lang.String sql,
                       int[] columnIndexes)
                throws java.sql.SQLException
See Statement#execute(String,int[])

Specified by:
execute in interface java.sql.Statement
Parameters:
sql - (Taken from Sun's Javadoc) must be an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing.
columnIndexes - (Taken from Sun's Javadoc) an array of column indexes indicating the columns that should be returned from the inserted row.
Returns:
(Taken from Sun's Javadoc) true if the first result is a ResultSet object; false if it is an update count or there are no results.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.execute(java.lang.String,int[])

execute

public boolean execute(java.lang.String sql,
                       java.lang.String[] columnNames)
                throws java.sql.SQLException
See Statement#execute(String,String[])

Specified by:
execute in interface java.sql.Statement
Parameters:
sql - (Taken from Sun's Javadoc) must be an SQL INSERT, UPDATE or DELETE statement or an SQL statement that returns nothing.
columnNames - (Taken from Sun's Javadoc) an array of column names indicating the columns that should be returned from the inserted row.
Returns:
(Taken from Sun's Javadoc) true if the first result is a ResultSet object; false if it is an update count or there are no results.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.execute(java.lang.String,java.lang.String[])

getResultSetHoldability

public int getResultSetHoldability()
                            throws java.sql.SQLException
See Statement#getResultSetHoldability()

Specified by:
getResultSetHoldability in interface java.sql.Statement
Returns:
(Taken from Sun's Javadoc) either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
Statement.getResultSetHoldability()

setURL

public void setURL(int parameterIndex,
                   java.net.URL url)
            throws java.sql.SQLException
See PreparedStatement#setURL(int,URL)

Specified by:
setURL in interface java.sql.PreparedStatement
Parameters:
parameterIndex - (Taken from Sun's Javadoc) the first parameter is 1, the second is 2, ...
url - (Taken from Sun's Javadoc) the java.net.URL object to be set.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.setURL(int,java.net.URL)

getParameterMetaData

public java.sql.ParameterMetaData getParameterMetaData()
                                                throws java.sql.SQLException
See PreparedStatement#getParameterMetaData()

Specified by:
getParameterMetaData in interface java.sql.PreparedStatement
Returns:
(Taken from Sun's Javadoc) a ParameterMetaData object that contains information about the number, types and properties of this PreparedStatement object's parameters.
Throws:
java.sql.SQLException - if an error occurs.
See Also:
PreparedStatement.getParameterMetaData()


Copyright © 2003 ACM S.L.. All Rights Reserved.