logicalhandle.java

来自「SearchPathServer」· Java 代码 · 共 536 行 · 第 1/2 页

JAVA
536
字号
                return mc.getWarnings();
            } catch (SQLException sqlException) {
                mpc.callListener(2, sqlException);
                throw sqlException;
            }       
        }    
    }
    
    /**
    * Passes call to method on physical connection instance.  Notifies listeners of
    * any caught exceptions before re-throwing to client.
    * 
    * @exception java.sql.SQLException
    */
    
    public boolean isClosed() throws java.sql.SQLException {
        return (closed || mc.isClosed());   
    }
    
    /**
    * Passes call to method on physical connection instance.  Notifies listeners of
    * any caught exceptions before re-throwing to client.
    * 
    * @exception java.sql.SQLException
    */
    
    public boolean isReadOnly() throws java.sql.SQLException {
        if (closed) {
            throw new SQLException(invalidHandleStr);
        } else {    
            try {
                return mc.isReadOnly();
            } catch (SQLException sqlException) {
                mpc.callListener(2, sqlException);
                throw sqlException;
            }       
        }    
    }
    
    /**
    * Passes call to method on physical connection instance.  Notifies listeners of
    * any caught exceptions before re-throwing to client.
    * 
    * @exception java.sql.SQLException
    */
    
    public String nativeSQL(String sql) throws java.sql.SQLException {
        if (closed) {
            throw new SQLException(invalidHandleStr);
        } else {    
            try {
                return mc.nativeSQL(sql);
            } catch (SQLException sqlException) {
                mpc.callListener(2, sqlException);
                throw sqlException;
            }       
        }    
    }
    
    /**
    * Passes call to method on physical connection instance.  Notifies listeners of
    * any caught exceptions before re-throwing to client.
    * 
    * @exception java.sql.SQLException
    */
    
    public java.sql.CallableStatement prepareCall(String sql) 
    throws java.sql.SQLException {
        if (closed) {
            throw new SQLException(invalidHandleStr);
        } else {    
            try {
                return mc.prepareCall(sql);
            } catch (SQLException sqlException) {
                mpc.callListener(2, sqlException);
                throw sqlException;
            }       
        }    
    }
    
    /**
    * Passes call to method on physical connection instance.  Notifies listeners of
    * any caught exceptions before re-throwing to client.
    * 
    * @exception java.sql.SQLException
    */
    
    public java.sql.CallableStatement prepareCall(String sql, 
                                                  int resultSetType,
                                                  int resultSetConcurrency) 
    throws SQLException {
        if (closed) {
            throw new SQLException(invalidHandleStr);
        } else {    
            try {
                return mc.prepareCall(sql, resultSetType, resultSetConcurrency);
            } catch (SQLException sqlException) {
                mpc.callListener(2, sqlException);
                throw sqlException;
            }       
        }    
    }
    
    /**
    * Passes call to method on physical connection instance.  Notifies listeners of
    * any caught exceptions before re-throwing to client.
    * 
    * @exception java.sql.SQLException
    */
    
    public java.sql.PreparedStatement prepareStatement(String sql) 
    throws java.sql.SQLException {
        if (closed) {
            throw new SQLException(invalidHandleStr);
        } else {    
            try {
                return mc.prepareStatement(sql);
            } catch (SQLException sqlException) {
                mpc.callListener(2, sqlException);
                throw sqlException;
            }       
        }    
    }
    
    /**
    * Passes call to method on physical connection instance.  Notifies listeners of
    * any caught exceptions before re-throwing to client.
    * 
    * @exception java.sql.SQLException
    */
    
    public java.sql.PreparedStatement prepareStatement(String sql, 
                                                       int resultSetType,
                                                       int resultSetConcurrency) 
    throws SQLException {
        if (closed) {
            throw new SQLException(invalidHandleStr);
        } else {    
            try {
                return mc.prepareStatement(sql, resultSetType, resultSetConcurrency);
            } catch (SQLException sqlException) {
                mpc.callListener(2, sqlException);
                throw sqlException;
            }       
        }    
    }
    
    /**
    * Passes call to method on physical connection instance.  Notifies listeners of
    * any caught exceptions before re-throwing to client.
    * 
    * @exception java.sql.SQLException
    */
    
    public void rollback() throws java.sql.SQLException {
        if (closed) {
            throw new SQLException(invalidHandleStr);
        } else {    
            try {
                mc.rollback();
            } catch (SQLException sqlException) {
                mpc.callListener(2, sqlException);
                throw sqlException;
            }       
        }    
    }
    
    /**
    * Passes call to method on physical connection instance.  Notifies listeners of
    * any caught exceptions before re-throwing to client.
    * 
    * @exception java.sql.SQLException
    */
    
    public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException {
        if (closed) {
            throw new SQLException(invalidHandleStr);
        } else {    
            try {
                mc.setAutoCommit(autoCommit);
            } catch (SQLException sqlException) {
                mpc.callListener(2, sqlException);
                throw sqlException;
            }       
        }    
    }
    
    /**
    * Passes call to method on physical connection instance.  Notifies listeners of
    * any caught exceptions before re-throwing to client.
    * 
    * @exception java.sql.SQLException
    */
    
    public void setCatalog(String catalog) throws java.sql.SQLException {
        if (closed) {
            throw new SQLException(invalidHandleStr);
        } else {    
            try {
                mc.setCatalog(catalog);
            } catch (SQLException sqlException) {
                mpc.callListener(2, sqlException);
                throw sqlException;
            }       
        }    
    }
    
    /**
    * Passes call to method on physical connection instance.  Notifies listeners of
    * any caught exceptions before re-throwing to client.
    * 
    * @exception java.sql.SQLException
    */
    
    public void setReadOnly(boolean readOnly) throws java.sql.SQLException {
        if (closed) {
            throw new SQLException(invalidHandleStr);
        } else {    
            try {
                mc.setReadOnly(readOnly);
            } catch (SQLException sqlException) {
                mpc.callListener(2, sqlException);
                throw sqlException;
            }       
        }    
    }
    
    /**
    * Passes call to method on physical connection instance.  Notifies listeners of
    * any caught exceptions before re-throwing to client.
    * 
    * @exception java.sql.SQLException
    */
    
    public void setTransactionIsolation(int level) throws java.sql.SQLException {
        if (closed) {
            throw new SQLException(invalidHandleStr);
        } else {    
            try {
                mc.setTransactionIsolation(level);
            } catch (SQLException sqlException) {
                mpc.callListener(2, sqlException);
                throw sqlException;
            }       
        }    
    }
    
    /**
    * Passes call to method on physical connection instance.  Notifies listeners of
    * any caught exceptions before re-throwing to client.
    * 
    * @exception java.sql.SQLException
    */
    
    public void setTypeMap(java.util.Map map) throws SQLException {
        if (closed) {
            throw new SQLException(invalidHandleStr);
        } else {    
            try {
                mc.setTypeMap(map);
            } catch (SQLException sqlException) {
                mpc.callListener(2, sqlException);
                throw sqlException;
            }       
        }    
    }
}

⌨️ 快捷键说明

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