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

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

?? basebugreport.java

?? jsp數(shù)據(jù)庫系統(tǒng)
?? JAVA
字號:
/*
   Copyright (C) 2003 MySQL AB
   
      This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
      the Free Software Foundation; either version 2 of the License, or
      (at your option) any later version.
   
      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.util;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Properties;

import com.mysql.jdbc.Driver;

/**
 * Base class to help file bug reports for Connector/J.
 * 
 * <p>
 * MySQL AB <ul>really</ul> appreciates repeatable testcases
 * when reporting bugs, so we're giving you this class to make
 * that job a bit easier (and standarized).
 * 
 * <p>
 * To create a testcase, create a class that inherits from
 * this class (com.mysql.jdbc.util.BaseBugReport), and override
 * the methods 'setUp', 'tearDown' and 'runTest'. 
 * 
 * <p>
 * In the 'setUp' method, create code that creates your tables,
 * and populates them with any data needed to demonstrate the bug.
 * 
 * <p>
 * In the 'runTest' method, create code that demonstrates the bug 
 * using the tables and data you created in the 'setUp' method.
 * 
 * <p>
 * In the 'tearDown' method, drop any tables you created in the
 * 'setUp' method.
 * 
 * <p>
 * In any of the above three methods, you should use one
 * of the variants of the 'getConnection' method to create a 
 * JDBC connection to MySQL, which will use the default JDBC
 * URL of 'jdbc:mysql:///test'.  
 * 
 * <p>
 * If you need to use a JDBC URL that is different than 
 * 'jdbc:mysql:///test', then override the method 'getUrl' as well.
 * 
 * <p>
 * Use the 'assertTrue' methods to create conditions that must be
 * met in your testcase demonstrating the behavior you are expecting
 * (vs. the behavior you are observing, which is why you are most
 * likely filing a bug report).
 * 
 * <p>
 * Finally, create a 'main' method that creates a new instance
 * of your testcase, and calls the 'run' method:
 * 
 * <p><pre>
 * public static void main(String[] args) throws Exception {
 *      new MyBugReport().run();
 * }
 * </pre>
 * 
 * <p>
 * When filing a potential bug with MySQL Connector/J at 
 * http://bugs.mysql.com/ or on the bugs mailing list, please
 * include the code that you have just written using this class.
 * 
 * @author Mark Matthews
 * @version $Id: BaseBugReport.java,v 1.1.2.1 2003/09/17 18:01:22 mmatthew Exp $
 */
public abstract class BaseBugReport {
	
	private Connection conn;
	private Driver driver;
	
	/**
	 * Constructor for this BugReport, sets up
	 * JDBC driver used to create connections.
	 */
	protected BaseBugReport() {
		try {
			this.driver = new Driver();
		} catch (SQLException ex) {
			throw new RuntimeException(ex.toString());
		}
	}
	
	/**
	 * Override this method with code that sets up the 
	 * testcase for demonstrating your bug (creating tables,
	 * populating data, etc).
	 * 
	 * @throws Exception if an error occurs during the
	 * 'setUp' phase.
	 */
	public abstract void setUp() throws Exception;
	
	/**
	 * Override this method with code that cleans up 
	 * anything created in the setUp() method.
	 * 
	 * @throws Exception if an error occurs during the
	 * 'tearDown' phase.
	 */
	public abstract void tearDown() throws Exception;
	
	/**
	 * Override this method with code that demonstrates the bug. 
	 * This method will be called after setUp(), and before 
	 * tearDown().
	 * 
	 * @throws Exception if an error occurs during your test
	 * run.
	 */
	public abstract void runTest() throws Exception;
	
	/**
	 * Runs the testcase by calling the setUp(), runTest()
	 * and tearDown() methods. The tearDown() method is run
	 * regardless of any errors occuring in the other methods.
	 * 
	 * @throws Exception if an error occurs in any of the
	 * aforementioned methods.
	 */
	public final void run() throws Exception {
		try {
			setUp();
			runTest();
			
		} finally {
			tearDown();
		}
	}
	
	/**
	 * Throws an exception with the given message if condition
	 * evalutates to 'false'.
	 * 
	 * @param message the message to use in the exception
	 * @param condition the condition to test for
	 * @throws Exception if !condition
	 */
	protected final void assertTrue(String message, boolean condition) throws Exception {
		if (!condition) {
			throw new Exception("Assertion failed: " + message);
		}
	}
	
	/**
	 * Throws an exception if condition
	 * evalutates to 'false'.
     *
	 * @param condition the condition to test for
	 * @throws Exception if !condition
	 */
	protected final void assertTrue(boolean condition) throws Exception {
		assertTrue("(no message given)", condition);
	}
	
