Package com.alibaba.druid.proxy.jdbc
Class PreparedStatementProxyImpl
java.lang.Object
com.alibaba.druid.proxy.jdbc.WrapperProxyImpl
com.alibaba.druid.proxy.jdbc.StatementProxyImpl
com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl
- All Implemented Interfaces:
PreparedStatementProxy,StatementProxy,WrapperProxy,AutoCloseable,PreparedStatement,Statement,Wrapper
- Direct Known Subclasses:
CallableStatementProxyImpl
public class PreparedStatementProxyImpl
extends StatementProxyImpl
implements PreparedStatementProxy
- Author:
- wenshao [szujobs@hotmail.com]
-
Field Summary
FieldsFields inherited from class com.alibaba.druid.proxy.jdbc.StatementProxyImpl
batchSqlList, firstResultSet, lastExecuteSql, lastExecuteStartNano, lastExecuteTimeNano, lastExecuteType, sqlStat, updateCountFields 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
ConstructorsConstructorDescriptionPreparedStatementProxyImpl(ConnectionProxy connection, PreparedStatement statement, String sql, long id) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBatch()voidcreateParameter(int sqlType, Object value, Calendar calendar) booleanexecute()intgetParameter(int i) intgetSql()booleanisWrapperFor(Class<?> iface) voidvoidsetAsciiStream(int parameterIndex, InputStream x) voidsetAsciiStream(int parameterIndex, InputStream x, int length) voidsetAsciiStream(int parameterIndex, InputStream x, long length) voidsetBigDecimal(int parameterIndex, BigDecimal x) voidsetBinaryStream(int parameterIndex, InputStream x) voidsetBinaryStream(int parameterIndex, InputStream x, int length) voidsetBinaryStream(int parameterIndex, InputStream x, long length) voidsetBlob(int parameterIndex, InputStream x) voidsetBlob(int parameterIndex, InputStream x, long length) voidvoidsetBoolean(int parameterIndex, boolean x) voidsetByte(int parameterIndex, byte x) voidsetBytes(int parameterIndex, byte[] x) voidsetCharacterStream(int parameterIndex, Reader x) voidsetCharacterStream(int parameterIndex, Reader x, int length) voidsetCharacterStream(int parameterIndex, Reader x, long length) voidvoidvoidvoidvoidvoidsetDouble(int parameterIndex, double x) voidsetFloat(int parameterIndex, float x) voidsetInt(int parameterIndex, int x) voidsetLong(int parameterIndex, long x) voidsetNCharacterStream(int parameterIndex, Reader x) voidsetNCharacterStream(int parameterIndex, Reader x, long length) voidvoidvoidvoidsetNString(int parameterIndex, String x) voidsetNull(int parameterIndex, int sqlType) voidvoidvoidvoidvoidsetParameter(int jdbcIndex, JdbcParameter parameter) voidvoidvoidsetShort(int parameterIndex, short x) voidprotected voidsetStatement(PreparedStatement statement) voidvoidvoidvoidsetTimestamp(int parameterIndex, Timestamp x) voidsetTimestamp(int parameterIndex, Timestamp x, Calendar cal) voidsetUnicodeStream(int parameterIndex, InputStream x, int length) void<T> TMethods inherited from class com.alibaba.druid.proxy.jdbc.StatementProxyImpl
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, createChain, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getBatchSqlList, getConnection, getConnectionProxy, getFetchDirection, getFetchSize, getGeneratedKeys, getLastExecuteStartNano, getLastExecuteTimeNano, getLastExecuteType, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getSqlStat, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isFirstResultSet, isPoolable, recycleFilterChain, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLastExecuteStartNano, setLastExecuteStartNano, setLastExecuteTimeNano, setLastExecuteTimeNano, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, setSqlStatMethods inherited from class com.alibaba.druid.proxy.jdbc.WrapperProxyImpl
clearAttributes, getAttribute, getAttributes, getAttributesSize, getId, putAttributeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.PreparedStatement
executeLargeUpdate, setObject, setObjectMethods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutMethods inherited from interface com.alibaba.druid.proxy.jdbc.StatementProxy
getBatchSqlList, getConnectionProxy, getLastExecuteStartNano, getLastExecuteTimeNano, getLastExecuteType, getSqlStat, isFirstResultSet, setLastExecuteStartNano, setLastExecuteStartNano, setLastExecuteTimeNano, setLastExecuteTimeNano, setSqlStatMethods inherited from interface com.alibaba.druid.proxy.jdbc.WrapperProxy
clearAttributes, getAttribute, getAttributes, getAttributesSize, getId, putAttribute
-
Field Details
-
sql
-
-
Constructor Details
-
PreparedStatementProxyImpl
public PreparedStatementProxyImpl(ConnectionProxy connection, PreparedStatement statement, String sql, long id)
-
-
Method Details
-
getParameters
- Specified by:
getParametersin interfacePreparedStatementProxy- Specified by:
getParametersin interfaceStatementProxy- Overrides:
getParametersin classStatementProxyImpl
-
setStatement
-
setParameter
-
getParametersSize
public int getParametersSize()- Specified by:
getParametersSizein interfaceStatementProxy- Overrides:
getParametersSizein classStatementProxyImpl
-
getParameter
- Specified by:
getParameterin interfaceStatementProxy- Overrides:
getParameterin classStatementProxyImpl
-
getSql
- Specified by:
getSqlin interfacePreparedStatementProxy
-
getRawObject
- Specified by:
getRawObjectin interfacePreparedStatementProxy- Specified by:
getRawObjectin interfaceStatementProxy- Specified by:
getRawObjectin interfaceWrapperProxy- Overrides:
getRawObjectin classStatementProxyImpl
-
addBatch
- Specified by:
addBatchin interfacePreparedStatement- Throws:
SQLException
-
clearParameters
- Specified by:
clearParametersin interfacePreparedStatement- Throws:
SQLException
-
getBatchSql
- Specified by:
getBatchSqlin interfaceStatementProxy- Overrides:
getBatchSqlin classStatementProxyImpl
-
execute
- Specified by:
executein interfacePreparedStatement- Throws:
SQLException
-
executeQuery
- Specified by:
executeQueryin interfacePreparedStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfacePreparedStatement- Throws:
SQLException
-
getMetaData
- Specified by:
getMetaDatain interfacePreparedStatement- Throws:
SQLException
-
getParameterMetaData
- Specified by:
getParameterMetaDatain interfacePreparedStatement- Throws:
SQLException
-
setArray
- Specified by:
setArrayin interfacePreparedStatement- Throws:
SQLException
-
setAsciiStream
- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLException
-
setAsciiStream
- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLException
-
setAsciiStream
- Specified by:
setAsciiStreamin interfacePreparedStatement- Throws:
SQLException
-
setBigDecimal
- Specified by:
setBigDecimalin interfacePreparedStatement- Throws:
SQLException
-
setBinaryStream
- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLException
-
setBinaryStream
- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLException
-
setBinaryStream
- Specified by:
setBinaryStreamin interfacePreparedStatement- Throws:
SQLException
-
setBlob
- Specified by:
setBlobin interfacePreparedStatement- Throws:
SQLException
-
setBlob
- Specified by:
setBlobin interfacePreparedStatement- Throws:
SQLException
-
setBlob
- Specified by:
setBlobin interfacePreparedStatement- Throws:
SQLException
-
setBoolean
- Specified by:
setBooleanin interfacePreparedStatement- Throws:
SQLException
-
setByte
- Specified by:
setBytein interfacePreparedStatement- Throws:
SQLException
-
setBytes
- Specified by:
setBytesin interfacePreparedStatement- Throws:
SQLException
-
setCharacterStream
- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setCharacterStream
- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setCharacterStream
- Specified by:
setCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfacePreparedStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfacePreparedStatement- Throws:
SQLException
-
setClob
- Specified by:
setClobin interfacePreparedStatement- Throws:
SQLException
-
setDate
- Specified by:
setDatein interfacePreparedStatement- Throws:
SQLException
-
setDate
- Specified by:
setDatein interfacePreparedStatement- Throws:
SQLException
-
setDouble
- Specified by:
setDoublein interfacePreparedStatement- Throws:
SQLException
-
setFloat
- Specified by:
setFloatin interfacePreparedStatement- Throws:
SQLException
-
setInt
- Specified by:
setIntin interfacePreparedStatement- Throws:
SQLException
-
setLong
- Specified by:
setLongin interfacePreparedStatement- Throws:
SQLException
-
setNCharacterStream
- Specified by:
setNCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setNCharacterStream
- Specified by:
setNCharacterStreamin interfacePreparedStatement- Throws:
SQLException
-
setNClob
- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLException
-
setNClob
- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLException
-
setNClob
- Specified by:
setNClobin interfacePreparedStatement- Throws:
SQLException
-
setNString
- Specified by:
setNStringin interfacePreparedStatement- Throws:
SQLException
-
setNull
- Specified by:
setNullin interfacePreparedStatement- Throws:
SQLException
-
setNull
- Specified by:
setNullin interfacePreparedStatement- Throws:
SQLException
-
setObject
- Specified by:
setObjectin interfacePreparedStatement- Throws:
SQLException
-
setObject
- Specified by:
setObjectin interfacePreparedStatement- Throws:
SQLException
-
setObject
public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException - Specified by:
setObjectin interfacePreparedStatement- Throws:
SQLException
-
setRef
- Specified by:
setRefin interfacePreparedStatement- Throws:
SQLException
-
setRowId
- Specified by:
setRowIdin interfacePreparedStatement- Throws:
SQLException
-
setSQLXML
- Specified by:
setSQLXMLin interfacePreparedStatement- Throws:
SQLException
-
setShort
- Specified by:
setShortin interfacePreparedStatement- Throws:
SQLException
-
setString
- Specified by:
setStringin interfacePreparedStatement- Throws:
SQLException
-
setTime
- Specified by:
setTimein interfacePreparedStatement- Throws:
SQLException
-
setTime
- Specified by:
setTimein interfacePreparedStatement- Throws:
SQLException
-
setTimestamp
- Specified by:
setTimestampin interfacePreparedStatement- Throws:
SQLException
-
setTimestamp
- Specified by:
setTimestampin interfacePreparedStatement- Throws:
SQLException
-
setURL
- Specified by:
setURLin interfacePreparedStatement- Throws:
SQLException
-
setUnicodeStream
- Specified by:
setUnicodeStreamin interfacePreparedStatement- Throws:
SQLException
-
getLastExecuteSql
- Specified by:
getLastExecuteSqlin interfaceStatementProxy- Overrides:
getLastExecuteSqlin classStatementProxyImpl
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Overrides:
unwrapin classStatementProxyImpl- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Overrides:
isWrapperForin classStatementProxyImpl- Throws:
SQLException
-
createParameter
-