GNU Classpath (0.20) | |
Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
public interface PreparedStatement
extends Statement
Fields inherited from interface java.sql.Statement | |
CLOSE_ALL_RESULTS , CLOSE_CURRENT_RESULT , EXECUTE_FAILED , KEEP_CURRENT_RESULT , NO_GENERATED_KEYS , RETURN_GENERATED_KEYS , SUCCESS_NO_INFO |
Method Summary | |
void |
|
void |
|
boolean |
|
ResultSet |
|
int |
|
ResultSetMetaData |
|
ParameterMetaData | |
void | |
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void |
|
void | |
void | |
void | |
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void | |
void | |
void | |
void | |
void |
|
void | |
void | |
void | |
void |
|
void |
|
void | |
void |
|
public void addBatch() throws SQLException
This method adds a set of parameters to the batch for JDBC 2.0.
- Throws:
SQLException
- If an error occurs.
public void clearParameters() throws SQLException
This method clears all of the input parameter that have been set on this statement.
- Throws:
SQLException
- If an error occurs.
public boolean execute() throws SQLException
This method executes a prepared SQL query. Some prepared statements return multiple results; the execute method handles these complex statements as well as the simpler form of statements handled by executeQuery and executeUpdate.
- Returns:
- The result of the SQL statement.
- Throws:
SQLException
- If an error occurs.
public ResultSet executeQuery() throws SQLException
This method executes a prepared SQL query and returns its ResultSet.
- Returns:
- The ResultSet of the SQL statement.
- Throws:
SQLException
- If an error occurs.
public int executeUpdate() throws SQLException
This method executes an SQL INSERT, UPDATE or DELETE statement. SQL statements that return nothing such as SQL DDL statements can be executed.
- Returns:
- The result is either the row count for INSERT, UPDATE or DELETE statements; or 0 for SQL statements that return nothing.
- Throws:
SQLException
- If an error occurs.
public ResultSetMetaData getMetaData() throws SQLException
This method returns meta data for the result set from this statement.
- Returns:
- Meta data for the result set from this statement.
- Throws:
SQLException
- If an error occurs.
public void setArray(int i, Array x) throws SQLException
This method sets the specified parameter from the given JavaArray
value. The default object type to SQL type mapping will be used.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException
This method sets the specified parameter from the given Java ASCIIInputStream
value.
- Parameters:
length
- The number of bytes in the stream.
- Throws:
SQLException
- If an error occurs.
public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException
This method sets the specified parameter from the given Javajava.math.BigDecimal
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException
This method sets the specified parameter from the given Java binaryInputStream
value.
- Parameters:
length
- The number of bytes in the stream.
- Throws:
SQLException
- If an error occurs.
public void setBlob(int i, Blob x) throws SQLException
This method sets the specified parameter from the given JavaBlob
value. The default object type to SQL type mapping will be used.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setBoolean(int parameterIndex, boolean x) throws SQLException
This method sets the specified parameter from the given Javaboolean
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setByte(int parameterIndex, byte x) throws SQLException
This method sets the specified parameter from the given Javabyte
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setBytes(int parameterIndex, byte[] x) throws SQLException
This method sets the specified parameter from the given Javabyte
array value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException
This method sets the specified parameter from the given Java characterReader
value.
- Parameters:
length
- The number of bytes in the stream.
- Throws:
SQLException
- If an error occurs.
public void setClob(int i, Clob x) throws SQLException
This method sets the specified parameter from the given JavaClob
value. The default object type to SQL type mapping will be used.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setDate(int parameterIndex, Date x) throws SQLException
This method sets the specified parameter from the given Javajava.sql.Date
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException
This method sets the specified parameter from the given Javajava.sql.Date
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setDouble(int parameterIndex, double x) throws SQLException
This method sets the specified parameter from the given Javadouble
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setFloat(int parameterIndex, float x) throws SQLException
This method sets the specified parameter from the given Javafloat
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setInt(int parameterIndex, int x) throws SQLException
This method sets the specified parameter from the given Javaint
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setLong(int parameterIndex, long x) throws SQLException
This method sets the specified parameter from the given Javalong
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setNull(int parameterIndex, int sqlType) throws SQLException
This method populates the specified parameter with a SQL NULL value for the specified type.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException
This method populates the specified parameter with a SQL NULL value for the specified type.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setObject(int parameterIndex, Object x) throws SQLException
This method sets the specified parameter from the given JavaObject
value. The default object type to SQL type mapping will be used.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException
This method sets the specified parameter from the given JavaObject
value. The specified SQL object type will be used.
- Parameters:
- Throws:
SQLException
- If an error occurs.
- See Also:
Types
public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException
This method sets the specified parameter from the given JavaObject
value. The specified SQL object type will be used.
- Parameters:
scale
- The scale of the value, for numeric values only.
- Throws:
SQLException
- If an error occurs.
- See Also:
Types
public void setRef(int i, Ref x) throws SQLException
This method sets the specified parameter from the given JavaRef
value. The default object type to SQL type mapping will be used.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setShort(int parameterIndex, short x) throws SQLException
This method sets the specified parameter from the given Javashort
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setString(int parameterIndex, String x) throws SQLException
This method sets the specified parameter from the given JavaString
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setTime(int parameterIndex, Time x) throws SQLException
This method sets the specified parameter from the given Javajava.sql.Time
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException
This method sets the specified parameter from the given Javajava.sql.Time
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException
This method sets the specified parameter from the given Javajava.sql.Timestamp
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException
This method sets the specified parameter from the given Javajava.sql.Timestamp
value.
- Parameters:
- Throws:
SQLException
- If an error occurs.
public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException
Deprecated.
This method sets the specified parameter from the given Java Unicode UTF-8InputStream
value.
- Parameters:
length
- The number of bytes in the stream.
- Throws:
SQLException
- If an error occurs.
GNU Classpath (0.20) |