|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--superwaba.ext.xplat.sql.Statement | +--superwaba.ext.xplat.sql.PreparedStatement
This interface provides a mechanism for executing pre-compiled statements. This provides greater efficiency when calling the same statement multiple times. Parameters are allowed in a statement, providings for maximum reusability.
Fields inherited from class superwaba.ext.xplat.sql.Statement |
CLOSE_ALL_RESULTS,
CLOSE_CURRENT_RESULT,
EXECUTE_FAILED,
KEEP_CURRENT_RESULT,
NO_GENERATED_KEYS,
RETURN_GENERATED_KEYS,
SUCCESS_NO_INFO |
Constructor Summary | |
PreparedStatement()
|
Method Summary | |
abstract void |
addBatch()
This method adds a set of parameters to the batch for JDBC 2.0. |
abstract void |
clearParameters()
This method clears all of the input parameter that have been set on this statement. |
abstract boolean |
execute()
This method executes a prepared SQL query. |
abstract ResultSet |
executeQuery()
This method executes a prepared SQL query and returns its ResultSet. |
abstract int |
executeUpdate()
This method executes an SQL INSERT, UPDATE or DELETE statement. |
abstract ResultSetMetaData |
getMetaData()
This method returns meta data for the result set from this statement. |
abstract ParameterMetaData |
getParameterMetaData()
|
abstract void |
setBlob(int i,
Blob x)
This method sets the specified parameter from the given Java Blob value. |
abstract void |
setBoolean(int parameterIndex,
boolean x)
This method sets the specified parameter from the given Java boolean value. |
abstract void |
setByte(int parameterIndex,
byte x)
This method sets the specified parameter from the given Java byte value. |
abstract void |
setBytes(int parameterIndex,
byte[] x)
This method sets the specified parameter from the given Java byte array value. |
abstract void |
setBytes(int parameterIndex,
byte[] x,
int start,
int length)
This method sets the specified parameter from the given Java byte array value. |
abstract void |
setDate(int parameterIndex,
Date x)
This method sets the specified parameter from the given Java java.sql.Date value. |
abstract void |
setDouble(int parameterIndex,
double x)
This method sets the specified parameter from the given Java double value. |
abstract void |
setFloat(int parameterIndex,
float x)
This method sets the specified parameter from the given Java float value. |
abstract void |
setInt(int parameterIndex,
int x)
This method sets the specified parameter from the given Java int value. |
abstract void |
setLong(int parameterIndex,
long x)
This method sets the specified parameter from the given Java long value. |
abstract void |
setNull(int parameterIndex,
int sqlType)
This method populates the specified parameter with a SQL NULL value for the specified type. |
abstract void |
setNull(int paramIndex,
int sqlType,
String typeName)
This method populates the specified parameter with a SQL NULL value for the specified type. |
abstract void |
setObject(int parameterIndex,
Object x)
This method sets the specified parameter from the given Java Object value. |
abstract void |
setObject(int parameterIndex,
Object x,
int targetSqlType)
This method sets the specified parameter from the given Java Object value. |
abstract void |
setObject(int parameterIndex,
Object x,
int targetSqlType,
int scale)
This method sets the specified parameter from the given Java Object value. |
abstract void |
setRef(int i,
Ref x)
This method sets the specified parameter from the given Java Ref value. |
abstract void |
setShort(int parameterIndex,
short x)
This method sets the specified parameter from the given Java short value. |
abstract void |
setString(int parameterIndex,
String x)
This method sets the specified parameter from the given Java String value. |
abstract void |
setTime(int parameterIndex,
Time x)
This method sets the specified parameter from the given Java java.sql.Time value. |
abstract void |
setTimestamp(int parameterIndex,
Timestamp x)
This method sets the specified parameter from the given Java java.sql.Timestamp value. |
Methods inherited from class superwaba.ext.xplat.sql.Statement |
addBatch,
clearBatch,
clearWarnings,
close,
execute,
executeBatch,
executeQuery,
executeUpdate,
getConnection,
getFetchDirection,
getFetchSize,
getMaxFieldSize,
getMaxRows,
getMoreResults,
getQueryTimeout,
getResultSet,
getResultSetConcurrency,
getResultSetType,
getUpdateCount,
getWarnings,
setCursorName,
setEscapeProcessing,
setFetchDirection,
setFetchSize,
setMaxFieldSize,
setMaxRows,
setQueryTimeout |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
toString,
wait,
wait |
Constructor Detail |
public PreparedStatement()
Method Detail |
public abstract ResultSet executeQuery() throws SQLException
public abstract int executeUpdate() throws SQLException
public abstract void setNull(int parameterIndex, int sqlType) throws SQLException
index
- The index of the parameter to set.type
- The SQL type identifier of the parameter from Types
public abstract void setBoolean(int parameterIndex, boolean x) throws SQLException
boolean
value.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract void setByte(int parameterIndex, byte x) throws SQLException
byte
value.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract void setShort(int parameterIndex, short x) throws SQLException
short
value.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract void setInt(int parameterIndex, int x) throws SQLException
int
value.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract void setLong(int parameterIndex, long x) throws SQLException
long
value.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract void setFloat(int parameterIndex, float x) throws SQLException
float
value.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract void setDouble(int parameterIndex, double x) throws SQLException
double
value.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract void setString(int parameterIndex, String x) throws SQLException
String
value.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract void setBytes(int parameterIndex, byte[] x) throws SQLException
byte
array value.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract void setBytes(int parameterIndex, byte[] x, int start, int length) throws SQLException
byte
array value. This method is new for SuperWaba, and is
included to allow optimized byte array functionality in small devices.index
- The index of the parameter value to set.value
- The value of the parameter.start
- index into byte array from which to begin pulling bytes to store in parameter.length
- number of bytes to pull from byte array to store in parameter.public abstract void setDate(int parameterIndex, Date x) throws SQLException
java.sql.Date
value.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract void setTime(int parameterIndex, Time x) throws SQLException
java.sql.Time
value.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract void setTimestamp(int parameterIndex, Timestamp x) throws SQLException
java.sql.Timestamp
value.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract void clearParameters() throws SQLException
public abstract void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException
Object
value. The specified SQL object type will be used.index
- The index of the parameter value to set.value
- The value of the parameter.type
- The SQL type to use for the parameter, from Types
scale
- The scale of the value, for numeric values only.Types
public abstract void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException
Object
value. The specified SQL object type will be used.index
- The index of the parameter value to set.value
- The value of the parameter.type
- The SQL type to use for the parameter, from Types
Types
public abstract void setObject(int parameterIndex, Object x) throws SQLException
Object
value. The default object type to SQL type mapping
will be used.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract boolean execute() throws SQLException
public abstract void addBatch() throws SQLException
public abstract void setRef(int i, Ref x) throws SQLException
Ref
value. The default object type to SQL type mapping
will be used.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract void setBlob(int i, Blob x) throws SQLException
Blob
value. The default object type to SQL type mapping
will be used.index
- The index of the parameter value to set.value
- The value of the parameter.public abstract ResultSetMetaData getMetaData() throws SQLException
public abstract void setNull(int paramIndex, int sqlType, String typeName) throws SQLException
index
- The index of the parameter to set.type
- The SQL type identifier of the parameter from Types
name
- The name of the data type, for user defined types.public abstract ParameterMetaData getParameterMetaData() throws SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |