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

📄 updatableresultset.java

📁 mysql5.0 JDBC 驱动 放在glassfish或者tomcat的lib文件夹下就可以了
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
	public synchronized void updateBlob(String columnName, java.sql.Blob blob)			throws SQLException {		updateBlob(findColumn(columnName), blob);	}	/**	 * JDBC 2.0 Update a column with a boolean value. The updateXXX() methods	 * are used to update column values in the current row, or the insert row.	 * The updateXXX() methods do not update the underlying database, instead	 * the updateRow() or insertRow() methods are called to update the database.	 *	 * @param columnIndex	 *            the first column is 1, the second is 2, ...	 * @param x	 *            the new column value	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateBoolean(int columnIndex, boolean x)			throws SQLException {		if (!this.onInsertRow) {			if (!this.doingUpdates) {				this.doingUpdates = true;				syncUpdate();			}			this.updater.setBoolean(columnIndex, x);		} else {			this.inserter.setBoolean(columnIndex, x);			this.thisRow.setColumnValue(columnIndex - 1, this.inserter					.getBytesRepresentation(columnIndex - 1));		}	}	/**	 * JDBC 2.0 Update a column with a boolean value. The updateXXX() methods	 * are used to update column values in the current row, or the insert row.	 * The updateXXX() methods do not update the underlying database, instead	 * the updateRow() or insertRow() methods are called to update the database.	 *	 * @param columnName	 *            the name of the column	 * @param x	 *            the new column value	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateBoolean(String columnName, boolean x)			throws SQLException {		updateBoolean(findColumn(columnName), x);	}	/**	 * JDBC 2.0 Update a column with a byte value. The updateXXX() methods are	 * used to update column values in the current row, or the insert row. The	 * updateXXX() methods do not update the underlying database, instead the	 * updateRow() or insertRow() methods are called to update the database.	 *	 * @param columnIndex	 *            the first column is 1, the second is 2, ...	 * @param x	 *            the new column value	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateByte(int columnIndex, byte x)			throws SQLException {		if (!this.onInsertRow) {			if (!this.doingUpdates) {				this.doingUpdates = true;				syncUpdate();			}			this.updater.setByte(columnIndex, x);		} else {			this.inserter.setByte(columnIndex, x);			this.thisRow.setColumnValue(columnIndex - 1, this.inserter					.getBytesRepresentation(columnIndex - 1));		}	}	/**	 * JDBC 2.0 Update a column with a byte value. The updateXXX() methods are	 * used to update column values in the current row, or the insert row. The	 * updateXXX() methods do not update the underlying database, instead the	 * updateRow() or insertRow() methods are called to update the database.	 *	 * @param columnName	 *            the name of the column	 * @param x	 *            the new column value	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateByte(String columnName, byte x)			throws SQLException {		updateByte(findColumn(columnName), x);	}	/**	 * JDBC 2.0 Update a column with a byte array value. The updateXXX() methods	 * are used to update column values in the current row, or the insert row.	 * The updateXXX() methods do not update the underlying database, instead	 * the updateRow() or insertRow() methods are called to update the database.	 *	 * @param columnIndex	 *            the first column is 1, the second is 2, ...	 * @param x	 *            the new column value	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateBytes(int columnIndex, byte[] x)			throws SQLException {		if (!this.onInsertRow) {			if (!this.doingUpdates) {				this.doingUpdates = true;				syncUpdate();			}			this.updater.setBytes(columnIndex, x);		} else {			this.inserter.setBytes(columnIndex, x);			this.thisRow.setColumnValue(columnIndex - 1, x);		}	}	/**	 * JDBC 2.0 Update a column with a byte array value. The updateXXX() methods	 * are used to update column values in the current row, or the insert row.	 * The updateXXX() methods do not update the underlying database, instead	 * the updateRow() or insertRow() methods are called to update the database.	 *	 * @param columnName	 *            the name of the column	 * @param x	 *            the new column value	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateBytes(String columnName, byte[] x)			throws SQLException {		updateBytes(findColumn(columnName), x);	}	/**	 * JDBC 2.0 Update a column with a character stream value. The updateXXX()	 * methods are used to update column values in the current row, or the	 * insert row. The updateXXX() methods do not update the underlying	 * database, instead the updateRow() or insertRow() methods are called to	 * update the database.	 *	 * @param columnIndex	 *            the first column is 1, the second is 2, ...	 * @param x	 *            the new column value	 * @param length	 *            the length of the stream	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateCharacterStream(int columnIndex,			java.io.Reader x, int length) throws SQLException {		if (!this.onInsertRow) {			if (!this.doingUpdates) {				this.doingUpdates = true;				syncUpdate();			}			this.updater.setCharacterStream(columnIndex, x, length);		} else {			this.inserter.setCharacterStream(columnIndex, x, length);			if (x == null) {				this.thisRow.setColumnValue(columnIndex - 1, null);			} else {				this.thisRow.setColumnValue(columnIndex - 1, STREAM_DATA_MARKER);			}		}	}	/**	 * JDBC 2.0 Update a column with a character stream value. The updateXXX()	 * methods are used to update column values in the current row, or the	 * insert row. The updateXXX() methods do not update the underlying	 * database, instead the updateRow() or insertRow() methods are called to	 * update the database.	 *	 * @param columnName	 *            the name of the column	 * @param reader	 *            the new column value	 * @param length	 *            of the stream	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateCharacterStream(String columnName,			java.io.Reader reader, int length) throws SQLException {		updateCharacterStream(findColumn(columnName), reader, length);	}	/**	 * @see ResultSetInternalMethods#updateClob(int, Clob)	 */	public void updateClob(int columnIndex, java.sql.Clob clob)			throws SQLException {		if (clob == null) {			updateNull(columnIndex);		} else {			updateCharacterStream(columnIndex, clob.getCharacterStream(),					(int) clob.length());		}	}	/**	 * JDBC 2.0 Update a column with a Date value. The updateXXX() methods are	 * used to update column values in the current row, or the insert row. The	 * updateXXX() methods do not update the underlying database, instead the	 * updateRow() or insertRow() methods are called to update the database.	 *	 * @param columnIndex	 *            the first column is 1, the second is 2, ...	 * @param x	 *            the new column value	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateDate(int columnIndex, java.sql.Date x)			throws SQLException {		if (!this.onInsertRow) {			if (!this.doingUpdates) {				this.doingUpdates = true;				syncUpdate();			}			this.updater.setDate(columnIndex, x);		} else {			this.inserter.setDate(columnIndex, x);			this.thisRow.setColumnValue(columnIndex - 1, this.inserter					.getBytesRepresentation(columnIndex - 1));		}	}	/**	 * JDBC 2.0 Update a column with a Date value. The updateXXX() methods are	 * used to update column values in the current row, or the insert row. The	 * updateXXX() methods do not update the underlying database, instead the	 * updateRow() or insertRow() methods are called to update the database.	 *	 * @param columnName	 *            the name of the column	 * @param x	 *            the new column value	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateDate(String columnName, java.sql.Date x)			throws SQLException {		updateDate(findColumn(columnName), x);	}	/**	 * JDBC 2.0 Update a column with a Double value. The updateXXX() methods are	 * used to update column values in the current row, or the insert row. The	 * updateXXX() methods do not update the underlying database, instead the	 * updateRow() or insertRow() methods are called to update the database.	 *	 * @param columnIndex	 *            the first column is 1, the second is 2, ...	 * @param x	 *            the new column value	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateDouble(int columnIndex, double x)			throws SQLException {		if (!this.onInsertRow) {			if (!this.doingUpdates) {				this.doingUpdates = true;				syncUpdate();			}			this.updater.setDouble(columnIndex, x);		} else {			this.inserter.setDouble(columnIndex, x);			this.thisRow.setColumnValue(columnIndex - 1, this.inserter					.getBytesRepresentation(columnIndex - 1));		}	}	/**	 * JDBC 2.0 Update a column with a double value. The updateXXX() methods are	 * used to update column values in the current row, or the insert row. The	 * updateXXX() methods do not update the underlying database, instead the	 * updateRow() or insertRow() methods are called to update the database.	 *	 * @param columnName	 *            the name of the column	 * @param x	 *            the new column value	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateDouble(String columnName, double x)			throws SQLException {		updateDouble(findColumn(columnName), x);	}	/**	 * JDBC 2.0 Update a column with a float value. The updateXXX() methods are	 * used to update column values in the current row, or the insert row. The	 * updateXXX() methods do not update the underlying database, instead the	 * updateRow() or insertRow() methods are called to update the database.	 *	 * @param columnIndex	 *            the first column is 1, the second is 2, ...	 * @param x	 *            the new column value	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateFloat(int columnIndex, float x)			throws SQLException {		if (!this.onInsertRow) {			if (!this.doingUpdates) {				this.doingUpdates = true;				syncUpdate();			}			this.updater.setFloat(columnIndex, x);		} else {			this.inserter.setFloat(columnIndex, x);			this.thisRow.setColumnValue(columnIndex - 1, this.inserter					.getBytesRepresentation(columnIndex - 1));		}	}	/**	 * JDBC 2.0 Update a column with a float value. The updateXXX() methods are	 * used to update column values in the current row, or the insert row. The	 * updateXXX() methods do not update the underlying database, instead the	 * updateRow() or insertRow() methods are called to update the database.	 *	 * @param columnName	 *            the name of the column	 * @param x	 *            the new column value	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateFloat(String columnName, float x)			throws SQLException {		updateFloat(findColumn(columnName), x);	}	/**	 * JDBC 2.0 Update a column with an integer value. The updateXXX() methods	 * are used to update column values in the current row, or the insert row.	 * The updateXXX() methods do not update the underlying database, instead	 * the updateRow() or insertRow() methods are called to update the database.	 *	 * @param columnIndex	 *            the first column is 1, the second is 2, ...	 * @param x	 *            the new column value	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateInt(int columnIndex, int x)			throws SQLException {		if (!this.onInsertRow) {			if (!this.doingUpdates) {				this.doingUpdates = true;				syncUpdate();			}			this.updater.setInt(columnIndex, x);		} else {			this.inserter.setInt(columnIndex, x);			this.thisRow.setColumnValue(columnIndex - 1, this.inserter					.getBytesRepresentation(columnIndex - 1));		}	}	/**	 * JDBC 2.0 Update a column with an integer value. The updateXXX() methods	 * are used to update column values in the current row, or the insert row.	 * The updateXXX() methods do not update the underlying database, instead	 * the updateRow() or insertRow() methods are called to update the database.	 *	 * @param columnName	 *            the name of the column	 * @param x	 *            the new column value	 *	 * @exception SQLException	 *                if a database-access error occurs	 */	public synchronized void updateInt(String columnName, int x)			throws SQLException {		updateInt(findColumn(columnName), x);	}	/**	 * JDBC 2.0 Update a column with a long value. The updateXXX() methods are	 *

⌨️ 快捷键说明

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