|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javasimon.jdbc.SimonStatement
org.javasimon.jdbc.SimonPreparedStatement
public class SimonPreparedStatement
Simon JDBC proxy prepared statement implementation class.
PreparedStatement| Field Summary | |
|---|---|
protected String |
sql
SQL string. |
private PreparedStatement |
stmt
|
| Fields inherited from class org.javasimon.jdbc.SimonStatement |
|---|
batchSql, conn, prefix, split, sqlCmdLabel, sqlNormalizer |
| 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 | |
|---|---|
SimonPreparedStatement(Connection conn,
PreparedStatement stmt,
String sql,
String prefix)
Class constructor, initializes Simons (lifespan, active) related to statement. |
|
| Method Summary | |
|---|---|
void |
addBatch()
Adds prepared SQL command into batch list of sql and also into real batch. |
void |
clearParameters()
|
boolean |
execute()
Measure and execute prepared SQL operation. |
ResultSet |
executeQuery()
Measure and execute prepared SQL operation. |
int |
executeUpdate()
Measure and execute prepared SQL operation. |
ResultSetMetaData |
getMetaData()
|
ParameterMetaData |
getParameterMetaData()
|
protected Split |
prepare()
Called before each prepared SQL command execution. |
void |
setArray(int i,
Array array)
|
void |
setAsciiStream(int i,
InputStream inputStream,
int i1)
|
void |
setBigDecimal(int i,
BigDecimal bigDecimal)
|
void |
setBinaryStream(int i,
InputStream inputStream,
int i1)
|
void |
setBlob(int i,
Blob blob)
|
void |
setBoolean(int i,
boolean b)
|
void |
setByte(int i,
byte b)
|
void |
setBytes(int i,
byte[] bytes)
|
void |
setCharacterStream(int i,
Reader reader,
int i1)
|
void |
setClob(int i,
Clob clob)
|
void |
setDate(int i,
Date date)
|
void |
setDate(int i,
Date date,
Calendar calendar)
|
void |
setDouble(int i,
double v)
|
void |
setFloat(int i,
float v)
|
void |
setInt(int i,
int i1)
|
void |
setLong(int i,
long l)
|
void |
setNull(int i,
int i1)
|
void |
setNull(int i,
int i1,
String s)
|
void |
setObject(int i,
Object o)
|
void |
setObject(int i,
Object o,
int i1)
|
void |
setObject(int i,
Object o,
int i1,
int i2)
|
void |
setRef(int i,
Ref ref)
|
void |
setShort(int i,
short i1)
|
void |
setString(int i,
String s)
|
void |
setTime(int i,
Time time)
|
void |
setTime(int i,
Time time,
Calendar calendar)
|
void |
setTimestamp(int i,
Timestamp timestamp)
|
void |
setTimestamp(int i,
Timestamp timestamp,
Calendar calendar)
|
void |
setUnicodeStream(int i,
InputStream inputStream,
int i1)
|
void |
setURL(int i,
URL url)
|
| Methods inherited from class org.javasimon.jdbc.SimonStatement |
|---|
addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, finish, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, prepare, prepare, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout, startSplit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.sql.PreparedStatement |
|---|
setAsciiStream, setAsciiStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setCharacterStream, setCharacterStream, setClob, setClob, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setRowId, setSQLXML |
| Methods inherited from interface java.sql.Wrapper |
|---|
isWrapperFor, unwrap |
| Field Detail |
|---|
protected String sql
private PreparedStatement stmt
| Constructor Detail |
|---|
SimonPreparedStatement(Connection conn,
PreparedStatement stmt,
String sql,
String prefix)
conn - database connection (Simon impl.)stmt - real prepared statementsql - sql commandprefix - hierarchy prefix for statement Simons| Method Detail |
|---|
protected final Split prepare()
Stopwatch Simon for measure SQL operation.
public final ResultSet executeQuery()
throws SQLException
executeQuery in interface PreparedStatementSQLException - if real calls fails
public final int executeUpdate()
throws SQLException
executeUpdate in interface PreparedStatementSQLException - if real calls fails
public final boolean execute()
throws SQLException
execute in interface PreparedStatementtrue if the first result is a ResultSet object;
false if it is an update count or there are no results
SQLException - if real calls fails
public final void addBatch()
throws SQLException
addBatch in interface PreparedStatementSQLException - if real calls fails
public final void setNull(int i,
int i1)
throws SQLException
setNull in interface PreparedStatementSQLException
public final void setBoolean(int i,
boolean b)
throws SQLException
setBoolean in interface PreparedStatementSQLException
public final void setByte(int i,
byte b)
throws SQLException
setByte in interface PreparedStatementSQLException
public final void setShort(int i,
short i1)
throws SQLException
setShort in interface PreparedStatementSQLException
public final void setInt(int i,
int i1)
throws SQLException
setInt in interface PreparedStatementSQLException
public final void setLong(int i,
long l)
throws SQLException
setLong in interface PreparedStatementSQLException
public final void setFloat(int i,
float v)
throws SQLException
setFloat in interface PreparedStatementSQLException
public final void setDouble(int i,
double v)
throws SQLException
setDouble in interface PreparedStatementSQLException
public final void setBigDecimal(int i,
BigDecimal bigDecimal)
throws SQLException
setBigDecimal in interface PreparedStatementSQLException
public final void setString(int i,
String s)
throws SQLException
setString in interface PreparedStatementSQLException
public final void setBytes(int i,
byte[] bytes)
throws SQLException
setBytes in interface PreparedStatementSQLException
public final void setDate(int i,
Date date)
throws SQLException
setDate in interface PreparedStatementSQLException
public final void setTime(int i,
Time time)
throws SQLException
setTime in interface PreparedStatementSQLException
public final void setTimestamp(int i,
Timestamp timestamp)
throws SQLException
setTimestamp in interface PreparedStatementSQLException
public final void setAsciiStream(int i,
InputStream inputStream,
int i1)
throws SQLException
setAsciiStream in interface PreparedStatementSQLException
public final void setUnicodeStream(int i,
InputStream inputStream,
int i1)
throws SQLException
setUnicodeStream in interface PreparedStatementSQLException
public final void setBinaryStream(int i,
InputStream inputStream,
int i1)
throws SQLException
setBinaryStream in interface PreparedStatementSQLException
public final void clearParameters()
throws SQLException
clearParameters in interface PreparedStatementSQLException
public final void setObject(int i,
Object o,
int i1)
throws SQLException
setObject in interface PreparedStatementSQLException
public final void setObject(int i,
Object o)
throws SQLException
setObject in interface PreparedStatementSQLException
public final void setObject(int i,
Object o,
int i1,
int i2)
throws SQLException
setObject in interface PreparedStatementSQLException
public final void setCharacterStream(int i,
Reader reader,
int i1)
throws SQLException
setCharacterStream in interface PreparedStatementSQLException
public final void setRef(int i,
Ref ref)
throws SQLException
setRef in interface PreparedStatementSQLException
public final void setBlob(int i,
Blob blob)
throws SQLException
setBlob in interface PreparedStatementSQLException
public final void setClob(int i,
Clob clob)
throws SQLException
setClob in interface PreparedStatementSQLException
public final void setArray(int i,
Array array)
throws SQLException
setArray in interface PreparedStatementSQLException
public final ResultSetMetaData getMetaData()
throws SQLException
getMetaData in interface PreparedStatementSQLException
public final void setDate(int i,
Date date,
Calendar calendar)
throws SQLException
setDate in interface PreparedStatementSQLException
public final void setTime(int i,
Time time,
Calendar calendar)
throws SQLException
setTime in interface PreparedStatementSQLException
public final void setTimestamp(int i,
Timestamp timestamp,
Calendar calendar)
throws SQLException
setTimestamp in interface PreparedStatementSQLException
public final void setNull(int i,
int i1,
String s)
throws SQLException
setNull in interface PreparedStatementSQLException
public final void setURL(int i,
URL url)
throws SQLException
setURL in interface PreparedStatementSQLException
public final ParameterMetaData getParameterMetaData()
throws SQLException
getParameterMetaData in interface PreparedStatementSQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||