	/**
	 * Provides the JDBC URL to use to demonstrate the bug. The
	 * java.sql.Connection that you use to demonstrate this bug 
	 * will be provided by the getConnection() method using this URL.
	 * 
	 * The default value is 'jdbc:mysql:///test'
	 */
	public String getUrl() {
		return "jdbc:mysql:///test";
	}

	/**
	 * Provides a connection to the JDBC URL specified in getUrl().
	 * 
	 * If a connection already exists, that connection is returned.
	 * Otherwise a new connection is created.
	 * 
	 * @return a connection to the JDBC URL specified in getUrl().
	 * 
	 * @throws SQLException if an error is caused while creating the
	 * connection.
	 */
	public final synchronized Connection getConnection() throws SQLException {
		if (this.conn == null || this.conn.isClosed()) {
			this.conn = getNewConnection();
		}
		
		return this.conn;
	}
	
	/**
	 * Use this if you need to get a new connection for your 
	 * bug report (i.e. there's more than one connection involved).
	 * 
	 * @return a new connection to the JDBC URL specified in getUrl().
	 * 
	 * @throws SQLException if an error is caused while creating the
	 * connection.
	 */
	public final synchronized Connection getNewConnection() throws SQLException {
		return getConnection(getUrl());
	}

	/**
	 * Returns  a connection using the given URL.
	 * 
	 * @param url the JDBC URL to use
	 * @return a new java.sql.Connection to the JDBC URL.
	 * @throws SQLException if an error occurs getting the connection.
	 */
	public final synchronized Connection getConnection(String url) throws SQLException {
		return getConnection(url, null);
	}
	
