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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jdbcproxygenerator.java

?? c3p0數據庫連接池實現源碼
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* * Distributed as part of c3p0 v.0.9.1-pre6 * * Copyright (C) 2005 Machinery For Change, Inc. * * Author: Steve Waldman <swaldman@mchange.com> * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 2.1, as  * published by the Free Software Foundation. * * This software 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software; see the file LICENSE.  If not, write to the * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */package com.mchange.v2.c3p0.codegen;import java.io.*;import java.lang.reflect.*;import java.sql.*;import com.mchange.v2.codegen.*;import com.mchange.v2.codegen.intfc.*;import com.mchange.v2.c3p0.C3P0ProxyConnection;import com.mchange.v2.c3p0.C3P0ProxyStatement;public abstract class JdbcProxyGenerator extends DelegatorGenerator{    final static boolean PREMATURE_DETACH_DEBUG = false;    JdbcProxyGenerator()    {	this.setGenerateInnerSetter( false );	this.setGenerateInnerGetter( false );	this.setGenerateNoArgConstructor( false );	this.setGenerateWrappingConstructor( true );	this.setClassModifiers( Modifier.PUBLIC | Modifier.FINAL );	this.setMethodModifiers( Modifier.PUBLIC | Modifier.FINAL );    }    abstract String getInnerTypeName();    static final class NewProxyMetaDataGenerator extends JdbcProxyGenerator    { 	String getInnerTypeName()	{ return "DatabaseMetaData"; }	protected void generateDelegateCode( Class intfcl, String genclass, Method method, IndentedWriter iw ) throws IOException 	{	    String mname   = method.getName();	    Class  retType = method.getReturnType();	    	    if ( ResultSet.class.isAssignableFrom( retType ) )		{		    iw.println("ResultSet innerResultSet = inner." + CodegenUtils.methodCall( method ) + ";");		    iw.println("if (innerResultSet == null) return null;");		    iw.println("return new NewProxyResultSet( innerResultSet, parentPooledConnection, inner, this );"); 		} 	    else if ( mname.equals( "getConnection" ) ) 		{		    iw.println("return this.proxyCon;"); 		}	    else		super.generateDelegateCode( intfcl, genclass, method, iw );	}	protected void generatePreDelegateCode( Class intfcl, String genclass, Method method, IndentedWriter iw ) throws IOException 	{	    if ( method.getExceptionTypes().length > 0 )		super.generatePreDelegateCode( intfcl, genclass, method, iw );	}		protected void generatePostDelegateCode( Class intfcl, String genclass, Method method, IndentedWriter iw ) throws IOException 	{	    if ( method.getExceptionTypes().length > 0 )		super.generatePostDelegateCode( intfcl, genclass, method, iw );	}	protected void generateExtraDeclarations( Class intfcl, String genclass, IndentedWriter iw ) throws IOException	{	    super.generateExtraDeclarations( intfcl, genclass, iw );	    iw.println();	    iw.println("NewProxyConnection proxyCon;");	    iw.println();	    iw.print( CodegenUtils.fqcnLastElement( genclass ) );	    iw.println("( " + CodegenUtils.simpleClassName( intfcl ) + " inner, NewPooledConnection parentPooledConnection, NewProxyConnection proxyCon )");	    iw.println("{");	    iw.upIndent();	    iw.println("this( inner, parentPooledConnection );");	    iw.println("this.proxyCon = proxyCon;");	    iw.downIndent();	    iw.println("}");	}    }    static final class NewProxyResultSetGenerator extends JdbcProxyGenerator    {	String getInnerTypeName()	{ return "ResultSet"; }	protected void generateDelegateCode( Class intfcl, String genclass, Method method, IndentedWriter iw ) throws IOException 	{	    iw.println("if (proxyConn != null) proxyConn.maybeDirtyTransaction();");	    iw.println();	    String mname   = method.getName();	    Class  retType = method.getReturnType();	    if ( mname.equals("close") )		{		    iw.println("if (! this.isDetached())");		    iw.println("{");		    iw.upIndent();		    iw.println("if (creator instanceof Statement)");		    iw.upIndent(); 		    iw.println("parentPooledConnection.markInactiveResultSetForStatement( (Statement) creator, inner );");		    iw.downIndent();		    iw.println("else if (creator instanceof DatabaseMetaData)");		    iw.upIndent(); 		    iw.println("parentPooledConnection.markInactiveMetaDataResultSet( inner );");		    iw.downIndent();		    iw.println("else if (creator instanceof Connection)");		    iw.upIndent(); 		    iw.println("parentPooledConnection.markInactiveRawConnectionResultSet( inner );");		    iw.downIndent();		    iw.println("else throw new InternalError(\042Must be Statement or DatabaseMetaData -- Bad Creator: \042 + creator);"); 		    iw.println("this.detach();");		    iw.println("inner.close();");		    iw.println("this.inner = null;");		    iw.downIndent();		    iw.println("}");		}	    else if ( mname.equals("getStatement") )		{		    iw.println("if (creator instanceof Statement)");		    iw.upIndent(); 		    iw.println("return (Statement) creatorProxy;");		    iw.downIndent();		    iw.println("else if (creator instanceof DatabaseMetaData)");		    iw.upIndent(); 		    iw.println("return null;");		    iw.downIndent();		    iw.println("else throw new InternalError(\042Must be Statement or DatabaseMetaData -- Bad Creator: \042 + creator);");		}	    else if ( mname.equals("isClosed") )		{		    iw.println( "return this.isDetached();" );		}	    else		super.generateDelegateCode( intfcl, genclass, method, iw );	}	protected void generateExtraDeclarations( Class intfcl, String genclass, IndentedWriter iw ) throws IOException	{	    super.generateExtraDeclarations( intfcl, genclass, iw );	    iw.println();	    iw.println("Object creator;");	    iw.println("Object creatorProxy;");	    iw.println("NewProxyConnection proxyConn;");	    iw.println();	    iw.print( CodegenUtils.fqcnLastElement( genclass ) );	    iw.println("( " + CodegenUtils.simpleClassName( intfcl ) + " inner, NewPooledConnection parentPooledConnection, Object c, Object cProxy )");	    iw.println("{");	    iw.upIndent();	    iw.println("this( inner, parentPooledConnection );");	    iw.println("this.creator      = c;");	    iw.println("this.creatorProxy = cProxy;");	    iw.println("if (creatorProxy instanceof NewProxyConnection) this.proxyConn = (NewProxyConnection) cProxy;");	    iw.downIndent();	    iw.println("}");	}	protected void generatePreDelegateCode( Class intfcl, String genclass, Method method, IndentedWriter iw ) throws IOException 	{	    super.generatePreDelegateCode( intfcl, genclass, method, iw );	}    }    static final class NewProxyAnyStatementGenerator extends JdbcProxyGenerator    {	String getInnerTypeName()	{ return "Statement"; }	private final static boolean CONCURRENT_ACCESS_DEBUG = false;	{	    this.setExtraInterfaces( new Class[] { C3P0ProxyStatement.class } );	}	protected void generateDelegateCode( Class intfcl, String genclass, Method method, IndentedWriter iw ) throws IOException 	{	    iw.println("maybeDirtyTransaction();");	    iw.println();	    String mname   = method.getName();	    Class  retType = method.getReturnType();	    if ( ResultSet.class.isAssignableFrom( retType ) )		{		    iw.println("ResultSet innerResultSet = inner." + CodegenUtils.methodCall( method ) + ";");		    iw.println("if (innerResultSet == null) return null;");		    iw.println("parentPooledConnection.markActiveResultSetForStatement( inner, innerResultSet );");		    iw.println("return new NewProxyResultSet( innerResultSet, parentPooledConnection, inner, this );"); 		}	    else if ( mname.equals("getConnection") )		{ 		    iw.println("if (! this.isDetached())"); 		    iw.upIndent();		    iw.println("return creatorProxy;"); 		    iw.downIndent(); 		    iw.println("else"); 		    iw.upIndent(); 		    iw.println("throw new SQLException(\"You cannot operate on a closed Statement!\");"); 		    iw.downIndent();		}	    else if ( mname.equals("close") )		{		    iw.println("if (! this.isDetached())");		    iw.println("{");		    iw.upIndent();		    		    iw.println("if ( is_cached )");		    iw.upIndent();		    iw.println("parentPooledConnection.checkinStatement( inner );");		    iw.downIndent();		    iw.println("else");		    iw.println("{");		    iw.upIndent();		    iw.println("parentPooledConnection.markInactiveUncachedStatement( inner );");		    iw.println("try{ inner.close(); }");		    iw.println("catch (Exception e )");		    iw.println("{");		    iw.upIndent();		    iw.println("if (logger.isLoggable( MLevel.WARNING ))");		    iw.upIndent();		    iw.println("logger.log( MLevel.WARNING, \042Exception on close of inner statement.\042, e);");		    iw.downIndent();		    iw.println( "SQLException sqle = SqlUtils.toSQLException( e );" );		    iw.println( "throw sqle;" );		    iw.downIndent();		    iw.println("}");		    iw.downIndent();		    iw.println("}");		    iw.println();		    iw.println("this.detach();");		    iw.println("this.inner = null;");		    iw.println("this.creatorProxy = null;");		    iw.downIndent();		    iw.println("}");		}	    else if ( mname.equals("isClosed") )		{		    iw.println( "return this.isDetached();" );		}	    else		super.generateDelegateCode( intfcl, genclass, method, iw );	}	protected void generatePreDelegateCode( Class intfcl, String genclass, Method method, IndentedWriter iw ) throws IOException 	{	    // concurrent-access-debug only	    if (CONCURRENT_ACCESS_DEBUG)		{		    iw.println("Object record;");		    iw.println("synchronized (concurrentAccessRecorder)");		    iw.println("{");		    iw.upIndent();		    iw.println("record = concurrentAccessRecorder.record();");		    iw.println("int num_concurrent_clients = concurrentAccessRecorder.size();");		    iw.println("if (num_concurrent_clients != 1)");		    iw.upIndent();		    iw.println("logger.log(MLevel.WARNING, " +			       "concurrentAccessRecorder.getDump(\042Apparent concurrent access! (\042 + num_concurrent_clients + \042 clients.\042) );");		    iw.downIndent();		    iw.downIndent();		    iw.println("}");		    iw.println();		}	    // end concurrent-access-debug only	    super.generatePreDelegateCode( intfcl, genclass, method, iw );	}    	protected void generatePostDelegateCode( Class intfcl, String genclass, Method method, IndentedWriter iw ) throws IOException 	{	    super.generatePostDelegateCode( intfcl, genclass, method, iw );	    // concurrent-access-debug only	    if (CONCURRENT_ACCESS_DEBUG)		{		    iw.println("finally");		    iw.println("{");		    iw.upIndent();		    iw.println("concurrentAccessRecorder.remove( record );");		    iw.downIndent();		    iw.println("}");		}	    // end concurrent-access-debug only	}	protected void generateExtraDeclarations( Class intfcl, String genclass, IndentedWriter iw ) throws IOException	{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲成年网址在线观看| 欧美美女喷水视频| 成人高清免费观看| 国产精品毛片a∨一区二区三区| 久久久激情视频| 99这里都是精品| 成人性色生活片| 国产自产高清不卡| 国产成人精品综合在线观看| 国产乱码字幕精品高清av | 国产在线麻豆精品观看| 美女看a上一区| 久久av中文字幕片| 久久99热这里只有精品| 亚洲成人tv网| 欧美精品三级在线观看| 欧美精品777| 欧美不卡一区二区三区| 久久精品视频在线看| 5月丁香婷婷综合| 欧美成人伊人久久综合网| 国产欧美日韩三区| 一区二区三区四区av| 亚洲一区在线观看免费| 久久电影网电视剧免费观看| 国产在线观看免费一区| 在线精品视频免费播放| 欧美一级午夜免费电影| 中文在线一区二区 | 99国产欧美久久久精品| 欧美色区777第一页| 久久久国产综合精品女国产盗摄| 中文字幕av一区二区三区| 午夜精品久久久久久久99樱桃| 日韩1区2区日韩1区2区| youjizz久久| 欧美日韩久久一区二区| 欧美精品一区二区三区四区 | 成人免费视频caoporn| 91视频在线观看| 欧美高清精品3d| 日韩视频中午一区| 亚洲欧洲美洲综合色网| 亚洲chinese男男1069| 国产麻豆一精品一av一免费| 99久久婷婷国产| 日韩欧美www| 一个色综合av| 成人网男人的天堂| 久久综合狠狠综合久久综合88| 亚洲综合自拍偷拍| 成人免费黄色大片| wwwwxxxxx欧美| 婷婷国产在线综合| 97精品久久久久中文字幕| 欧美一区二区三区啪啪| 国产日本欧美一区二区| 黄网站免费久久| 六月丁香综合在线视频| 91官网在线观看| 国产精品久久免费看| 久久超碰97中文字幕| 欧美日韩电影一区| 亚洲最大成人综合| 色狠狠av一区二区三区| 欧美高清在线视频| 奇米在线7777在线精品| 色婷婷久久综合| 国产精品久久久久久久久免费丝袜| 精彩视频一区二区三区 | 欧美激情资源网| 国内精品免费在线观看| 日韩女优毛片在线| 久久精品国产99国产| 欧美xxxxxxxxx| 久久精品国产第一区二区三区| 日韩一区二区免费电影| 日韩你懂的在线播放| 欧美电影免费观看高清完整版在线| 中文字幕一区二区三| 成人伦理片在线| 亚洲欧洲国产专区| 色综合欧美在线| 亚洲福中文字幕伊人影院| 欧美三级中文字| 麻豆高清免费国产一区| 日韩精品一区二区三区在线观看 | 亚洲午夜精品在线| 欧美日韩亚洲高清一区二区| 一区二区高清在线| 欧美日韩高清一区二区| 蜜桃久久精品一区二区| 久久九九久久九九| 成人高清免费在线播放| 亚洲精品免费播放| 在线成人av网站| 国产精品自拍在线| 亚洲美腿欧美偷拍| 日韩一区二区不卡| 成人福利视频在线| 亚洲成人三级小说| 久久久国产综合精品女国产盗摄| 成人午夜免费电影| 亚洲国产精品一区二区www| 欧美一级淫片007| 国产成人精品免费一区二区| 亚洲精品国久久99热| 欧美一级一区二区| 91天堂素人约啪| 麻豆专区一区二区三区四区五区| 日本一区二区三区免费乱视频| 欧美中文字幕亚洲一区二区va在线| 免费看精品久久片| 亚洲蜜桃精久久久久久久| 精品久久久久99| 欧美在线高清视频| 福利电影一区二区| 偷拍自拍另类欧美| 1000精品久久久久久久久| 欧美一级午夜免费电影| 在线亚洲人成电影网站色www| 精品一区二区三区免费观看 | 国产麻豆精品久久一二三| 亚洲免费在线视频一区 二区| 欧美成人精品福利| 欧美日韩另类一区| 99久久久国产精品免费蜜臀| 久久精品国产99| 丝袜亚洲另类欧美综合| 亚洲视频一二三区| 国产日韩成人精品| 日韩精品一区在线观看| 欧美探花视频资源| 在线免费观看成人短视频| 国产成人免费高清| 国产精品66部| 国产精品99久久久| 国产在线精品免费| 蜜桃传媒麻豆第一区在线观看| 亚洲五码中文字幕| 一区二区三区在线观看视频| 国产精品久久久一区麻豆最新章节| 精品国产污污免费网站入口 | 韩国av一区二区三区| 视频一区在线视频| 日本欧美一区二区在线观看| 亚洲在线观看免费| 一区二区三区在线免费视频| 亚洲精品菠萝久久久久久久| 亚洲免费伊人电影| 亚洲制服丝袜av| 一区二区三区产品免费精品久久75| 亚洲免费色视频| 亚洲一区二区三区美女| 一区二区三区日韩在线观看| 亚洲欧美一区二区三区久本道91| 中文字幕一区二区三区不卡在线 | 一本色道久久综合亚洲aⅴ蜜桃| 91在线一区二区| 欧美日韩中文精品| 91精品久久久久久久91蜜桃| 日韩亚洲欧美在线观看| 欧美va天堂va视频va在线| 欧美mv日韩mv| 日本一区二区三区视频视频| 最好看的中文字幕久久| 亚洲欧美日韩系列| 亚洲一区二区三区四区的| 丝袜诱惑亚洲看片 | 国产午夜精品一区二区三区嫩草 | 丝袜美腿亚洲综合| 亚洲动漫第一页| 日韩激情一二三区| 国产成a人无v码亚洲福利| 91亚洲大成网污www| 91高清在线观看| 日韩欧美国产小视频| 久久精品夜夜夜夜久久| 最好看的中文字幕久久| 日韩二区三区在线观看| 丁香天五香天堂综合| 91成人在线免费观看| 欧美mv日韩mv国产| 日韩毛片精品高清免费| 日本午夜一本久久久综合| 国产黄色精品视频| 欧美日产在线观看| 中文av一区二区| 免费人成网站在线观看欧美高清| 成人免费高清视频在线观看| 欧美日韩国产一级| 国产精品乱人伦中文| 日本美女一区二区三区| 成人app网站| 欧美一区二区三区免费大片 | 6080午夜不卡| 国产精品的网站| 欧美日韩激情在线| 国产欧美精品国产国产专区| 一区二区欧美国产|