package com.yc.dataAccess; import java.io.InputStream; import java.io.Reader; import java.math.BigDecimal; import java.net.URL; import java.sql.Array; import java.sql.Blob; import java.sql.Clob; import java.sql.Connection; import java.sql.Date; import java.sql.NClob; import java.sql.ParameterMetaData; import java.sql.PreparedStatement; import java.sql.Ref; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.RowId; import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.SQLXML; import java.sql.Time; import java.sql.Timestamp; import java.util.Calendar; import com.yc.currentThreadInfo.SqlRecord; @SuppressWarnings("all") public class YCPreparedStatement implements PreparedStatement{ private PreparedStatement preparedStatement; public YCPreparedStatement(PreparedStatement preparedStatement){ this.preparedStatement = preparedStatement; } public void addBatch() throws SQLException { preparedStatement.addBatch(); } public void clearParameters() throws SQLException { preparedStatement.clearParameters(); } public boolean execute() throws SQLException { return preparedStatement.execute(); } public ResultSet executeQuery() throws SQLException { return preparedStatement.executeQuery(); } public int executeUpdate() throws SQLException { return preparedStatement.executeUpdate(); } public ResultSetMetaData getMetaData() throws SQLException { return preparedStatement.getMetaData(); } public ParameterMetaData getParameterMetaData() throws SQLException { return preparedStatement.getParameterMetaData(); } public void setArray(int parameterIndex, Array x) throws SQLException { preparedStatement.setArray(parameterIndex, x); } public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException { preparedStatement.setAsciiStream(parameterIndex, x); } public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException { preparedStatement.setAsciiStream(parameterIndex, x, length); } public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException { preparedStatement.setAsciiStream(parameterIndex, x, length); } public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { preparedStatement.setBigDecimal(parameterIndex, x); } public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException { preparedStatement.setBinaryStream(parameterIndex, x); } public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException { preparedStatement.setBinaryStream(parameterIndex, x, length); } public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException { preparedStatement.setBinaryStream(parameterIndex, x, length); } public void setBlob(int parameterIndex, Blob x) throws SQLException { preparedStatement.setBlob(parameterIndex, x); } public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { preparedStatement.setBlob(parameterIndex, inputStream); } public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { preparedStatement.setBlob(parameterIndex, inputStream, length); } public void setBoolean(int parameterIndex, boolean x) throws SQLException { preparedStatement.setBoolean(parameterIndex, x); } public void setByte(int parameterIndex, byte x) throws SQLException { preparedStatement.setByte(parameterIndex, x); } public void setBytes(int parameterIndex, byte[] x) throws SQLException { preparedStatement.setBytes(parameterIndex, x); } public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { preparedStatement.setCharacterStream(parameterIndex, reader); } public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException { preparedStatement.setCharacterStream(parameterIndex, reader, length); } public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException { preparedStatement.setCharacterStream(parameterIndex, reader, length); } public void setClob(int parameterIndex, Clob x) throws SQLException { preparedStatement.setClob(parameterIndex, x); } public void setClob(int parameterIndex, Reader reader) throws SQLException { preparedStatement.setClob(parameterIndex, reader); } public void setClob(int parameterIndex, Reader reader, long length) throws SQLException { preparedStatement.setClob(parameterIndex, reader, length); } public void setDate(int parameterIndex, Date x) throws SQLException { preparedStatement.setDate(parameterIndex, x); } public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException { preparedStatement.setDate(parameterIndex, x,cal); } public void setDouble(int parameterIndex, double x) throws SQLException { preparedStatement.setDouble(parameterIndex, x); } public void setFloat(int parameterIndex, float x) throws SQLException { preparedStatement.setFloat(parameterIndex, x); } public void setInt(int parameterIndex, int x) throws SQLException { preparedStatement.setInt(parameterIndex, x); } public void setLong(int parameterIndex, long x) throws SQLException { preparedStatement.setLong(parameterIndex, x); } public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException { preparedStatement.setNCharacterStream(parameterIndex, value); } public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException { preparedStatement.setNCharacterStream(parameterIndex, value, length); } public void setNClob(int parameterIndex, NClob value) throws SQLException { preparedStatement.setNClob(parameterIndex, value); } public void setNClob(int parameterIndex, Reader reader) throws SQLException { preparedStatement.setNClob(parameterIndex, reader); } public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException { preparedStatement.setNClob(parameterIndex, reader, length); } public void setNString(int parameterIndex, String value) throws SQLException { preparedStatement.setNString(parameterIndex, value); } public void setNull(int parameterIndex, int sqlType) throws SQLException { preparedStatement.setNull(parameterIndex, sqlType); } public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException { preparedStatement.setNull(parameterIndex, sqlType, typeName); } public void setObject(int parameterIndex, Object x) throws SQLException { preparedStatement.setObject(parameterIndex, x); } public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException { preparedStatement.setObject(parameterIndex, x, targetSqlType); } public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException { preparedStatement.setObject(parameterIndex, x, targetSqlType, scaleOrLength); } public void setRef(int parameterIndex, Ref x) throws SQLException { preparedStatement.setRef(parameterIndex, x); } public void setRowId(int parameterIndex, RowId x) throws SQLException { preparedStatement.setRowId(parameterIndex, x); } public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException { preparedStatement.setSQLXML(parameterIndex, xmlObject); } public void setShort(int parameterIndex, short x) throws SQLException { preparedStatement.setShort(parameterIndex, x); } public void setString(int parameterIndex, String x) throws SQLException { preparedStatement.setString(parameterIndex, x); } public void setTime(int parameterIndex, Time x) throws SQLException { preparedStatement.setTime(parameterIndex, x); } public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException { preparedStatement.setTime(parameterIndex, x, cal); } public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { preparedStatement.setTimestamp(parameterIndex, x); } public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException { preparedStatement.setTimestamp(parameterIndex, x, cal); } public void setURL(int parameterIndex, URL x) throws SQLException { preparedStatement.setURL(parameterIndex, x); } public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException { preparedStatement.setUnicodeStream(parameterIndex, x, length); } public void addBatch(String sql) throws SQLException { preparedStatement.addBatch(sql); } public void cancel() throws SQLException { preparedStatement.cancel(); } public void clearBatch() throws SQLException { preparedStatement.clearBatch(); } public void clearWarnings() throws SQLException { preparedStatement.clearWarnings(); } public void close() throws SQLException { preparedStatement.close(); } public boolean execute(String sql) throws SQLException { //记录sql SqlRecord.setCurrentSQL(sql); return preparedStatement.execute(sql); } public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { //记录sql SqlRecord.setCurrentSQL(sql); return preparedStatement.execute(sql, autoGeneratedKeys); } public boolean execute(String sql, int[] columnIndexes) throws SQLException { //记录sql SqlRecord.setCurrentSQL(sql); return preparedStatement.execute(sql, columnIndexes); } public boolean execute(String sql, String[] columnNames) throws SQLException { //记录sql SqlRecord.setCurrentSQL(sql); return preparedStatement.execute(sql, columnNames); } public int[] executeBatch() throws SQLException { return preparedStatement.executeBatch(); } public ResultSet executeQuery(String sql) throws SQLException { //记录sql SqlRecord.setCurrentSQL(sql); return preparedStatement.executeQuery(); } public int executeUpdate(String sql) throws SQLException { //记录sql SqlRecord.setCurrentSQL(sql); return preparedStatement.executeUpdate(sql); } public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { //记录sql SqlRecord.setCurrentSQL(sql); return preparedStatement.executeUpdate(sql, autoGeneratedKeys); } public int executeUpdate(String sql, int[] columnIndexes) throws SQLException { //记录sql SqlRecord.setCurrentSQL(sql); return preparedStatement.executeUpdate(sql, columnIndexes); } public int executeUpdate(String sql, String[] columnNames) throws SQLException { //记录sql SqlRecord.setCurrentSQL(sql); return preparedStatement.executeUpdate(sql, columnNames); } public Connection getConnection() throws SQLException { return new YCConnection(preparedStatement.getConnection()); } public int getFetchDirection() throws SQLException { return preparedStatement.getFetchDirection(); } public int getFetchSize() throws SQLException { return preparedStatement.getFetchSize(); } public ResultSet getGeneratedKeys() throws SQLException { return preparedStatement.getGeneratedKeys(); } public int getMaxFieldSize() throws SQLException { return preparedStatement.getMaxFieldSize(); } public int getMaxRows() throws SQLException { return preparedStatement.getMaxRows(); } public boolean getMoreResults() throws SQLException { return preparedStatement.getMoreResults(); } public boolean getMoreResults(int current) throws SQLException { return preparedStatement.getMoreResults(current); } public int getQueryTimeout() throws SQLException { return preparedStatement.getQueryTimeout(); } public ResultSet getResultSet() throws SQLException { return preparedStatement.getResultSet(); } public int getResultSetConcurrency() throws SQLException { return preparedStatement.getResultSetConcurrency(); } public int getResultSetHoldability() throws SQLException { return preparedStatement.getResultSetHoldability(); } public int getResultSetType() throws SQLException { return preparedStatement.getResultSetType(); } public int getUpdateCount() throws SQLException { return preparedStatement.getUpdateCount(); } public SQLWarning getWarnings() throws SQLException { return preparedStatement.getWarnings(); } public boolean isClosed() throws SQLException { return preparedStatement.isClosed(); } public boolean isPoolable() throws SQLException { return preparedStatement.isPoolable(); } public void setCursorName(String name) throws SQLException { preparedStatement.setCursorName(name); } public void setEscapeProcessing(boolean enable) throws SQLException { preparedStatement.setEscapeProcessing(enable); } public void setFetchDirection(int direction) throws SQLException { preparedStatement.setFetchDirection(direction); } public void setFetchSize(int rows) throws SQLException { preparedStatement.setFetchSize(rows); } public void setMaxFieldSize(int max) throws SQLException { preparedStatement.setMaxFieldSize(max); } public void setMaxRows(int max) throws SQLException { preparedStatement.setMaxRows(max); } public void setPoolable(boolean poolable) throws SQLException { preparedStatement.setPoolable(poolable); } public void setQueryTimeout(int seconds) throws SQLException { preparedStatement.setQueryTimeout(seconds); } public boolean isWrapperFor(Class iface) throws SQLException { return preparedStatement.isWrapperFor(iface); } public T unwrap(Class iface) throws SQLException { return preparedStatement.unwrap(iface); } public void closeOnCompletion() throws SQLException { // TODO Auto-generated method stub } public boolean isCloseOnCompletion() throws SQLException { // TODO Auto-generated method stub return false; } }