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

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

?? callablestatement.java

?? mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/* 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;import java.io.InputStream;import java.io.Reader;import java.io.UnsupportedEncodingException;import java.math.BigDecimal;import java.net.URL;import java.sql.Array;import java.sql.Blob;import java.sql.Clob;import java.sql.Date;import java.sql.ParameterMetaData;import java.sql.Ref;import java.sql.SQLException;import java.sql.Time;import java.sql.Timestamp;import java.sql.Types;import java.util.ArrayList;import java.util.Calendar;import java.util.HashMap;import java.util.Iterator;import java.util.List;import java.util.Locale;import java.util.Map;/** * Representation of stored procedures for JDBC *  * @author Mark Matthews * @version $Id: CallableStatement.java,v 1.1.2.1 2005/05/13 18:58:38 mmatthews *          Exp $ */public class CallableStatement extends PreparedStatement implements		java.sql.CallableStatement {	class CallableStatementParam {		int desiredJdbcType;		int index;		int inOutModifier;		boolean isIn;		boolean isOut;		int jdbcType;		short nullability;		String paramName;		int precision;		int scale;		String typeName;		CallableStatementParam(String name, int idx, boolean in, boolean out,				int jdbcType, String typeName, int precision, int scale,				short nullability, int inOutModifier) {			this.paramName = name;			this.isIn = in;			this.isOut = out;			this.index = idx;			this.jdbcType = jdbcType;			this.typeName = typeName;			this.precision = precision;			this.scale = scale;			this.nullability = nullability;			this.inOutModifier = inOutModifier;		}		/*		 * (non-Javadoc)		 * 		 * @see java.lang.Object#clone()		 */		protected Object clone() throws CloneNotSupportedException {			return super.clone();		}	}	class CallableStatementParamInfo {		String catalogInUse;		boolean isFunctionCall;		String nativeSql;		int numParameters;		List parameterList;		Map parameterMap;		/**		 * Constructor that converts a full list of parameter metadata into one		 * that only represents the placeholders present in the {CALL ()}.		 * 		 * @param fullParamInfo the metadata for all parameters for this stored 		 * procedure or function.		 */		CallableStatementParamInfo(CallableStatementParamInfo fullParamInfo) {			this.nativeSql = originalSql;			this.catalogInUse = currentCatalog;			isFunctionCall = fullParamInfo.isFunctionCall;			int[] localParameterMap = placeholderToParameterIndexMap;			int parameterMapLength = localParameterMap.length;						parameterList = new ArrayList(fullParamInfo.numParameters);			parameterMap = new HashMap(fullParamInfo.numParameters);						if (isFunctionCall) {				// Take the return value				parameterList.add(fullParamInfo.parameterList.get(0));			}						int offset = isFunctionCall ? 1 : 0;						for (int i = 0; i < parameterMapLength; i++) {				if (localParameterMap[i] != 0) {					CallableStatementParam param = (CallableStatementParam)fullParamInfo.parameterList.get(localParameterMap[i] + offset);										parameterList.add(param);					parameterMap.put(param.paramName, param);				}			}						this.numParameters = parameterList.size();		}				CallableStatementParamInfo(java.sql.ResultSet paramTypesRs)				throws SQLException {			boolean hadRows = paramTypesRs.last();			this.nativeSql = originalSql;			this.catalogInUse = currentCatalog;			isFunctionCall = callingStoredFunction;			if (hadRows) {				this.numParameters = paramTypesRs.getRow();				this.parameterList = new ArrayList(this.numParameters);				this.parameterMap = new HashMap(this.numParameters);				paramTypesRs.beforeFirst();				addParametersFromDBMD(paramTypesRs);			} else {				this.numParameters = 0;			}						if (isFunctionCall) {				this.numParameters += 1;			}		}		private void addParametersFromDBMD(java.sql.ResultSet paramTypesRs)				throws SQLException {			int i = 0;			while (paramTypesRs.next()) {				String paramName = paramTypesRs.getString(4);				int inOutModifier = paramTypesRs.getInt(5);				boolean isOutParameter = false;				boolean isInParameter = false;				if (i == 0 && isFunctionCall) {					isOutParameter = true;					isInParameter = false;				} else if (inOutModifier == DatabaseMetaData.procedureColumnInOut) {					isOutParameter = true;					isInParameter = true;				} else if (inOutModifier == DatabaseMetaData.procedureColumnIn) {					isOutParameter = false;					isInParameter = true;				} else if (inOutModifier == DatabaseMetaData.procedureColumnOut) {					isOutParameter = true;					isInParameter = false;				}				int jdbcType = paramTypesRs.getInt(6);				String typeName = paramTypesRs.getString(7);				int precision = paramTypesRs.getInt(8);				int scale = paramTypesRs.getInt(10);				short nullability = paramTypesRs.getShort(12);				CallableStatementParam paramInfoToAdd = new CallableStatementParam(						paramName, i++, isInParameter, isOutParameter,						jdbcType, typeName, precision, scale, nullability,						inOutModifier);				this.parameterList.add(paramInfoToAdd);				this.parameterMap.put(paramName, paramInfoToAdd);			}		}		protected void checkBounds(int paramIndex) throws SQLException {			int localParamIndex = paramIndex - 1;			if ((paramIndex < 0) || (localParamIndex >= this.numParameters)) {				throw SQLError.createSQLException(						Messages.getString("CallableStatement.11") + paramIndex //$NON-NLS-1$								+ Messages.getString("CallableStatement.12") + numParameters //$NON-NLS-1$								+ Messages.getString("CallableStatement.13"), SQLError.SQL_STATE_ILLEGAL_ARGUMENT); //$NON-NLS-1$			}		}		/*		 * (non-Javadoc)		 * 		 * @see java.lang.Object#clone()		 */		protected Object clone() throws CloneNotSupportedException {			// TODO Auto-generated method stub			return super.clone();		}		CallableStatementParam getParameter(int index) {			return (CallableStatementParam) this.parameterList.get(index);		}		CallableStatementParam getParameter(String name) {			return (CallableStatementParam) this.parameterMap.get(name);		}		public String getParameterClassName(int arg0) throws SQLException {			String mysqlTypeName = getParameterTypeName(arg0);						boolean isBinaryOrBlob = StringUtils.indexOfIgnoreCase(mysqlTypeName, "BLOB") != -1 || 				StringUtils.indexOfIgnoreCase(mysqlTypeName, "BINARY") != -1;						boolean isUnsigned = StringUtils.indexOfIgnoreCase(mysqlTypeName, "UNSIGNED") != -1;						int mysqlTypeIfKnown = 0;						if (StringUtils.startsWithIgnoreCase(mysqlTypeName, "MEDIUMINT")) {				mysqlTypeIfKnown = MysqlDefs.FIELD_TYPE_INT24;			}						return ResultSetMetaData.getClassNameForJavaType(getParameterType(arg0), 					isUnsigned, mysqlTypeIfKnown, isBinaryOrBlob, false);		}		public int getParameterCount() throws SQLException {			if (this.parameterList == null) {				return 0;			}			return this.parameterList.size();		}		public int getParameterMode(int arg0) throws SQLException {			checkBounds(arg0);			return getParameter(arg0 - 1).inOutModifier;		}		public int getParameterType(int arg0) throws SQLException {			checkBounds(arg0);			return getParameter(arg0 - 1).jdbcType;		}		public String getParameterTypeName(int arg0) throws SQLException {			checkBounds(arg0);			return getParameter(arg0 - 1).typeName;		}		public int getPrecision(int arg0) throws SQLException {			checkBounds(arg0);			return getParameter(arg0 - 1).precision;		}		public int getScale(int arg0) throws SQLException {			checkBounds(arg0);			return getParameter(arg0 - 1).scale;		}		public int isNullable(int arg0) throws SQLException {			checkBounds(arg0);			return getParameter(arg0 - 1).nullability;		}		public boolean isSigned(int arg0) throws SQLException {			checkBounds(arg0);			return false;		}		Iterator iterator() {			return this.parameterList.iterator();		}		int numberOfParameters() {			return this.numParameters;		}	}	/**	 * Can't implement this directly, as then you can't use callable statements	 * on JDK-1.3.1, which unfortunately isn't EOL'd yet, and still present	 * quite a bit out there in the wild (Websphere, FreeBSD, anyone?)	 */	class CallableStatementParamInfoJDBC3 extends CallableStatementParamInfo			implements ParameterMetaData {		CallableStatementParamInfoJDBC3(java.sql.ResultSet paramTypesRs)				throws SQLException {			super(paramTypesRs);		}		public CallableStatementParamInfoJDBC3(CallableStatementParamInfo paramInfo) {			super(paramInfo);		}	}	private final static int NOT_OUTPUT_PARAMETER_INDICATOR = Integer.MIN_VALUE;	private final static String PARAMETER_NAMESPACE_PREFIX = "@com_mysql_jdbc_outparam_"; //$NON-NLS-1$	private static String mangleParameterName(String origParameterName) {		if (origParameterName == null) {			return null;		}		int offset = 0;		if (origParameterName.length() > 0				&& origParameterName.charAt(0) == '@') {			offset = 1;		}		StringBuffer paramNameBuf = new StringBuffer(PARAMETER_NAMESPACE_PREFIX				.length()				+ origParameterName.length());		paramNameBuf.append(PARAMETER_NAMESPACE_PREFIX);		paramNameBuf.append(origParameterName.substring(offset));		return paramNameBuf.toString();	}	private boolean callingStoredFunction = false;	private ResultSet functionReturnValueResults;	private boolean hasOutputParams = false;	// private List parameterList;	// private Map parameterMap;	private ResultSet outputParameterResults;	private boolean outputParamWasNull = false;	private int[] parameterIndexToRsIndex;	protected CallableStatementParamInfo paramInfo;	private CallableStatementParam returnValueParam;	/**	 * Creates a new CallableStatement	 * 	 * @param conn	 *            the connection creating this statement	 * @param paramInfo	 *            the SQL to prepare	 * 	 * @throws SQLException	 *             if an error occurs	 */	public CallableStatement(Connection conn,			CallableStatementParamInfo paramInfo) throws SQLException {		super(conn, paramInfo.nativeSql, paramInfo.catalogInUse);		this.paramInfo = paramInfo;		this.callingStoredFunction = this.paramInfo.isFunctionCall;				if (this.callingStoredFunction) {			this.parameterCount += 1;		}	}	/**	 * Creates a new CallableStatement	 * 	 * @param conn	 *            the connection creating this statement	 * @param catalog	 *            catalog the current catalog	 * 	 * @throws SQLException	 *             if an error occurs	 */	public CallableStatement(Connection conn, String catalog)			throws SQLException {		super(conn, catalog, null);		determineParameterTypes();		generateParameterMap();				if (this.callingStoredFunction) {			this.parameterCount += 1;		}	}	private int[] placeholderToParameterIndexMap;			private void generateParameterMap() throws SQLException {		// if the user specified some parameters as literals, we need to		// provide a map from the specified placeholders to the actual		// parameter numbers				int parameterCountFromMetaData = this.paramInfo.getParameterCount();				// Ignore the first ? if this is a stored function, it doesn't count				if (this.callingStoredFunction) {			parameterCountFromMetaData--;		}				if (this.paramInfo != null &&				this.parameterCount != parameterCountFromMetaData) {			this.placeholderToParameterIndexMap = new int[this.parameterCount];						int startPos = this.callingStoredFunction ? StringUtils.indexOfIgnoreCase(this.originalSql, 			"SELECT") : StringUtils.indexOfIgnoreCase(this.originalSql, "CALL");						if (startPos != -1) {				int parenOpenPos = this.originalSql.indexOf('(', startPos + 4);								if (parenOpenPos != -1) {					int parenClosePos = StringUtils.indexOfIgnoreCaseRespectQuotes(parenOpenPos, 							this.originalSql, ")", '\'', true);										if (parenClosePos != -1) {						List parsedParameters = StringUtils.split(this.originalSql.substring(parenOpenPos + 1, parenClosePos), ",", "'\"", "'\"", true);												int numParsedParameters = parsedParameters.size();												// sanity check												if (numParsedParameters != this.parameterCount) {							// bail?						}												int placeholderCount = 0;												for (int i = 0; i < numParsedParameters; i++) {							if (((String)parsedParameters.get(i)).equals("?")) {								this.placeholderToParameterIndexMap[placeholderCount++] = i;							}						}					}				}			}		}	}	/**	 * Creates a new CallableStatement	 * 	 * @param conn	 *            the connection creating this statement	 * @param sql	 *            the SQL to prepare	 * @param catalog	 *            the current catalog	 * 	 * @throws SQLException	 *             if an error occurs	 */	public CallableStatement(Connection conn, String sql, String catalog,			boolean isFunctionCall) throws SQLException {		super(conn, sql, catalog);		this.callingStoredFunction = isFunctionCall;		determineParameterTypes();		generateParameterMap();				if (this.callingStoredFunction) {			this.parameterCount += 1;		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#addBatch()	 */	public void addBatch() throws SQLException {		setOutParams();		super.addBatch();	}	private CallableStatementParam checkIsOutputParam(int paramIndex)			throws SQLException {		if (this.callingStoredFunction) {			if (paramIndex == 1) {				if (this.returnValueParam == null) {					this.returnValueParam = new CallableStatementParam("", 0,							false, true, Types.VARCHAR, "VARCHAR", 0, 0,							DatabaseMetaData.attributeNullableUnknown,							DatabaseMetaData.procedureColumnReturn);				}				return this.returnValueParam;			}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美大片日本大片免费观看| 在线影视一区二区三区| 精品国产91乱码一区二区三区| 久久99国产精品久久99| 欧美人xxxx| 美女脱光内衣内裤视频久久网站 | 精品sm在线观看| 激情文学综合网| ...中文天堂在线一区| 一本大道av一区二区在线播放| 一区二区欧美在线观看| 欧美一区二区三区系列电影| 九九视频精品免费| 国产精品视频你懂的| 在线观看日韩精品| 久久国产综合精品| 国产精品色在线| 欧美日本一区二区在线观看| 国产综合色视频| 成人免费在线观看入口| 制服丝袜亚洲色图| 国产精品伊人色| 亚洲精品免费播放| 日韩欧美三级在线| 99精品国产99久久久久久白柏| 亚洲香肠在线观看| 日本一区二区三区久久久久久久久不| 91尤物视频在线观看| 日韩黄色片在线观看| 中文成人av在线| 欧美精品国产精品| 91在线视频官网| 国产综合久久久久影院| 亚洲精品国产精华液| 精品日韩欧美在线| 在线观看一区二区精品视频| 国产伦精品一区二区三区视频青涩| 亚洲精品乱码久久久久久久久 | 国内精品伊人久久久久av一坑| 国产精品青草综合久久久久99| 欧美日韩高清影院| 99久久精品一区二区| 久久er精品视频| 夜夜精品视频一区二区| 欧美激情一二三区| 欧美不卡一区二区三区| 在线国产电影不卡| 91亚洲永久精品| 国产精品乡下勾搭老头1| 青青草国产成人av片免费| 一区二区三区资源| 国产精品素人一区二区| 久久天天做天天爱综合色| 欧美久久一区二区| 欧美午夜在线观看| 色激情天天射综合网| 成人激情校园春色| 国产精品一区二区黑丝| 美女视频一区在线观看| 日韩精品成人一区二区三区| 亚洲一区二区四区蜜桃| 亚洲欧洲日产国产综合网| 国产欧美精品一区| 久久综合色婷婷| 久久噜噜亚洲综合| 精品国精品国产尤物美女| 欧美一级电影网站| 欧美精品在线一区二区| 欧美日韩精品欧美日韩精品一 | 亚洲成在线观看| 亚洲一区二区三区自拍| 亚洲一区在线看| 亚洲福利一区二区三区| 亚洲一区二区在线观看视频| 亚洲日本va午夜在线影院| 综合久久久久久| 亚洲你懂的在线视频| 成人app在线| 国产成人aaa| 成人三级伦理片| aa级大片欧美| 色成年激情久久综合| 欧洲另类一二三四区| 欧美午夜精品一区二区蜜桃| 欧美在线一二三| 欧美日韩国产精选| 日韩一级完整毛片| 欧美zozozo| 国产精品素人一区二区| 亚洲视频免费观看| 亚洲超碰精品一区二区| 日本一区中文字幕| 狠狠狠色丁香婷婷综合激情| 国产剧情一区在线| www.亚洲色图.com| 欧美午夜视频网站| 日韩女优电影在线观看| 久久久久99精品一区| 国产精品久久久久久妇女6080| 亚洲欧美一区二区三区极速播放| 亚洲免费av高清| 亚洲福利一二三区| 国产精品一区二区在线观看不卡 | 欧美性色欧美a在线播放| 欧美久久久久久蜜桃| 精品日韩一区二区三区 | 亚洲欧洲日韩在线| 亚洲3atv精品一区二区三区| 美女网站在线免费欧美精品| 粉嫩绯色av一区二区在线观看| 99久久久国产精品| 日韩亚洲欧美在线| 亚洲品质自拍视频| 另类成人小视频在线| 97久久人人超碰| 日韩精品自拍偷拍| 亚洲欧美韩国综合色| 另类小说一区二区三区| 9久草视频在线视频精品| 欧美久久婷婷综合色| 国产精品天干天干在观线| 午夜精品久久久久久久| 丁香啪啪综合成人亚洲小说 | 成人小视频免费观看| 欧美日韩国产免费一区二区| 国产日产欧美一区二区视频| 一区二区三区精品在线| 国产一区二区福利| 9191久久久久久久久久久| 国产精品毛片久久久久久| 美女网站视频久久| 欧美午夜精品理论片a级按摩| 2024国产精品| 日韩在线一区二区三区| 99久久久免费精品国产一区二区| 日韩一区二区不卡| 亚洲高清不卡在线观看| 99热精品一区二区| 久久久久久免费毛片精品| 亚洲国产欧美在线| 91亚洲精品一区二区乱码| 国产午夜精品在线观看| 久久99精品国产麻豆婷婷| 欧美视频日韩视频| 一区二区在线免费观看| 豆国产96在线|亚洲| 久久亚洲综合av| 日韩高清一区在线| 欧美精品日韩综合在线| 综合欧美一区二区三区| 国产91丝袜在线观看| 久久久美女毛片| 日本亚洲免费观看| 911国产精品| 日韩精品高清不卡| 5月丁香婷婷综合| 午夜精品久久久久久不卡8050| 91国模大尺度私拍在线视频| 中文字幕字幕中文在线中不卡视频| 国产福利一区二区三区视频| 日韩免费看的电影| 蜜桃av噜噜一区二区三区小说| 精品国产91乱码一区二区三区| 樱桃视频在线观看一区| 色屁屁一区二区| 亚洲美女在线国产| 日本韩国欧美一区二区三区| 国产精品久99| 色综合中文综合网| 欧美一级片在线观看| 免费成人在线视频观看| 欧美一级午夜免费电影| 蜜臀精品一区二区三区在线观看| 日韩一级高清毛片| 国产馆精品极品| 一区二区中文视频| 在线视频国产一区| 婷婷久久综合九色综合绿巨人 | 国产在线观看一区二区| 久久久亚洲精华液精华液精华液| 国产一区二区三区不卡在线观看| 国产日产欧美一区二区视频| 99久精品国产| 亚洲成人av资源| 日韩欧美国产小视频| 国产精一品亚洲二区在线视频| 国产日产欧美精品一区二区三区| av午夜一区麻豆| 三级精品在线观看| 久久久亚洲精华液精华液精华液| 高清不卡在线观看av| 亚洲精品国产一区二区精华液 | 亚洲欧美日韩国产综合在线| 在线一区二区三区| 免费三级欧美电影| 国产精品久久网站| 欧美日韩久久不卡| 国产成人亚洲综合a∨猫咪| 亚洲欧美一区二区久久| 91精品婷婷国产综合久久|