?? statementwrapper.java
字號:
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return 0;
}
/* (non-Javadoc)
* @see java.sql.Statement#getResultSetHoldability()
*/
public int getResultSetHoldability() throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.getResultSetHoldability();
} else {
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return Statement.CLOSE_CURRENT_RESULT;
}
/* (non-Javadoc)
* @see java.sql.Statement#getResultSetType()
*/
public int getResultSetType() throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.getResultSetType();
} else {
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return ResultSet.TYPE_FORWARD_ONLY;
}
/* (non-Javadoc)
* @see java.sql.Statement#getUpdateCount()
*/
public int getUpdateCount() throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.getUpdateCount();
} else {
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return -1;
}
/* (non-Javadoc)
* @see java.sql.Statement#getWarnings()
*/
public SQLWarning getWarnings() throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.getWarnings();
} else {
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return null;
}
/* (non-Javadoc)
* @see java.sql.Statement#addBatch(java.lang.String)
*/
public void addBatch(String sql) throws SQLException {
try {
if (this.wrappedStmt != null) {
this.wrappedStmt.addBatch(sql);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
}
/* (non-Javadoc)
* @see java.sql.Statement#cancel()
*/
public void cancel() throws SQLException {
try {
if (this.wrappedStmt != null) {
this.wrappedStmt.cancel();
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
}
/* (non-Javadoc)
* @see java.sql.Statement#clearBatch()
*/
public void clearBatch() throws SQLException {
try {
if (this.wrappedStmt != null) {
this.wrappedStmt.clearBatch();
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
}
/* (non-Javadoc)
* @see java.sql.Statement#clearWarnings()
*/
public void clearWarnings() throws SQLException {
try {
if (this.wrappedStmt != null) {
this.wrappedStmt.clearWarnings();
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
}
/* (non-Javadoc)
* @see java.sql.Statement#close()
*/
public void close() throws SQLException {
try {
if (this.wrappedStmt != null) {
this.wrappedStmt.close();
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
} finally {
this.wrappedStmt = null;
this.pooledConnection = null;
}
}
/* (non-Javadoc)
* @see java.sql.Statement#execute(java.lang.String, int)
*/
public boolean execute(String sql, int autoGeneratedKeys)
throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.execute(sql, autoGeneratedKeys);
} else {
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return false; // we actually never get here, but the compiler can't figure
// that out
}
/* (non-Javadoc)
* @see java.sql.Statement#execute(java.lang.String, int[])
*/
public boolean execute(String sql, int[] columnIndexes)
throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.execute(sql, columnIndexes);
} else {
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return false; // we actually never get here, but the compiler can't figure
// that out
}
/* (non-Javadoc)
*/
public boolean execute(String sql, String[] columnNames)
throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.execute(sql, columnNames);
} else {
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return false; // we actually never get here, but the compiler can't figure
// that out
}
/* (non-Javadoc)
* @see java.sql.Statement#execute(java.lang.String)
*/
public boolean execute(String sql) throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.execute(sql);
} else {
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return false; // we actually never get here, but the compiler can't figure
// that out
}
/* (non-Javadoc)
* @see java.sql.Statement#executeBatch()
*/
public int[] executeBatch() throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.executeBatch();
} else {
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return null; // we actually never get here, but the compiler can't figure
// that out
}
/* (non-Javadoc)
* @see java.sql.Statement#executeQuery(java.lang.String)
*/
public ResultSet executeQuery(String sql) throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.executeQuery(sql);
} else {
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return null; // we actually never get here, but the compiler can't figure
// that out
}
/* (non-Javadoc)
* @see java.sql.Statement#executeUpdate(java.lang.String, int)
*/
public int executeUpdate(String sql, int autoGeneratedKeys)
throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.executeUpdate(sql, autoGeneratedKeys);
} else {
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return -1; // we actually never get here, but the compiler can't figure
// that out
}
/* (non-Javadoc)
* @see java.sql.Statement#executeUpdate(java.lang.String, int[])
*/
public int executeUpdate(String sql, int[] columnIndexes)
throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.executeUpdate(sql, columnIndexes);
} else {
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return -1; // we actually never get here, but the compiler can't figure
// that out
}
/* (non-Javadoc)
* @see java.sql.Statement#executeUpdate(java.lang.String, java.lang.String[])
*/
public int executeUpdate(String sql, String[] columnNames)
throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.executeUpdate(sql, columnNames);
} else {
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return -1; // we actually never get here, but the compiler can't figure
// that out
}
/* (non-Javadoc)
* @see java.sql.Statement#executeUpdate(java.lang.String)
*/
public int executeUpdate(String sql) throws SQLException {
try {
if (this.wrappedStmt != null) {
return this.wrappedStmt.executeUpdate(sql);
} else {
throw new SQLException("Statement already closed",
SQLError.SQL_STATE_ILLEGAL_ARGUMENT);
}
} catch (SQLException sqlEx) {
checkAndFireConnectionError(sqlEx);
}
return -1; // we actually never get here, but the compiler can't figure
// that out
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -