亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? jdbc4connectionwrapper.java

?? 用于JAVA數(shù)據(jù)庫連接.解壓就可用,方便得很
?? JAVA
字號:
/*
 Copyright (C) 2002-2007 MySQL AB

 This program is free software; you can redistribute it and/or modify
 it under the terms of version 2 of the GNU General Public License as 
 published by the Free Software Foundation.

 There are special exceptions to the terms and conditions of the GPL 
 as it is applied to this software. View the full text of the 
 exception in file EXCEPTIONS-CONNECTOR-J in the directory of this 
 software distribution.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA



 */
package com.mysql.jdbc.jdbc2.optional;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.sql.Array;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.NClob;
import java.sql.SQLClientInfoException;
import java.sql.SQLException;
import java.sql.SQLXML;
import java.sql.Savepoint;
import java.sql.Statement;
import java.sql.Struct;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import com.mysql.jdbc.ConnectionImpl;
import com.mysql.jdbc.SQLError;

/**
 */
public class JDBC4ConnectionWrapper extends ConnectionWrapper {

	/**
	 * Construct a new LogicalHandle and set instance variables
	 * 
	 * @param mysqlPooledConnection
	 *            reference to object that instantiated this object
	 * @param mysqlConnection
	 *            physical connection to db
	 * 
	 * @throws SQLException
	 *             if an error occurs.
	 */
	public JDBC4ConnectionWrapper(MysqlPooledConnection mysqlPooledConnection,
			ConnectionImpl mysqlConnection, boolean forXa)
			throws SQLException {
		super(mysqlPooledConnection, mysqlConnection, forXa);
	}

	public void close() throws SQLException {
		try {
			super.close();
		} finally {
			this.unwrappedInterfaces = null;
		}
	}
	
	public SQLXML createSQLXML() throws SQLException {
		checkClosed();

		try {
			return ((java.sql.Connection) this.mc).createSQLXML();
		} catch (SQLException sqlException) {
			checkAndFireConnectionError(sqlException);
		}

		return null; // never reached, but compiler can't tell
	}

	public java.sql.Array createArrayOf(String typeName, Object[] elements)
			throws SQLException {
		checkClosed();

		try {
			return ((java.sql.Connection) this.mc).createArrayOf(typeName,
					elements);
		} catch (SQLException sqlException) {
			checkAndFireConnectionError(sqlException);
		}

		return null; // never reached, but compiler can't tell
	}

	public Struct createStruct(String typeName, Object[] attributes)
			throws SQLException {
		checkClosed();

		try {
			return ((java.sql.Connection) this.mc).createStruct(typeName,
					attributes);
		} catch (SQLException sqlException) {
			checkAndFireConnectionError(sqlException);
		}

		return null; // never reached, but compiler can't tell
	}

	public Properties getClientInfo() throws SQLException {
		checkClosed();

		try {
			return ((java.sql.Connection) this.mc).getClientInfo();
		} catch (SQLException sqlException) {
			checkAndFireConnectionError(sqlException);
		}

		return null; // never reached, but compiler can't tell
	}

	public String getClientInfo(String name) throws SQLException {
		checkClosed();

		try {
			return ((java.sql.Connection) this.mc).getClientInfo(name);
		} catch (SQLException sqlException) {
			checkAndFireConnectionError(sqlException);
		}

		return null; // never reached, but compiler can't tell
	}

	/**
	 * Returns true if the connection has not been closed and is still valid.
	 * The driver shall submit a query on the connection or use some other
	 * mechanism that positively verifies the connection is still valid when
	 * this method is called.
	 * <p>
	 * The query submitted by the driver to validate the connection shall be
	 * executed in the context of the current transaction.
	 * 
	 * @param timeout -
	 *            The time in seconds to wait for the database operation used to
	 *            validate the connection to complete. If the timeout period
	 *            expires before the operation completes, this method returns
	 *            false. A value of 0 indicates a timeout is not applied to the
	 *            database operation.
	 *            <p>
	 * @return true if the connection is valid, false otherwise
	 * @exception SQLException
	 *                if the value supplied for <code>timeout</code> is less
	 *                then 0
	 * @since 1.6
	 */
	public synchronized boolean isValid(int timeout) throws SQLException {
		try {
			return ((java.sql.Connection) this.mc).isValid(timeout);
		} catch (SQLException sqlException) {
			checkAndFireConnectionError(sqlException);
		}

		return false; // never reached, but compiler can't tell
	}

