|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectpatterntesting.runtime.monitor.db.internal.StasiStatement
patterntesting.runtime.monitor.db.internal.StasiPreparedStatement
public final class StasiPreparedStatement
A simple wrapper for PreparedStatement to be able to find resource
problems while reading and writing to the database. It allows us also to
measure times of SQL statements.
Why the name "Stasi..."? The Stasi was the official state security service of
Eastern Germany which controls the people (like NSA in the U.S. or KGB in
Russia, see also Wikipedia).
The StasiPreparedStatement controls the embedded PreparedStatement -
therefore the name.
| 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 | |
|---|---|
StasiPreparedStatement(PreparedStatement statement,
Object... args)
Instantiates a new stasi prepared statement. |
|
| Method Summary | |
|---|---|
void |
addBatch()
Adds the batch. |
void |
clearParameters()
Clear parameters. |
void |
close()
Close. |
boolean |
execute()
Execute. |
ResultSet |
executeQuery()
Execute query. |
int |
executeUpdate()
Execute update. |
ResultSetMetaData |
getMetaData()
Gets the meta data. |
ParameterMetaData |
getParameterMetaData()
Gets the parameter meta data. |
void |
setArray(int arg0,
Array arg1)
Sets the array. |
void |
setAsciiStream(int arg0,
InputStream arg1)
Sets the ascii stream. |
void |
setAsciiStream(int arg0,
InputStream arg1,
int arg2)
Sets the ascii stream. |
void |
setAsciiStream(int arg0,
InputStream arg1,
long arg2)
Sets the ascii stream. |
void |
setBigDecimal(int arg0,
BigDecimal arg1)
Sets the big decimal. |
void |
setBinaryStream(int arg0,
InputStream arg1)
Sets the binary stream. |
void |
setBinaryStream(int arg0,
InputStream arg1,
int arg2)
Sets the binary stream. |
void |
setBinaryStream(int arg0,
InputStream arg1,
long arg2)
Sets the binary stream. |
void |
setBlob(int arg0,
Blob arg1)
Sets the blob. |
void |
setBlob(int arg0,
InputStream arg1)
Sets the blob. |
void |
setBlob(int arg0,
InputStream arg1,
long arg2)
Sets the blob. |
void |
setBoolean(int arg0,
boolean arg1)
Sets the boolean. |
void |
setByte(int arg0,
byte arg1)
Sets the byte. |
void |
setBytes(int arg0,
byte[] arg1)
Sets the bytes. |
void |
setCharacterStream(int arg0,
Reader arg1)
Sets the character stream. |
void |
setCharacterStream(int arg0,
Reader arg1,
int arg2)
Sets the character stream. |
void |
setCharacterStream(int arg0,
Reader arg1,
long arg2)
Sets the character stream. |
void |
setClob(int arg0,
Clob arg1)
Sets the clob. |
void |
setClob(int arg0,
Reader arg1)
Sets the clob. |
void |
setClob(int arg0,
Reader arg1,
long arg2)
Sets the clob. |
void |
setDate(int arg0,
Date arg1)
Sets the date. |
void |
setDate(int arg0,
Date arg1,
Calendar arg2)
Sets the date. |
void |
setDouble(int arg0,
double arg1)
Sets the double. |
void |
setFloat(int arg0,
float arg1)
Sets the float. |
void |
setInt(int arg0,
int arg1)
Sets the int. |
void |
setLong(int arg0,
long arg1)
Sets the long. |
void |
setNCharacterStream(int arg0,
Reader arg1)
Sets the n character stream. |
void |
setNCharacterStream(int arg0,
Reader arg1,
long arg2)
Sets the n character stream. |
void |
setNClob(int arg0,
NClob arg1)
Sets the n clob. |
void |
setNClob(int arg0,
Reader arg1)
Sets the n clob. |
void |
setNClob(int arg0,
Reader arg1,
long arg2)
Sets the n clob. |
void |
setNString(int arg0,
String arg1)
Sets the n string. |
void |
setNull(int arg0,
int arg1)
Sets the null. |
void |
setNull(int arg0,
int arg1,
String arg2)
Sets the null. |
void |
setObject(int arg0,
Object arg1)
Sets the object. |
void |
setObject(int arg0,
Object arg1,
int arg2)
Sets the object. |
void |
setObject(int arg0,
Object arg1,
int arg2,
int arg3)
Sets the object. |
void |
setRef(int arg0,
Ref arg1)
Sets the ref. |
void |
setRowId(int arg0,
RowId arg1)
Sets the row id. |
void |
setShort(int arg0,
short arg1)
Sets the short. |
void |
setSQLXML(int arg0,
SQLXML arg1)
Sets the sqlxml. |
void |
setString(int arg0,
String arg1)
Sets the string. |
void |
setTime(int arg0,
Time arg1)
Sets the time. |
void |
setTime(int arg0,
Time arg1,
Calendar arg2)
Sets the time. |
void |
setTimestamp(int arg0,
Timestamp arg1)
Sets the timestamp. |
void |
setTimestamp(int arg0,
Timestamp arg1,
Calendar arg2)
Sets the timestamp. |
void |
setUnicodeStream(int arg0,
InputStream arg1,
int arg2)
Sets the unicode stream. |
void |
setURL(int arg0,
URL arg1)
Sets the url. |
String |
toString()
We want to return the real SQL as string represenation. |
| Methods inherited from class patterntesting.runtime.monitor.db.internal.StasiStatement |
|---|
addBatch, cancel, clearBatch, clearWarnings, closeOnCompletion, enrichedSQLException, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getStatement, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.sql.Wrapper |
|---|
isWrapperFor, unwrap |
| Constructor Detail |
|---|
public StasiPreparedStatement(PreparedStatement statement,
Object... args)
statement - the statementargs - the arguments for the creation of the
PreparedStatement| Method Detail |
|---|
public void addBatch()
throws SQLException
addBatch in interface PreparedStatementSQLException - the sQL exceptionPreparedStatement.addBatch()
public void clearParameters()
throws SQLException
clearParameters in interface PreparedStatementSQLException - the sQL exceptionPreparedStatement.clearParameters()
public void close()
throws SQLException
close in interface Statementclose in class StasiStatementSQLException - the sQL exceptionStatement.close()
public boolean execute()
throws SQLException
execute in interface PreparedStatementSQLException - the sQL exceptionPreparedStatement.execute()
public ResultSet executeQuery()
throws SQLException
executeQuery in interface PreparedStatementSQLException - the sQL exceptionPreparedStatement.executeQuery()
public int executeUpdate()
throws SQLException
executeUpdate in interface PreparedStatementSQLException - the sQL exceptionPreparedStatement.executeUpdate()
public ResultSetMetaData getMetaData()
throws SQLException
getMetaData in interface PreparedStatementSQLException - the sQL exceptionPreparedStatement.getMetaData()
public ParameterMetaData getParameterMetaData()
throws SQLException
getParameterMetaData in interface PreparedStatementSQLException - the sQL exceptionPreparedStatement.getParameterMetaData()
public void setArray(int arg0,
Array arg1)
throws SQLException
setArray in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setArray(int, java.sql.Array)
public void setAsciiStream(int arg0,
InputStream arg1,
int arg2)
throws SQLException
setAsciiStream in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setAsciiStream(int, java.io.InputStream, int)
public void setAsciiStream(int arg0,
InputStream arg1,
long arg2)
throws SQLException
setAsciiStream in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setAsciiStream(int, java.io.InputStream, long)
public void setAsciiStream(int arg0,
InputStream arg1)
throws SQLException
setAsciiStream in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setAsciiStream(int, java.io.InputStream)
public void setBigDecimal(int arg0,
BigDecimal arg1)
throws SQLException
setBigDecimal in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setBigDecimal(int, java.math.BigDecimal)
public void setBinaryStream(int arg0,
InputStream arg1,
int arg2)
throws SQLException
setBinaryStream in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setBinaryStream(int, java.io.InputStream, int)
public void setBinaryStream(int arg0,
InputStream arg1,
long arg2)
throws SQLException
setBinaryStream in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setBinaryStream(int, java.io.InputStream, long)
public void setBinaryStream(int arg0,
InputStream arg1)
throws SQLException
setBinaryStream in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setBinaryStream(int, java.io.InputStream)
public void setBlob(int arg0,
Blob arg1)
throws SQLException
setBlob in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setBlob(int, java.sql.Blob)
public void setBlob(int arg0,
InputStream arg1,
long arg2)
throws SQLException
setBlob in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setBlob(int, java.io.InputStream, long)
public void setBlob(int arg0,
InputStream arg1)
throws SQLException
setBlob in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setBlob(int, java.io.InputStream)
public void setBoolean(int arg0,
boolean arg1)
throws SQLException
setBoolean in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setBoolean(int, boolean)
public void setByte(int arg0,
byte arg1)
throws SQLException
setByte in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setByte(int, byte)
public void setBytes(int arg0,
byte[] arg1)
throws SQLException
setBytes in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setBytes(int, byte[])
public void setCharacterStream(int arg0,
Reader arg1,
int arg2)
throws SQLException
setCharacterStream in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setCharacterStream(int, java.io.Reader, int)
public void setCharacterStream(int arg0,
Reader arg1,
long arg2)
throws SQLException
setCharacterStream in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setCharacterStream(int, java.io.Reader, long)
public void setCharacterStream(int arg0,
Reader arg1)
throws SQLException
setCharacterStream in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setCharacterStream(int, java.io.Reader)
public void setClob(int arg0,
Clob arg1)
throws SQLException
setClob in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setClob(int, java.sql.Clob)
public void setClob(int arg0,
Reader arg1,
long arg2)
throws SQLException
setClob in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setClob(int, java.io.Reader, long)
public void setClob(int arg0,
Reader arg1)
throws SQLException
setClob in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setClob(int, java.io.Reader)
public void setDate(int arg0,
Date arg1,
Calendar arg2)
throws SQLException
setDate in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setDate(int, java.sql.Date, java.util.Calendar)
public void setDate(int arg0,
Date arg1)
throws SQLException
setDate in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setDate(int, java.sql.Date)
public void setDouble(int arg0,
double arg1)
throws SQLException
setDouble in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setDouble(int, double)
public void setFloat(int arg0,
float arg1)
throws SQLException
setFloat in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setFloat(int, float)
public void setInt(int arg0,
int arg1)
throws SQLException
setInt in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setInt(int, int)
public void setLong(int arg0,
long arg1)
throws SQLException
setLong in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setLong(int, long)
public void setNCharacterStream(int arg0,
Reader arg1,
long arg2)
throws SQLException
setNCharacterStream in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setNCharacterStream(int, java.io.Reader, long)
public void setNCharacterStream(int arg0,
Reader arg1)
throws SQLException
setNCharacterStream in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setNCharacterStream(int, java.io.Reader)
public void setNClob(int arg0,
NClob arg1)
throws SQLException
setNClob in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setNClob(int, java.sql.NClob)
public void setNClob(int arg0,
Reader arg1,
long arg2)
throws SQLException
setNClob in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setNClob(int, java.io.Reader, long)
public void setNClob(int arg0,
Reader arg1)
throws SQLException
setNClob in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setNClob(int, java.io.Reader)
public void setNString(int arg0,
String arg1)
throws SQLException
setNString in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setNString(int, java.lang.String)
public void setNull(int arg0,
int arg1,
String arg2)
throws SQLException
setNull in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setNull(int, int, java.lang.String)
public void setNull(int arg0,
int arg1)
throws SQLException
setNull in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setNull(int, int)
public void setObject(int arg0,
Object arg1,
int arg2,
int arg3)
throws SQLException
setObject in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2arg3 - the arg3
SQLException - the sQL exceptionPreparedStatement.setObject(int, java.lang.Object, int, int)
public void setObject(int arg0,
Object arg1,
int arg2)
throws SQLException
setObject in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setObject(int, java.lang.Object, int)
public void setObject(int arg0,
Object arg1)
throws SQLException
setObject in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setObject(int, java.lang.Object)
public void setRef(int arg0,
Ref arg1)
throws SQLException
setRef in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setRef(int, java.sql.Ref)
public void setRowId(int arg0,
RowId arg1)
throws SQLException
setRowId in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setRowId(int, java.sql.RowId)
public void setSQLXML(int arg0,
SQLXML arg1)
throws SQLException
setSQLXML in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setSQLXML(int, java.sql.SQLXML)
public void setShort(int arg0,
short arg1)
throws SQLException
setShort in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setShort(int, short)
public void setString(int arg0,
String arg1)
throws SQLException
setString in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setString(int, java.lang.String)
public void setTime(int arg0,
Time arg1,
Calendar arg2)
throws SQLException
setTime in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setTime(int, java.sql.Time, java.util.Calendar)
public void setTime(int arg0,
Time arg1)
throws SQLException
setTime in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setTime(int, java.sql.Time)
public void setTimestamp(int arg0,
Timestamp arg1,
Calendar arg2)
throws SQLException
setTimestamp in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionPreparedStatement.setTimestamp(int, java.sql.Timestamp, java.util.Calendar)
public void setTimestamp(int arg0,
Timestamp arg1)
throws SQLException
setTimestamp in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setTimestamp(int, java.sql.Timestamp)
public void setURL(int arg0,
URL arg1)
throws SQLException
setURL in interface PreparedStatementarg0 - the arg0arg1 - the arg1
SQLException - the sQL exceptionPreparedStatement.setURL(int, java.net.URL)
public void setUnicodeStream(int arg0,
InputStream arg1,
int arg2)
throws SQLException
setUnicodeStream in interface PreparedStatementarg0 - the arg0arg1 - the arg1arg2 - the arg2
SQLException - the sQL exceptionpublic String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||