	/**
	 * Returns  a connection using the given URL and properties.
	 * 
	 * @param url the JDBC URL to use
	 * @param props the JDBC properties to use
	 * @return a new java.sql.Connection to the JDBC URL.
	 * @throws SQLException if an error occurs getting the connection.
	 */
	public final synchronized Connection getConnection(String url, Properties props) throws SQLException {
		
		// Don't follow this example in your own code
		// This is to bypass the java.sql.DriverManager
		
		return this.driver.connect(url, props);
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲日本乱码在线观看| 国产精品美女久久久久aⅴ国产馆| 污片在线观看一区二区| 91国偷自产一区二区三区观看| 日韩国产在线一| av高清不卡在线| 美脚の诱脚舐め脚责91| 久久综合综合久久综合| 久久国产福利国产秒拍| 国产一区在线精品| 成人晚上爱看视频| 99久久国产综合精品女不卡| caoporn国产精品| 91浏览器在线视频| 欧美亚洲免费在线一区| 91麻豆精品国产自产在线观看一区 | 精品国产一区二区三区久久影院| 日韩欧美一区在线观看| 精品国产乱码久久久久久1区2区| 精品福利一二区| 久久精品欧美日韩精品| 亚洲人成网站影音先锋播放| 一区二区三区在线视频免费观看| 亚洲成人福利片| 老司机免费视频一区二区三区| 国产一区二区三区日韩 | 欧美色男人天堂| 91精品国产美女浴室洗澡无遮挡| 日韩免费性生活视频播放| 久久尤物电影视频在线观看| 国产精品福利av| 亚洲高清久久久| 激情文学综合插| 97se亚洲国产综合在线| 欧美日韩精品一区视频| wwww国产精品欧美| 1000精品久久久久久久久| 亚洲高清在线精品| 国产综合久久久久久久久久久久| av资源站一区| 欧美日韩成人一区二区| 亚洲精品一区二区三区影院| 自拍偷自拍亚洲精品播放| 亚洲成人免费视| 国产精品一区二区在线观看网站| 99精品视频在线免费观看| 7777精品伊人久久久大香线蕉超级流畅 | 久久亚洲春色中文字幕久久久| 亚洲色图一区二区| 奇米影视一区二区三区| 成人av资源在线| 欧美肥胖老妇做爰| 中文字幕av资源一区| 午夜精品久久久久| 成人午夜又粗又硬又大| 91麻豆精品91久久久久久清纯| 国产清纯美女被跳蛋高潮一区二区久久w | 国产凹凸在线观看一区二区| 欧美日韩精品一区二区三区四区| 国产欧美精品日韩区二区麻豆天美| 亚洲国产综合色| 国产1区2区3区精品美女| 欧美日本一道本在线视频| 国产精品精品国产色婷婷| 久久av资源站| 欧美视频在线一区| 国产精品欧美精品| 六月丁香婷婷久久| 在线观看日韩高清av| 久久尤物电影视频在线观看| 亚洲6080在线| 色综合视频一区二区三区高清| 日韩美女视频在线| 亚洲gay无套男同| 91蜜桃在线免费视频| 久久久99精品免费观看不卡| 天天影视涩香欲综合网| 色天天综合久久久久综合片| 国产精品三级在线观看| 精品一区二区三区免费视频| 欧美精品 国产精品| 亚洲一区二区欧美日韩 | 亚洲欧洲日产国产综合网| 韩国精品一区二区| 91麻豆精品国产无毒不卡在线观看| 一区二区三区影院| 91小视频在线免费看| 亚洲国产精品激情在线观看| 国产一区美女在线| 精品理论电影在线| 卡一卡二国产精品| 日韩午夜av一区| 日本不卡123| 欧美一级日韩一级| 免费观看30秒视频久久| 51精品国自产在线| 亚洲成人免费av| 日韩欧美电影一区| 秋霞电影一区二区| 欧美精品九九99久久| 亚洲一区二区精品视频| 色琪琪一区二区三区亚洲区| 亚洲人被黑人高潮完整版| 色综合色综合色综合色综合色综合| 一区在线播放视频| 99热这里都是精品| 亚洲天堂久久久久久久| 色综合久久88色综合天天6| 亚洲蜜桃精久久久久久久| 91久久奴性调教| 亚洲成人免费观看| 欧美一级免费大片| 狠狠v欧美v日韩v亚洲ⅴ| 久久久无码精品亚洲日韩按摩| 国产大片一区二区| 中文字幕一区二区三区视频| 色综合中文字幕国产 | 日韩欧美一级精品久久| 久久国产生活片100| 精品国产乱码久久久久久闺蜜| 国产乱码精品一区二区三| 日本一区二区三区久久久久久久久不| 国产精品羞羞答答xxdd| 亚洲欧洲性图库| 欧美剧情电影在线观看完整版免费励志电影 | 色综合天天综合给合国产| 亚洲免费观看高清| 精品视频资源站| 毛片一区二区三区| 国产亚洲欧美激情| 99国产精品久久| 天天综合网天天综合色| 久久亚洲精精品中文字幕早川悠里| 成人午夜免费视频| 亚洲中国最大av网站| 欧美一级电影网站| 高清不卡一二三区| 一区二区日韩电影| 日韩免费在线观看| 99免费精品视频| 丝袜亚洲另类欧美综合| 精品1区2区在线观看| 99久久国产综合精品色伊| 婷婷开心久久网| 久久精品亚洲精品国产欧美kt∨| 91麻豆6部合集magnet| 蜜桃久久久久久| 自拍av一区二区三区| 日韩欧美国产电影| 色婷婷精品大视频在线蜜桃视频| 免费美女久久99| 亚洲精品ww久久久久久p站| 日韩美女在线视频| 色美美综合视频| 国产一区二区三区四区五区入口 | 中文字幕在线观看不卡| 欧美日本韩国一区二区三区视频| 国产成人啪免费观看软件| 亚洲成人午夜影院| 国产精品久久久久久一区二区三区| 6080国产精品一区二区| 成人国产精品免费网站| 秋霞影院一区二区| 一区二区三区日韩欧美精品| 久久香蕉国产线看观看99| 欧美人伦禁忌dvd放荡欲情| 99国产欧美久久久精品| 久国产精品韩国三级视频| 亚洲一区二区视频| 国产欧美日韩综合| 中文av一区特黄| 精品久久久久久久人人人人传媒| 欧美视频一区二区| 91丨九色porny丨蝌蚪| 国产一区二区在线免费观看| 视频在线观看国产精品| 一区二区久久久久久| 中文字幕不卡一区| 久久亚洲捆绑美女| 日韩一区二区在线播放| 欧美三级中文字幕| 91视频免费看| 成人性生交大片免费看视频在线| 激情文学综合插| 久久精品国产77777蜜臀| 亚洲mv大片欧洲mv大片精品| 亚洲自拍另类综合| 亚洲色图都市小说| 国产精品久久久久久久久搜平片| 久久青草国产手机看片福利盒子| 欧美精品在线一区二区| 欧美性感一区二区三区| 91香蕉国产在线观看软件| 成人高清视频在线观看| 国产成人av一区二区三区在线观看| 久久超级碰视频| 蜜臀99久久精品久久久久久软件| 午夜私人影院久久久久| 亚洲国产日韩在线一区模特| 亚洲永久精品大片|