	public void setClientInfo(Properties properties)
			throws SQLClientInfoException {
		try {
			checkClosed();

			((java.sql.Connection) this.mc).setClientInfo(properties);
		} catch (SQLException sqlException) {
			try {
				checkAndFireConnectionError(sqlException);
			} catch (SQLException sqlEx2) {
				SQLClientInfoException clientEx = new SQLClientInfoException();
				clientEx.initCause(sqlEx2);

				throw clientEx;
			}
		}
	}

	public void setClientInfo(String name, String value)
			throws SQLClientInfoException {
		try {
			checkClosed();

			((java.sql.Connection) this.mc).setClientInfo(name, value);
		} catch (SQLException sqlException) {
			try {
				checkAndFireConnectionError(sqlException);
			} catch (SQLException sqlEx2) {
				SQLClientInfoException clientEx = new SQLClientInfoException();
				clientEx.initCause(sqlEx2);

				throw clientEx;
			}
		}
	}

	/**
	 * Returns true if this either implements the interface argument or is
	 * directly or indirectly a wrapper for an object that does. Returns false
	 * otherwise. If this implements the interface then return true, else if
	 * this is a wrapper then return the result of recursively calling
	 * <code>isWrapperFor</code> on the wrapped object. If this does not
	 * implement the interface and is not a wrapper, return false. This method
	 * should be implemented as a low-cost operation compared to
	 * <code>unwrap</code> so that callers can use this method to avoid
	 * expensive <code>unwrap</code> calls that may fail. If this method
	 * returns true then calling <code>unwrap</code> with the same argument
	 * should succeed.
	 * 
	 * @param interfaces
	 *            a Class defining an interface.
	 * @return true if this implements the interface or directly or indirectly
	 *         wraps an object that does.
	 * @throws java.sql.SQLException
	 *             if an error occurs while determining whether this is a
	 *             wrapper for an object with the given interface.
	 * @since 1.6
	 */
	public boolean isWrapperFor(Class<?> iface) throws SQLException {
		checkClosed();

		boolean isInstance = iface.isInstance(this);

		if (isInstance) {
			return true;
		}

		return (iface.getName().equals("com.mysql.jdbc.Connection") || 
				iface.getName().equals("com.mysql.jdbc.ConnectionProperties"));
	}

