class StatementHandle implements Statement {

	public int[] executeBatch()
	throws SQLException {
		int[] result = null;
		checkClosed();
		try{
			if (this.logStatementsEnabled && logger.isDebugEnabled()){
				logger.debug(PoolUtil.fillLogParams(this.batchSQL.toString(), this.logParams));
			}
			long queryStartTime = queryTimerStart();
			String query = "";
			if (this.connectionHook != null){
        query = this.batchSQL.toString();
				this.connectionHook.onBeforeStatementExecute(this.connectionHandle, this, query, this.logParams);
			}
			result = this.internalStatement.executeBatch();

			if (this.connectionHook != null){
				this.connectionHook.onAfterStatementExecute(this.connectionHandle, this, query, this.logParams);
			}

			queryTimerEnd(this.logStatementsEnabled ? this.batchSQL.toString() : "", queryStartTime);


			if (this.logStatementsEnabled){
					this.logParams.clear();
					this.batchSQL = new StringBuilder();
			}
						
		} catch (SQLException e) {
			throw this.connectionHandle.markPossiblyBroken(e);

		}
		return result; // never reached

	}

	public  StatementHandle(Statement internalStatement, String sql, IStatementCache cache, 
						   ConnectionHandle connectionHandle, String cacheKey, 
						   boolean logStatementsEnabled);
	public  StatementHandle(Statement internalStatement, ConnectionHandle connectionHandle, boolean logStatementsEnabled);

}