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

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

?? callablestatement.java

?? 用于JAVA數據庫連接.解壓就可用,方便得很
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
	private boolean hasOutputParams = false;	// private List parameterList;	// private Map parameterMap;	private ResultSetInternalMethods outputParameterResults;	protected 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(ConnectionImpl 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 callable statement instance -- We need to provide factory-style methods	 * so we can support both JDBC3 (and older) and JDBC4 runtimes, otherwise	 * the class verifier complains when it tries to load JDBC4-only interface	 * classes that are present in JDBC4 method signatures.	 */	protected static CallableStatement getInstance(ConnectionImpl conn, String sql,			String catalog, boolean isFunctionCall) throws SQLException {		if (!Util.isJdbc4()) {			return new CallableStatement(conn, sql, catalog, isFunctionCall);		}		return (CallableStatement) Util.handleNewInstance(				JDBC_4_CSTMT_4_ARGS_CTOR, new Object[] { conn, sql, catalog,						Boolean.valueOf(isFunctionCall) });	}		/**	 * Creates a callable statement instance -- We need to provide factory-style methods	 * so we can support both JDBC3 (and older) and JDBC4 runtimes, otherwise	 * the class verifier complains when it tries to load JDBC4-only interface	 * classes that are present in JDBC4 method signatures.	 */	protected static CallableStatement getInstance(ConnectionImpl conn,			CallableStatementParamInfo paramInfo) throws SQLException {		if (!Util.isJdbc4()) {			return new CallableStatement(conn, paramInfo);		}		return (CallableStatement) Util.handleNewInstance(				JDBC_4_CSTMT_2_ARGS_CTOR, new Object[] { conn, paramInfo });	}		private int[] placeholderToParameterIndexMap;		private void generateParameterMap() throws SQLException {		if (this.paramInfo == null) {			return;		}				// 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(ConnectionImpl 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;			}			// Move to position in output result set			paramIndex--;		}		checkParameterIndexBounds(paramIndex);		int localParamIndex = paramIndex - 1;		if (this.placeholderToParameterIndexMap != null) {			localParamIndex = this.placeholderToParameterIndexMap[localParamIndex];		}				CallableStatementParam paramDescriptor = this.paramInfo				.getParameter(localParamIndex);		// We don't have reliable metadata in this case, trust		// the caller				if (this.connection.getNoAccessToProcedureBodies()) {			paramDescriptor.isOut = true;			paramDescriptor.isIn = true;			paramDescriptor.inOutModifier = DatabaseMetaData.procedureColumnInOut;		} else if (!paramDescriptor.isOut) {			throw SQLError.createSQLException(					Messages.getString("CallableStatement.9") + paramIndex //$NON-NLS-1$							+ Messages.getString("CallableStatement.10"), //$NON-NLS-1$					SQLError.SQL_STATE_ILLEGAL_ARGUMENT);		}		this.hasOutputParams = true;		return paramDescriptor;	}	/**	 * DOCUMENT ME!	 * 	 * @param paramIndex	 * 	 * @throws SQLException	 */	private void checkParameterIndexBounds(int paramIndex) throws SQLException {		this.paramInfo.checkBounds(paramIndex);	}	/**	 * Checks whether or not this statement is supposed to be providing	 * streamable result sets...If output parameters are registered, the driver	 * can not stream the results.	 * 	 * @throws SQLException	 *             DOCUMENT ME!	 */	private void checkStreamability() throws SQLException {		if (this.hasOutputParams && createStreamingResultSet()) {			throw SQLError.createSQLException(Messages.getString("CallableStatement.14"), //$NON-NLS-1$					SQLError.SQL_STATE_DRIVER_NOT_CAPABLE);		}	}	public synchronized void clearParameters() throws SQLException {		super.clearParameters();		try {			if (this.outputParameterResults != null) {				this.outputParameterResults.close();			}		} finally {			this.outputParameterResults = null;		}	}	/**	 * Used to fake up some metadata when we don't have access to 	 * SHOW CREATE PROCEDURE or mysql.proc.	 * 	 * @throws SQLException if we can't build the metadata.	 */	private void fakeParameterTypes() throws SQLException {		Field[] fields = new Field[13];		fields[0] = new Field("", "PROCEDURE_CAT", Types.CHAR, 0);		fields[1] = new Field("", "PROCEDURE_SCHEM", Types.CHAR, 0);		fields[2] = new Field("", "PROCEDURE_NAME", Types.CHAR, 0);		fields[3] = new Field("", "COLUMN_NAME", Types.CHAR, 0);		fields[4] = new Field("", "COLUMN_TYPE", Types.CHAR, 0);		fields[5] = new Field("", "DATA_TYPE", Types.SMALLINT, 0);		fields[6] = new Field("", "TYPE_NAME", Types.CHAR, 0);		fields[7] = new Field("", "PRECISION", Types.INTEGER, 0);		fields[8] = new Field("", "LENGTH", Types.INTEGER, 0);		fields[9] = new Field("", "SCALE", Types.SMALLINT, 0);		fields[10] = new Field("", "RADIX", Types.SMALLINT, 0);		fields[11] = new Field("", "NULLABLE", Types.SMALLINT, 0);		fields[12] = new Field("", "REMARKS", Types.CHAR, 0);		String procName = extractProcedureName();		byte[] procNameAsBytes = null;		try {			procNameAsBytes = procName.getBytes("UTF-8");		} catch (UnsupportedEncodingException ueEx) {			procNameAsBytes = StringUtils.s2b(procName, this.connection);		}		ArrayList resultRows = new ArrayList();		for (int i = 0; i < this.parameterCount; i++) {			byte[][] row = new byte[13][];			row[0] = null; // PROCEDURE_CAT			row[1] = null; // PROCEDURE_SCHEM			row[2] = procNameAsBytes; // PROCEDURE/NAME			row[3] = StringUtils.s2b(String.valueOf(i), this.connection); // COLUMN_NAME			row[4] = StringUtils.s2b(String					.valueOf(DatabaseMetaData.procedureColumnIn),					this.connection);			row[5] = StringUtils.s2b(String.valueOf(Types.VARCHAR),					this.connection); // DATA_TYPE			row[6] = StringUtils.s2b("VARCHAR", this.connection); // TYPE_NAME			row[7] = StringUtils.s2b(Integer.toString(65535), this.connection); // PRECISION			row[8] = StringUtils.s2b(Integer.toString(65535), this.connection); // LENGTH			row[9] = StringUtils.s2b(Integer.toString(0), this.connection); // SCALE			row[10] = StringUtils.s2b(Integer.toString(10), this.connection); // RADIX			row[11] = StringUtils.s2b(Integer					.toString(DatabaseMetaData.procedureNullableUnknown),					this.connection); // nullable			row[12] = null;			resultRows.add(new ByteArrayRow(row));		}		java.sql.ResultSet paramTypesRs = DatabaseMetaData.buildResultSet(				fields, resultRows, this.connection);		convertGetProcedureColumnsToInternalDescriptors(paramTypesRs);	}		private void determineParameterTypes() throws SQLException {		if (this.connection.getNoAccessToProcedureBodies()) {			fakeParameterTypes();						return;		}				java.sql.ResultSet paramTypesRs = null;		try {			String procName = extractProcedureName();			java.sql.DatabaseMetaData dbmd = this.connection.getMetaData();			boolean useCatalog = false;			if (procName.indexOf(".") == -1) {				useCatalog = true;			}			paramTypesRs = dbmd.getProcedureColumns(this.connection					.versionMeetsMinimum(5, 0, 2)					&& useCatalog ? this.currentCatalog : null, null, procName,					"%"); //$NON-NLS-1$			convertGetProcedureColumnsToInternalDescriptors(paramTypesRs);		} finally {			SQLException sqlExRethrow = null;			if (paramTypesRs != null) {				try {					paramTypesRs.close();				} catch (SQLException sqlEx) {					sqlExRethrow = sqlEx;				}				paramTypesRs = null;			}			if (sqlExRethrow != null) {				throw sqlExRethrow;			}		}	}	private void convertGetProcedureColumnsToInternalDescriptors(java.sql.ResultSet paramTypesRs) throws SQLException {		if (!this.connection.isRunningOnJDK13()) {			this.paramInfo = new CallableStatementParamInfoJDBC3(					paramTypesRs);		} else {			this.paramInfo = new CallableStatementParamInfo(paramTypesRs);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#execute()	 */	public boolean execute() throws SQLException {		boolean returnVal = false;		checkClosed();		checkStreamability();		synchronized (this.connection.getMutex()) {			setInOutParamsOnServer();			setOutParams();			returnVal = super.execute();			if (this.callingStoredFunction) {				this.functionReturnValueResults = this.results;				this.functionReturnValueResults.next();				this.results = null;			}			retrieveOutParams();		}		if (!this.callingStoredFunction) {			return returnVal;		}		// Functions can't return results		return false;	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#executeQuery()	 */	public java.sql.ResultSet executeQuery() throws SQLException {		checkClosed();		checkStreamability();		java.sql.ResultSet execResults = null;		synchronized (this.connection.getMutex()) {			setInOutParamsOnServer();			setOutParams();			execResults = super.executeQuery();			retrieveOutParams();		}		return execResults;	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#executeUpdate()	 */	public int executeUpdate() throws SQLException {		int returnVal = -1;		checkClosed();		checkStreamability();		if (this.callingStoredFunction) {			execute();			return -1;		}		synchronized (this.connection.getMutex()) {			setInOutParamsOnServer();			setOutParams();			returnVal = super.executeUpdate();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久国产福利国产秒拍| 亚洲一区在线观看免费观看电影高清 | 国产女人aaa级久久久级| 99精品视频在线观看| 日韩二区三区四区| 国产精品久久精品日日| 亚洲一区二区欧美日韩| 国产自产高清不卡| 亚洲欧美在线视频| av电影一区二区| 欧美国产乱子伦 | 国产尤物一区二区| 日韩欧美一区二区久久婷婷| 国产乱子伦视频一区二区三区 | 欧美日韩一级大片网址| 精品在线观看免费| 亚洲一级不卡视频| 中文字幕欧美三区| 欧美成人免费网站| 欧美日韩在线播放三区四区| 成人中文字幕在线| 久久99国内精品| 性做久久久久久| 成人免费小视频| 2022国产精品视频| 欧美乱妇15p| 一本色道**综合亚洲精品蜜桃冫| 国产精品香蕉一区二区三区| 五月婷婷综合激情| 亚洲精品成a人| 国产精品青草综合久久久久99| 日韩欧美视频一区| 91.com视频| 欧美中文字幕一二三区视频| 99久久精品国产导航| 国产乱码一区二区三区| 毛片一区二区三区| 日韩和欧美的一区| 亚洲综合999| 亚洲情趣在线观看| 成人欧美一区二区三区黑人麻豆 | 国产精品视频免费看| 精品国产乱子伦一区| 欧美一区二区在线视频| 欧美日韩一区不卡| 欧美日韩午夜在线视频| 欧美日韩一区小说| 91.com视频| 日韩一区二区三区三四区视频在线观看| 在线一区二区三区做爰视频网站| 91原创在线视频| 91亚洲资源网| 一本到高清视频免费精品| 91麻豆成人久久精品二区三区| caoporen国产精品视频| 99久久精品国产观看| 色欧美88888久久久久久影院| 91麻豆高清视频| 欧美日韩另类一区| 777亚洲妇女| 日韩欧美成人午夜| 精品999在线播放| 国产人久久人人人人爽| 国产精品福利一区| 一区二区日韩电影| 日韩一区精品视频| 国内久久精品视频| 福利一区福利二区| 色综合久久中文字幕综合网| 欧美在线免费观看亚洲| 欧美男生操女生| 欧美大片在线观看| 亚洲国产精品精华液ab| 亚洲欧美二区三区| 水野朝阳av一区二区三区| 九九久久精品视频| 不卡的av中国片| 欧美系列亚洲系列| 欧美变态tickling挠脚心| 国产欧美日韩精品在线| 亚洲一区二区三区小说| 久久国产欧美日韩精品| jvid福利写真一区二区三区| 欧美视频一区二区| 欧美精品一区二区在线观看| 中文字幕亚洲在| 日韩高清不卡一区| 成人激情视频网站| 欧美久久久影院| 国产欧美视频在线观看| 一级中文字幕一区二区| 麻豆成人久久精品二区三区红| www.欧美精品一二区| 91.xcao| 欧美国产禁国产网站cc| 亚洲bdsm女犯bdsm网站| 国产福利不卡视频| 777亚洲妇女| 亚洲欧美另类小说| 国产一区二区三区免费观看| 91久久精品一区二区| 久久综合视频网| 亚洲大片在线观看| 国产成人免费视频网站高清观看视频| 色婷婷亚洲精品| 国产午夜精品一区二区| 婷婷成人激情在线网| 成人精品电影在线观看| 精品日产卡一卡二卡麻豆| 一区二区三区高清不卡| 丰满白嫩尤物一区二区| 日韩一区二区三区精品视频| 亚洲欧美日韩电影| 成人激情文学综合网| 精品国产不卡一区二区三区| 亚洲电影视频在线| 99久久久久久99| 国产日韩欧美麻豆| 麻豆精品一区二区综合av| 欧美日韩在线精品一区二区三区激情| 中文av字幕一区| 国产一区二区三区久久悠悠色av| 69av一区二区三区| 亚洲一区日韩精品中文字幕| 成人h版在线观看| 精品久久久影院| 免费在线观看日韩欧美| 欧美日韩一区不卡| 亚洲一区二区三区在线| 91久久免费观看| 亚洲精品高清在线观看| 91在线观看污| 国产精品三级视频| 福利一区二区在线| 久久久九九九九| 国内精品嫩模私拍在线| 欧美大片日本大片免费观看| 日韩高清欧美激情| 欧美猛男超大videosgay| 亚洲国产综合人成综合网站| 色婷婷精品大在线视频 | 久久久久久毛片| 久久99久久99精品免视看婷婷| 91精品国产综合久久蜜臀| 午夜精品一区二区三区免费视频 | 视频一区二区三区中文字幕| 在线精品视频免费播放| 亚洲伦理在线精品| 色播五月激情综合网| 亚洲精品国产第一综合99久久 | 国产精品久久久久影院| 成人综合婷婷国产精品久久 | 亚洲一区在线观看免费观看电影高清| 99久久精品国产麻豆演员表| 日韩美女视频一区二区| 色噜噜狠狠一区二区三区果冻| 亚洲精品中文字幕在线观看| 欧洲一区二区三区免费视频| 亚洲一区二区三区四区在线观看| 欧美亚洲禁片免费| 石原莉奈在线亚洲三区| 日韩女同互慰一区二区| 国产一区二区三区不卡在线观看| 久久精品亚洲乱码伦伦中文| 不卡的av网站| 亚洲成人av免费| 精品三级在线看| 成人激情免费视频| 亚洲最快最全在线视频| 欧美日韩国产大片| 国产在线精品免费| 国产精品国产成人国产三级| 在线免费不卡电影| 精品亚洲欧美一区| 国产精品毛片a∨一区二区三区| 91蜜桃视频在线| 石原莉奈在线亚洲三区| 久久精品欧美一区二区三区麻豆| 成人av综合在线| 午夜久久电影网| 久久久久国产成人精品亚洲午夜| 91网站最新地址| 免费成人深夜小野草| 国产日韩欧美激情| 欧美网站大全在线观看| 狠狠色丁香久久婷婷综| 日韩美女视频一区| 欧美一区二区成人6969| 成人的网站免费观看| 五月天欧美精品| 欧美激情一区二区三区不卡| 欧美综合久久久| 国产成人自拍高清视频在线免费播放| 亚洲精品视频一区| 26uuu国产一区二区三区| 在线亚洲一区二区| 国产成人在线免费观看| 亚洲成人午夜电影| 亚洲国产岛国毛片在线| 日韩视频中午一区|