protected boolean _load ( ) { java . sql . ResultSet rs = null ; try { // This synchronization is necessary for Oracle JDBC drivers 8.1.7, 9.0.1, 9.2.0.1 // The documentation says synchronization is done within the driver, but they // must have overlooked something. Without the lock we'd get mysterious error // messages. synchronized ( getDbMeta ( ) ) { getDbMetaTreeModel ( ) . setStatusBarMessage ( "Reading columns for table " + getSchema ( ) . getCatalog ( ) . getCatalogName ( ) + "." + getSchema ( ) . getSchemaName ( ) + "." + getTableName ( ) ) ; rs = getDbMeta ( ) . getColumns ( getSchema ( ) . getCatalog ( ) . getCatalogName ( ) , getSchema ( ) . getSchemaName ( ) , getTableName ( ) , "%" ) ; final java . util . ArrayList alNew = new java . util . ArrayList ( ) ; while ( rs . next ( ) ) { alNew . add ( new DBMetaColumnNode ( getDbMeta ( ) , getDbMetaTreeModel ( ) , DBMetaTableNode . this , rs . getString ( "COLUMN_NAME" ) ) ) ; } alChildren = alNew ; javax . swing . SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { getDbMetaTreeModel ( ) . nodeStructureChanged ( DBMetaTableNode . this ) ; } } ) ; rs . close ( ) ; } } catch ( java . sql . SQLException sqlEx ) { this . getDbMetaTreeModel ( ) . reportSqlError ( "Error retrieving columns" , sqlEx ) ; try { if ( rs != null ) rs . close ( ) ; } catch ( java . sql . SQLException sqlEx2 ) { this . getDbMetaTreeModel ( ) . reportSqlError ( "Error retrieving columns" , sqlEx2 ) ; } return false ; } return true ; }
Loads the columns for this table into the alChildren list .