Code example for Connection

Methods: toStringsetCatalog

0
        } 
    } 
 
    @Override 
    public void setCatalog(String catalog) throws SQLException
    { checkOpen(); try { _conn.setCatalog(catalog); } catch (SQLException e) { handleException(e); } }
 
    @Override 
    public void setReadOnly(boolean readOnly) throws SQLException {
        checkOpen(); 
        try { 
            _conn.setReadOnly(readOnly);
            if (_cacheState) {
                _readOnlyCached = Boolean.valueOf(readOnly);
            } 
        } catch (SQLException e) {
            _readOnlyCached = null;
            handleException(e);
        } 
    } 
 
 
    @Override 
    public void setTransactionIsolation(int level) throws SQLException {
        checkOpen(); 
        try { 
            _conn.setTransactionIsolation(level);
        } catch (SQLException e) {
            handleException(e);
        } 
    } 
 
 
    @Override 
    public void setTypeMap(Map<String,Class<?>> map) throws SQLException {
        checkOpen(); 
        try { 
            _conn.setTypeMap(map);
        } catch (SQLException e) {
            handleException(e);
        } 
    } 
 
 
    @Override 
    public boolean isClosed() throws SQLException { 
        return _closed || _conn.isClosed();
    } 
 
    protected void checkOpen() throws SQLException { 
        if(_closed) {
            if (null != _conn) {
                String label = "";
                try { 
                    label = _conn.toString();
                } catch (Exception ex) {
                    // ignore, leave label empty 
                } 
                throw new SQLException
                    ("Connection " + label + " is closed.");