|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.acmsl.queryj.Query
Represents queries to access persistent data.
| 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 |
public Query()
| Method Detail |
protected void setPreparedStatement(java.sql.PreparedStatement statement)
statement - the prepared statement.protected java.sql.PreparedStatement getPreparedStatement()
protected void setTables(java.util.List list)
list - the new list.protected java.util.List getTables()
protected void addTable(Table table)
table - the table to add.protected void setConditions(java.util.List list)
list - the new list.protected java.util.List getConditions()
protected void addCondition(Condition condition)
condition - the condition to add.protected void setVariableConditions(java.util.List list)
list - the new list.protected java.util.List getVariableConditions()
protected void addVariableCondition(VariableCondition variableCondition)
variableCondition - the variable condition to add.
protected int getIndex(java.util.List list,
java.lang.Object object)
list - the concrete list (fields, tables, conditions, etc.).object - the object to find.
public java.sql.PreparedStatement prepareStatement(java.sql.Connection connection)
throws java.sql.SQLException
connection - the JDBC connection.
java.sql.SQLException - if an error occurs.
public abstract QueryResultSet retrieveMatchingResults()
throws java.sql.SQLException
java.sql.SQLException - if an error occurs.
public void close()
throws java.sql.SQLException
close in interface java.sql.Statementjava.sql.SQLException - if an error occurs.Statement.close()
public boolean execute(java.lang.String sql)
throws java.sql.SQLException
execute in interface java.sql.Statementsql - (Taken from Sun's Javadoc) any SQL statement.
true if the first
result is a ResultSet object; false if it is an update count
or there are no results.
java.sql.SQLException - if an error occurs.java.sql.Statement#close(String)
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface java.sql.Statementjava.sql.SQLException - if an error occursStatement.getConnection()
public java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
getWarnings in interface java.sql.Statementjava.sql.SQLException - if an error occurs.Statement.getWarnings()
public void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface java.sql.Statementjava.sql.SQLException - if an error occursStatement.clearWarnings()
public java.sql.ResultSet executeQuery(java.lang.String sql)
throws java.sql.SQLException
executeQuery in interface java.sql.Statementsql - (Taken from Sun's Javadoc) an SQL statement to be sent
to the database, typically a static SQL SELECT statement.
java.sql.SQLException - if an error occurs.java.sql.Statement#executeQuery()
public int executeUpdate(java.lang.String sql)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementsql - (Taken from Sun's Javadoc) an SQL INSERT, UPDATE or
DELETE statement or an SQL statement that returns nothing.
java.sql.SQLException - if an error occurs.java.sql.Statement#executeUpdate()
public int getMaxFieldSize()
throws java.sql.SQLException
getMaxFieldSize in interface java.sql.Statementjava.sql.SQLException - if an error occurs.Statement.getMaxFieldSize()
public void setMaxFieldSize(int size)
throws java.sql.SQLException
setMaxFieldSize in interface java.sql.Statementsize - (Taken from Sun's Javadoc) the new column size
limit in bytes; zero means there is no limit.
java.sql.SQLException - if an error occursStatement.setMaxFieldSize(int)
public int getMaxRows()
throws java.sql.SQLException
getMaxRows in interface java.sql.Statementjava.sql.SQLException - if an error occursStatement.getMaxRows()
public void setMaxRows(int max)
throws java.sql.SQLException
setMaxRows in interface java.sql.Statementmax - (Taken from Sun's Javadoc) the new max rows
limit; zero means there is no limit.
java.sql.SQLException - if an error occursStatement.setMaxRows(int)
public void setEscapeProcessing(boolean flag)
throws java.sql.SQLException
setEscapeProcessing in interface java.sql.Statementjava.sql.SQLException - if an error occursStatement.setEscapeProcessing(boolean)
public int getQueryTimeout()
throws java.sql.SQLException
getQueryTimeout in interface java.sql.Statementjava.sql.SQLException - if an error occurs.Statement.getQueryTimeout()
public void setQueryTimeout(int timeout)
throws java.sql.SQLException
setQueryTimeout in interface java.sql.Statementtimeout - (Taken from Sun's Javadoc) the new query
timeout limit in seconds; zero means there is no limit.
java.sql.SQLException - if an error occursStatement.setQueryTimeout(int)
public void cancel()
throws java.sql.SQLException
cancel in interface java.sql.Statementjava.sql.SQLException - if an error occurs.Statement.cancel()
public void setCursorName(java.lang.String name)
throws java.sql.SQLException
setCursorName in interface java.sql.Statementname - (Taken from Sun's Javadoc) the new
cursor name, which must be unique within a connection.
java.sql.SQLException - if an error occurs.Statement.setCursorName(String)
public java.sql.ResultSet getResultSet()
throws java.sql.SQLException
getResultSet in interface java.sql.Statementjava.sql.SQLException - if an error occurs.Statement.getResultSet()
public int getUpdateCount()
throws java.sql.SQLException
getUpdateCount in interface java.sql.Statementjava.sql.SQLException - if an error occurs.Statement.getUpdateCount()
public boolean getMoreResults()
throws java.sql.SQLException
getMoreResults in interface java.sql.Statementtrue
if the next result is a ResultSet object;
false if it is an update count
or there are no more results.
java.sql.SQLException - if an error occurs.Statement.getMoreResults()
public void setFetchDirection(int direction)
throws java.sql.SQLException
setFetchDirection in interface java.sql.Statementdirection - (Taken from Sun's Javadoc) the initial
direction for processing rows.
java.sql.SQLException - if an error occurs.Statement.setFetchDirection(int)
public int getFetchDirection()
throws java.sql.SQLException
getFetchDirection in interface java.sql.Statementjava.sql.SQLException - if an error occurs.Statement.getFetchDirection()
public void setFetchSize(int size)
throws java.sql.SQLException
setFetchSize in interface java.sql.Statementsize - (Taken from Sun's Javadoc) the number of rows to fetch.
java.sql.SQLException - if an error occurs.Statement.setFetchSize(int)
public int getFetchSize()
throws java.sql.SQLException
getFetchSize in interface java.sql.Statementjava.sql.SQLException - if an error occurs.Statement.getFetchSize()
public int getResultSetConcurrency()
throws java.sql.SQLException
getResultSetConcurrency in interface java.sql.Statementjava.sql.SQLException - if an error occurs.Statement.getResultSetConcurrency()
public int getResultSetType()
throws java.sql.SQLException
getResultSetType in interface java.sql.Statementjava.sql.SQLException - if an error occurs.Statement.getResultSetType()
public void addBatch(java.lang.String sql)
throws java.sql.SQLException
addBatch in interface java.sql.Statementsql - (Taken from Sun's Javadoc) typically this
is a static SQL INSERT or UPDATE statement.
java.sql.SQLException - if an error occurs.Statement.addBatch(String)
public void clearBatch()
throws java.sql.SQLException
clearBatch in interface java.sql.Statementjava.sql.SQLException - if an error occursStatement.clearBatch()
public int[] executeBatch()
throws java.sql.SQLException
executeBatch in interface java.sql.Statementjava.sql.SQLException - if an error occurs.Statement.executeBatch()
public void setTime(int index,
java.sql.Time time)
throws java.sql.SQLException
setTime in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...time - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setTime(int,java.sql.Time)
public void setTime(int index,
java.sql.Time time,
java.util.Calendar calendar)
throws java.sql.SQLException
setTime in interface java.sql.PreparedStatementindex - (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.
java.sql.SQLException - if an error occurs.PreparedStatement.setTime(int,java.sql.Time,java.util.Calendar)
public boolean execute()
throws java.sql.SQLException
execute in interface java.sql.PreparedStatementtrue if
the first result is a ResultSet object; false
if the first result is an update count or there is no result.
java.sql.SQLException - if an error occurs.PreparedStatement.execute()
public void setBoolean(int index,
boolean flag)
throws java.sql.SQLException
setBoolean in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...flag - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setBoolean(int,boolean)
public void setByte(int index,
byte b)
throws java.sql.SQLException
setByte in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...b - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setByte(int,byte)
public void setShort(int index,
short s)
throws java.sql.SQLException
setShort in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...s - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setShort(int,short)
public void setInt(int index,
int value)
throws java.sql.SQLException
setInt in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...value - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setInt(int,int)
public void setLong(int index,
long value)
throws java.sql.SQLException
setLong in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...value - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setLong(int,long)
public void setFloat(int index,
float value)
throws java.sql.SQLException
setFloat in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...value - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setFloat(int,float)
public void setDouble(int index,
double value)
throws java.sql.SQLException
setDouble in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...value - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setDouble(int,double)
public java.sql.ResultSetMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface java.sql.PreparedStatementjava.sql.SQLException - if an error occurs.PreparedStatement.getMetaData()
public abstract java.sql.ResultSet executeQuery()
throws java.sql.SQLException
executeQuery in interface java.sql.PreparedStatementjava.sql.SQLException - if an error occurs.PreparedStatement.executeQuery()
public int executeUpdate()
throws java.sql.SQLException
executeUpdate in interface java.sql.PreparedStatementjava.sql.SQLException - if an error occurs.PreparedStatement.executeUpdate()
public void addBatch()
throws java.sql.SQLException
addBatch in interface java.sql.PreparedStatementjava.sql.SQLException - if an error occurs.PreparedStatement.addBatch()
public void setNull(int index,
int sqlType)
throws java.sql.SQLException
setNull in interface java.sql.PreparedStatementindex - (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.
java.sql.SQLException - if an error occurs.PreparedStatement.setNull(int,int)
public void setNull(int index,
int sqlType,
java.lang.String typeName)
throws java.sql.SQLException
setNull in interface java.sql.PreparedStatementindex - (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.
java.sql.SQLException - if an error occurs.PreparedStatement.setNull(int,int,String)
public void setString(int index,
java.lang.String value)
throws java.sql.SQLException
setString in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...value - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setString(int,String)
public void clearParameters()
throws java.sql.SQLException
clearParameters in interface java.sql.PreparedStatementjava.sql.SQLException - if an error occurs.PreparedStatement.clearParameters()
public void setArray(int index,
java.sql.Array value)
throws java.sql.SQLException
setArray in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...value - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setArray(int,java.sql.Array)
public void setAsciiStream(int index,
java.io.InputStream inputStream,
int length)
throws java.sql.SQLException
setAsciiStream in interface java.sql.PreparedStatementindex - (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.
java.sql.SQLException - if an error occurs.PreparedStatement.setAsciiStream(int,java.io.InputStream,int)
public void setBigDecimal(int index,
java.math.BigDecimal value)
throws java.sql.SQLException
setBigDecimal in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...value - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setBigDecimal(int,java.math.BigDecimal)
public void setBinaryStream(int index,
java.io.InputStream inputStream,
int length)
throws java.sql.SQLException
setBinaryStream in interface java.sql.PreparedStatementindex - (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.
java.sql.SQLException - if an error occurs.PreparedStatement.setBinaryStream(int,java.io.InputStream,int)
public void setBlob(int index,
java.sql.Blob value)
throws java.sql.SQLException
setBlob in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...value - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setBlob(int,java.sql.Blob)
public void setBytes(int index,
byte[] value)
throws java.sql.SQLException
setBytes in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...value - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setBytes(int,byte[])
public void setCharacterStream(int index,
java.io.Reader reader,
int length)
throws java.sql.SQLException
setCharacterStream in interface java.sql.PreparedStatementindex - (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.
java.sql.SQLException - if an error occurs.PreparedStatement.setCharacterStream(int,java.io.Reader,int)
public void setClob(int index,
java.sql.Clob value)
throws java.sql.SQLException
setClob in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...value - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setClob(int,java.sql.Clob)
public void setDate(int index,
java.sql.Date value)
throws java.sql.SQLException
setDate in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...value - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setDate(int,java.sql.Date)
public void setDate(int index,
java.sql.Date value,
java.util.Calendar calendar)
throws java.sql.SQLException
setDate in interface java.sql.PreparedStatementindex - (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.
java.sql.SQLException - if an error occurs.PreparedStatement.setDate(int,java.sql.Date,java.util.Calendar)
public void setObject(int index,
java.lang.Object value,
int sqlType,
int scale)
throws java.sql.SQLException
setObject in interface java.sql.PreparedStatementindex - (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.
java.sql.SQLException - if an error occurs.PreparedStatement.setObject(int,Object,int,int)
public void setObject(int index,
java.lang.Object value,
int sqlType)
throws java.sql.SQLException
setObject in interface java.sql.PreparedStatementindex - (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.
java.sql.SQLException - if an error occurs.PreparedStatement.setObject(int,Object,int)
public void setObject(int index,
java.lang.Object value)
throws java.sql.SQLException
setObject in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...value - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setObject(int,Object)
public void setRef(int index,
java.sql.Ref value)
throws java.sql.SQLException
setRef in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...value - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setRef(int,java.sql.Ref)
public void setTimestamp(int index,
java.sql.Timestamp value)
throws java.sql.SQLException
setTimestamp in interface java.sql.PreparedStatementindex - (Taken from Sun's Javadoc) the first parameter
is 1, the second is 2, ...value - (Taken from Sun's Javadoc) the parameter value (!!).
java.sql.SQLException - if an error occurs.PreparedStatement.setTimestamp(int,java.sql.Timestamp)
public void setTimestamp(int index,
java.sql.Timestamp value,
java.util.Calendar calendar)
throws java.sql.SQLException
setTimestamp in interface java.sql.PreparedStatementindex - (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.
java.sql.SQLException - if an error occurs.PreparedStatement.setTimestamp(int,java.sql.Timestamp,java.util.Calendar)
public void setUnicodeStream(int index,
java.io.InputStream inputStream,
int length)
throws java.sql.SQLException
setUnicodeStream in interface java.sql.PreparedStatementindex - (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.
java.sql.SQLException - if an error occurs.PreparedStatement.setUnicodeStream(int,java.io.InputStream,int)
public void setTime(VariableCondition condition,
java.sql.Time value)
throws java.sql.SQLException
condition - the variable condition.value - the time value.
java.sql.SQLException - if an error occurs.PreparedStatement.setTime(int,java.sql.Time)
public void setTime(VariableCondition condition,
java.sql.Time value,
java.util.Calendar calendar)
throws java.sql.SQLException
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.
java.sql.SQLException - if an error occurs.PreparedStatement.setTime(int,java.sql.Time)
public void setBoolean(VariableCondition condition,
boolean value)
throws java.sql.SQLException
condition - the variable condition.value - the boolean value.
java.sql.SQLException - if an error occurs.PreparedStatement.setBoolean(int,boolean)
public void setByte(VariableCondition condition,
byte value)
throws java.sql.SQLException
condition - the variable condition.value - the byte value.
java.sql.SQLException - if an error occurs.PreparedStatement.setByte(int,byte)
public void setShort(VariableCondition condition,
short value)
throws java.sql.SQLException
condition - the variable condition.value - the short value.
java.sql.SQLException - if an error occurs.PreparedStatement.setShort(int,short)
public void setInt(VariableCondition condition,
int value)
throws java.sql.SQLException
condition - the variable condition.value - the int value.
java.sql.SQLException - if an error occurs.PreparedStatement.setInt(int,int)
public void setLong(VariableCondition condition,
long value)
throws java.sql.SQLException
condition - the variable condition.value - the long value.
java.sql.SQLException - if an error occurs.PreparedStatement.setLong(int,long)
public void setFloat(VariableCondition condition,
float value)
throws java.sql.SQLException
condition - the variable condition.value - the float value.
java.sql.SQLException - if an error occurs.PreparedStatement.setFloat(int,float)
public void setDouble(VariableCondition condition,
double value)
throws java.sql.SQLException
condition - the variable condition.value - the double value.
java.sql.SQLException - if an error occurs.PreparedStatement.setDouble(int,double)
public void setNull(VariableCondition condition,
int sqlType)
throws java.sql.SQLException
null the value of a parameter,
associated with a previously specified variable condition.
condition - the variable condition.sqlType - (Taken from Sun's Javadoc) the SQL type
code defined in java.sql.Types.
java.sql.SQLException - if an error occurs.PreparedStatement.setNull(int,int)
public void setNull(VariableCondition condition,
int sqlType,
java.lang.String typeName)
throws java.sql.SQLException
null the value of a parameter,
associated with a previously specified variable condition.
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.
java.sql.SQLException - if an error occurs.PreparedStatement.setNull(int,int,String)
public void setString(VariableCondition condition,
java.lang.String value)
throws java.sql.SQLException
condition - the variable condition.value - the String value.
java.sql.SQLException - if an error occurs.java.sql.PreparedStatement#setString(int,int)
public void setArray(VariableCondition condition,
java.sql.Array value)
throws java.sql.SQLException
condition - the variable condition.value - the Array value.
java.sql.SQLException - if an error occurs.PreparedStatement.setArray(int,java.sql.Array)
public void setAsciiStream(VariableCondition condition,
java.io.InputStream inputStream,
int length)
throws java.sql.SQLException
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.
java.sql.SQLException - if an error occurs.PreparedStatement.setAsciiStream(int,java.io.InputStream,int)
public void setBigDecimal(VariableCondition condition,
java.math.BigDecimal value)
throws java.sql.SQLException
condition - the variable condition.value - the big decimal value.
java.sql.SQLException - if an error occurs.PreparedStatement.setBigDecimal(int,java.math.BigDecimal)
public void setBinaryStream(VariableCondition condition,
java.io.InputStream inputStream,
int length)
throws java.sql.SQLException
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.
java.sql.SQLException - if an error occurs.PreparedStatement.setBinaryStream(int,java.io.InputStream,int)
public void setBlob(VariableCondition condition,
java.sql.Blob value)
throws java.sql.SQLException
condition - the variable condition.value - the blob value.
java.sql.SQLException - if an error occurs.PreparedStatement.setBlob(int,java.sql.Blob)
public void setBytes(VariableCondition condition,
byte[] value)
throws java.sql.SQLException
condition - the variable condition.value - the byte array value.
java.sql.SQLException - if an error occurs.java.sql.PreparedStatement#setBigDecimal(int,byte[])
public void setCharacterStream(VariableCondition condition,
java.io.Reader reader,
int length)
throws java.sql.SQLException
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.
java.sql.SQLException - if an error occurs.PreparedStatement.setCharacterStream(int,java.io.Reader,int)
public void setClob(VariableCondition condition,
java.sql.Clob value)
throws java.sql.SQLException
condition - the variable condition.value - the clob value.
java.sql.SQLException - if an error occurs.PreparedStatement.setClob(int,java.sql.Clob)
public void setDate(VariableCondition condition,
java.sql.Date value)
throws java.sql.SQLException
condition - the variable condition.value - the date value.
java.sql.SQLException - if an error occurs.PreparedStatement.setDate(int,java.sql.Date)
public void setDate(VariableCondition condition,
java.sql.Date value,
java.util.Calendar calendar)
throws java.sql.SQLException
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.
java.sql.SQLException - if an error occurs.PreparedStatement.setDate(int,java.sql.Date)
public void setObject(VariableCondition condition,
java.lang.Object value,
int sqlType,
int scale)
throws java.sql.SQLException
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.
java.sql.SQLException - if an error occurs.PreparedStatement.setObject(int,Object,int,int)
public void setObject(VariableCondition condition,
java.lang.Object value,
int sqlType)
throws java.sql.SQLException
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.
java.sql.SQLException - if an error occurs.PreparedStatement.setObject(int,Object,int)
public void setObject(VariableCondition condition,
java.lang.Object value)
throws java.sql.SQLException
condition - the variable condition.value - the object value.
java.sql.SQLException - if an error occurs.PreparedStatement.setObject(int,Object)
public void setRef(VariableCondition condition,
java.sql.Ref value)
throws java.sql.SQLException
condition - the variable condition.value - the ref value.
java.sql.SQLException - if an error occurs.PreparedStatement.setRef(int,java.sql.Ref)
public void setTimestamp(VariableCondition condition,
java.sql.Timestamp value)
throws java.sql.SQLException
condition - the variable condition.value - the timestamp value.
java.sql.SQLException - if an error occurs.PreparedStatement.setTimestamp(int,java.sql.Timestamp)
public void setTimestamp(VariableCondition condition,
java.sql.Timestamp value,
java.util.Calendar calendar)
throws java.sql.SQLException
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.
java.sql.SQLException - if an error occurs.PreparedStatement.setTimestamp(int,java.sql.Timestamp)
public void setUnicodeStream(VariableCondition condition,
java.io.InputStream inputStream,
int length)
throws java.sql.SQLException
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.
java.sql.SQLException - if an error occurs.PreparedStatement.setUnicodeStream(int,java.io.InputStream,int)
public boolean getMoreResults(int current)
throws java.sql.SQLException
getMoreResults in interface java.sql.Statementcurrent - (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.
true if the next result
is a ResultSet object; false if it is an update count or
there are no more results.
java.sql.SQLException - if an error occurs.Statement.getMoreResults(int)
public abstract java.sql.ResultSet getGeneratedKeys()
throws java.sql.SQLException
getGeneratedKeys in interface java.sql.Statementjava.sql.SQLException - if an error occurs.Statement.getGeneratedKeys()
public int executeUpdate(java.lang.String sql,
int autogeneratedKeys)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementsql - (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.
java.sql.SQLException - if an error occurs.Statement.executeUpdate(java.lang.String,int)
public int executeUpdate(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementsql - (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.
java.sql.SQLException - if an error occurs.Statement.executeUpdate(java.lang.String,int[])
public int executeUpdate(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementsql - (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.
java.sql.SQLException - if an error occurs.Statement.executeUpdate(java.lang.String,String[])
public boolean execute(java.lang.String sql,
int autogeneratedKeys)
throws java.sql.SQLException
execute in interface java.sql.Statementsql - (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.
java.sql.SQLException - if an error occurs.Statement.execute(java.lang.String,int)
public boolean execute(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
execute in interface java.sql.Statementsql - (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.
java.sql.SQLException - if an error occurs.Statement.execute(java.lang.String,int[])
public boolean execute(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
execute in interface java.sql.Statementsql - (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.
java.sql.SQLException - if an error occurs.Statement.execute(java.lang.String,java.lang.String[])
public int getResultSetHoldability()
throws java.sql.SQLException
getResultSetHoldability in interface java.sql.Statementjava.sql.SQLException - if an error occurs.Statement.getResultSetHoldability()
public void setURL(int parameterIndex,
java.net.URL url)
throws java.sql.SQLException
setURL in interface java.sql.PreparedStatementparameterIndex - (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.
java.sql.SQLException - if an error occurs.PreparedStatement.setURL(int,java.net.URL)
public java.sql.ParameterMetaData getParameterMetaData()
throws java.sql.SQLException
getParameterMetaData in interface java.sql.PreparedStatementjava.sql.SQLException - if an error occurs.PreparedStatement.getParameterMetaData()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||