	/**
	 * Returns an object that implements the given interface to allow access to
	 * non-standard methods, or standard methods not exposed by the proxy. The
	 * result may be either the object found to implement the interface or a
	 * proxy for that object. If the receiver implements the interface then that
	 * is the object. If the receiver is a wrapper and the wrapped object
	 * implements the interface then that is the object. Otherwise the object is
	 * the result of calling <code>unwrap</code> recursively on the wrapped
	 * object. If the receiver is not a wrapper and does not implement the
	 * interface, then an <code>SQLException</code> is thrown.
	 * 
	 * @param iface
	 *            A Class defining an interface that the result must implement.
	 * @return an object that implements the interface. May be a proxy for the
	 *         actual implementing object.
	 * @throws java.sql.SQLException
	 *             If no object found that implements the interface
	 * @since 1.6
	 */
	public synchronized <T> T unwrap(java.lang.Class<T> iface)
			throws java.sql.SQLException {
		try {
			if ("java.sql.Connection".equals(iface.getName())
					|| "java.sql.Wrapper.class".equals(iface.getName())) {
				return iface.cast(this);
			}
			
			if (unwrappedInterfaces == null) {
				unwrappedInterfaces = new HashMap();
			}
			
			Object cachedUnwrapped = unwrappedInterfaces.get(iface);
			
			if (cachedUnwrapped == null) {
				cachedUnwrapped = Proxy.newProxyInstance(this.mc.getClass()
						.getClassLoader(), new Class[] { iface },
						new ConnectionErrorFiringInvocationHandler(this.mc));
				unwrappedInterfaces.put(iface, cachedUnwrapped);
			}
			
			return iface.cast(cachedUnwrapped);
		} catch (ClassCastException cce) {
			throw SQLError.createSQLException("Unable to unwrap to "
					+ iface.toString(), SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
		}
	}
	
	/**
	 * @see java.sql.Connection#createBlob()
	 */
	public Blob createBlob() throws SQLException {
		checkClosed();

		try {
			return ((java.sql.Connection) this.mc).createBlob();
		} catch (SQLException sqlException) {
			checkAndFireConnectionError(sqlException);
		}

		return null; // never reached, but compiler can't tell
	}

	/**
	 * @see java.sql.Connection#createClob()
	 */
	public Clob createClob() throws SQLException {
		checkClosed();

		try {
			return ((java.sql.Connection) this.mc).createClob();
		} catch (SQLException sqlException) {
			checkAndFireConnectionError(sqlException);
		}

		return null; // never reached, but compiler can't tell
	}

	/**
	 * @see java.sql.Connection#createNClob()
	 */
	public NClob createNClob() throws SQLException {
		checkClosed();

		try {
			return ((java.sql.Connection) this.mc).createNClob();
		} catch (SQLException sqlException) {
			checkAndFireConnectionError(sqlException);
		}

		return null; // never reached, but compiler can't tell
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
六月丁香综合在线视频| av爱爱亚洲一区| 日本精品免费观看高清观看| 国产欧美日本一区视频| 国产精品一二三| 国产精品看片你懂得| av成人老司机| 一区二区三区四区不卡在线| 色综合天天视频在线观看| 亚洲国产成人一区二区三区| 成人一区二区在线观看| 成人欧美一区二区三区| 色先锋aa成人| 蜜臀av一区二区在线观看 | 久草中文综合在线| 国产欧美日韩在线| 欧美亚洲尤物久久| 激情都市一区二区| 亚洲乱码中文字幕综合| 日韩精品一区二区三区中文精品| 国产一区高清在线| 亚洲免费成人av| 精品国产乱码久久久久久1区2区 | 丁香啪啪综合成人亚洲小说 | 色乱码一区二区三区88| 免费在线观看不卡| 亚洲另类春色校园小说| 精品国产免费一区二区三区四区 | 亚洲精品一二三| 国产亚洲一区二区三区四区| 欧美日韩在线观看一区二区| 韩国毛片一区二区三区| 亚洲成av人片在www色猫咪| 国产欧美日韩另类一区| 日韩一区二区三区四区五区六区| av在线不卡观看免费观看| 经典三级在线一区| 日韩和欧美的一区| 一区二区在线观看视频| 国产精品久久久久一区| 国产日韩欧美激情| 国产网站一区二区三区| 日韩三级精品电影久久久 | 久久精品亚洲一区二区三区浴池 | 日日夜夜免费精品视频| 亚洲成人先锋电影| 一区二区三区在线不卡| 综合av第一页| 亚洲精品乱码久久久久久久久 | 制服丝袜激情欧洲亚洲| 欧美日韩精品电影| 4438x成人网最大色成网站| 欧美福利一区二区| 欧美一级日韩不卡播放免费| 91精品国产一区二区三区| 亚洲免费视频中文字幕| 亚洲国产一区二区a毛片| 亚洲地区一二三色| 九色综合狠狠综合久久| 国产精品18久久久久久久久| 不卡视频在线看| 色嗨嗨av一区二区三区| 欧美一区二区视频观看视频 | 国产精品女主播av| 午夜成人免费视频| 国产呦萝稀缺另类资源| 色噜噜狠狠色综合欧洲selulu| 欧美精品乱人伦久久久久久| 亚洲精品在线观看网站| 亚洲黄色性网站| 老司机精品视频导航| 欧洲色大大久久| 欧美r级在线观看| 亚洲色图在线看| 色乱码一区二区三区88| 2024国产精品视频| 亚洲国产综合色| 91在线云播放| 久久精品人人做人人综合| 亚洲成av人片观看| 91美女视频网站| 中文av一区特黄| 国内精品伊人久久久久av影院| 欧美午夜片在线看| 亚洲在线成人精品| av午夜精品一区二区三区| 欧美成人精品福利| 亚洲bt欧美bt精品| 精品视频一区 二区 三区| 亚洲欧美日韩国产手机在线| 成人国产精品免费观看视频| 久久美女艺术照精彩视频福利播放| 一区二区三区在线观看国产 | 成人黄色电影在线| 国产精品视频观看| 国产激情视频一区二区在线观看| 欧美成人综合网站| 国产一区二区免费在线| 久久美女艺术照精彩视频福利播放| 麻豆国产一区二区| 日韩午夜电影av| 激情欧美一区二区三区在线观看| 久久人人爽人人爽| 成人手机电影网| 国产精品国产三级国产aⅴ原创| 91色九色蝌蚪| 日韩不卡在线观看日韩不卡视频| 日韩欧美亚洲国产另类| 国产成人午夜片在线观看高清观看| 国产亚洲1区2区3区| 91网站在线观看视频| 日本女人一区二区三区| 中文字幕中文在线不卡住| 欧美午夜精品理论片a级按摩| 日韩精品亚洲一区| 欧美激情综合在线| 欧美日韩一级二级| 国产福利91精品| 亚洲成在人线在线播放| 国产清纯白嫩初高生在线观看91 | 一色桃子久久精品亚洲| 欧美一区二区三区免费观看视频| 国产69精品久久777的优势| 亚洲午夜电影网| 最新中文字幕一区二区三区 | 亚洲乱码国产乱码精品精98午夜| 日韩欧美精品在线视频| 欧美视频在线一区| 成人免费视频caoporn| 久久www免费人成看片高清| 亚洲精品视频在线| 国产精品丝袜在线| 精品免费国产一区二区三区四区| 欧美在线999| 色综合激情五月| 91麻豆123| 色88888久久久久久影院野外 | 日本久久电影网| 91美女福利视频| 成人av在线播放网址| 国产99久久精品| aaa亚洲精品一二三区| 国产精品一区2区| 国产一本一道久久香蕉| 韩国视频一区二区| 欧美日韩一级二级| 日韩欧美第一区| 精品免费一区二区三区| 国产午夜亚洲精品不卡| 日本一区二区在线不卡| 综合久久综合久久| 亚洲.国产.中文慕字在线| 日韩国产欧美一区二区三区| 免费看日韩精品| 成人激情午夜影院| 一本大道av一区二区在线播放| 欧美亚洲国产一区在线观看网站| 欧美精品日韩精品| 久久久精品日韩欧美| 亚洲男人的天堂在线aⅴ视频| 亚洲大尺度视频在线观看| 精品一区二区影视| av综合在线播放| 91麻豆精品国产91久久久更新时间| 欧美一三区三区四区免费在线看 | 国产69精品一区二区亚洲孕妇| 国产精品一二三区| 91成人看片片| 欧美一区二区三区思思人| 精品国产sm最大网站免费看| 国产亚洲欧洲997久久综合| 国产精品入口麻豆九色| 亚洲综合丁香婷婷六月香| 奇米影视一区二区三区| 粉嫩av一区二区三区在线播放| 日本道免费精品一区二区三区| 欧美日本一区二区三区| 精品国产乱码久久久久久久久| 国产精品免费久久久久| 日韩高清欧美激情| a在线欧美一区| 精品久久久久久久久久久久久久久| 中文字幕一区二区在线播放| 午夜精品国产更新| 色婷婷av一区| 国产欧美日韩综合| 国产乱人伦精品一区二区在线观看| 色天使色偷偷av一区二区| 国产精品久久久久久久久动漫 | 亚洲午夜精品在线| www.成人在线| 中文字幕va一区二区三区| 午夜激情综合网| 欧美日韩三级在线| 亚洲精品国产a久久久久久| bt7086福利一区国产| 国产精品美女一区二区三区| 国产精品2024| 国产精品久久久久影院色老大| 国产xxx精品视频大全|