⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 preparedstatementwrapper.java

📁 用于JAVA数据库连接.解压就可用,方便得很
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#setLong(int, long)	 */	public void setLong(int parameterIndex, long x) throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).setLong(parameterIndex,						x);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#getMetaData()	 */	public ResultSetMetaData getMetaData() throws SQLException {		try {			if (this.wrappedStmt != null) {				return ((PreparedStatement) this.wrappedStmt).getMetaData();			}			throw SQLError.createSQLException(					"No operations allowed after statement closed",					SQLError.SQL_STATE_GENERAL_ERROR);		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}		return null;	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#setNull(int, int)	 */	public void setNull(int parameterIndex, int sqlType) throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).setNull(parameterIndex,						sqlType);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#setNull(int, int, java.lang.String)	 */	public void setNull(int parameterIndex, int sqlType, String typeName)			throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).setNull(parameterIndex,						sqlType, typeName);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#setObject(int, java.lang.Object)	 */	public void setObject(int parameterIndex, Object x) throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).setObject(						parameterIndex, x);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#setObject(int, java.lang.Object, int)	 */	public void setObject(int parameterIndex, Object x, int targetSqlType)			throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).setObject(						parameterIndex, x, targetSqlType);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#setObject(int, java.lang.Object, int,	 *      int)	 */	public void setObject(int parameterIndex, Object x, int targetSqlType,			int scale) throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).setObject(						parameterIndex, x, targetSqlType, scale);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#getParameterMetaData()	 */	public ParameterMetaData getParameterMetaData() throws SQLException {		try {			if (this.wrappedStmt != null) {				return ((PreparedStatement) this.wrappedStmt)						.getParameterMetaData();			}			throw SQLError.createSQLException(					"No operations allowed after statement closed",					SQLError.SQL_STATE_GENERAL_ERROR);		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}		return null;	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#setRef(int, java.sql.Ref)	 */	public void setRef(int parameterIndex, Ref x) throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt)						.setRef(parameterIndex, x);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#setShort(int, short)	 */	public void setShort(int parameterIndex, short x) throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).setShort(parameterIndex,						x);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#setString(int, java.lang.String)	 */	public void setString(int parameterIndex, String x) throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).setString(						parameterIndex, x);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#setTime(int, java.sql.Time)	 */	public void setTime(int parameterIndex, Time x) throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).setTime(parameterIndex,						x);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#setTime(int, java.sql.Time,	 *      java.util.Calendar)	 */	public void setTime(int parameterIndex, Time x, Calendar cal)			throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).setTime(parameterIndex,						x, cal);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#setTimestamp(int, java.sql.Timestamp)	 */	public void setTimestamp(int parameterIndex, Timestamp x)			throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).setTimestamp(						parameterIndex, x);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#setTimestamp(int, java.sql.Timestamp,	 *      java.util.Calendar)	 */	public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal)			throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).setTimestamp(						parameterIndex, x, cal);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#setURL(int, java.net.URL)	 */	public void setURL(int parameterIndex, URL x) throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt)						.setURL(parameterIndex, x);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/**	 * DOCUMENT ME!	 * 	 * @param parameterIndex	 *            DOCUMENT ME!	 * @param x	 *            DOCUMENT ME!	 * @param length	 *            DOCUMENT ME!	 * 	 * @throws SQLException	 *             DOCUMENT ME!	 * 	 * @see java.sql.PreparedStatement#setUnicodeStream(int,	 *      java.io.InputStream, int)	 * @deprecated	 */	public void setUnicodeStream(int parameterIndex, InputStream x, int length)			throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).setUnicodeStream(						parameterIndex, x, length);			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#addBatch()	 */	public void addBatch() throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).addBatch();			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 	 * @see java.sql.PreparedStatement#clearParameters()	 */	public void clearParameters() throws SQLException {		try {			if (this.wrappedStmt != null) {				((PreparedStatement) this.wrappedStmt).clearParameters();			} else {				throw SQLError.createSQLException(						"No operations allowed after statement closed",						SQLError.SQL_STATE_GENERAL_ERROR);			}		} catch (SQLException sqlEx) {			checkAndFireConnectionError(sqlEx);		}	}	/*	 * (non-Javadoc)	 * 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -