Class DatabaseAccessPanel

All Implemented Interfaces:
ActionListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class DatabaseAccessPanel extends JPanel implements ActionListener, KeyListener
Swing Tool for managing a JDBC database.

             Usage: java DatabaseManagerSwing 
             where parameters include:
              --db_conn <classname>  name of the connectionpool
              --driver <classname>  jdbc driver class
              --url <name>          jdbc url
              --user <name>         username used for connection
              --password <password> password for this user
 
Note that the sys-table switch will not work for Oracle, because Oracle does not categorize their system tables correctly in the JDBC Metadata. New class based on Hypersonic SQL original
Author:
dmarshall@users, Andreas Enders@uni-bonn.de
See Also:
  • Constructor Details

    • DatabaseAccessPanel

      public DatabaseAccessPanel(FWObservable aObservable)
    • DatabaseAccessPanel

      public DatabaseAccessPanel(FWObservable aObservable, org.jdom2.Element aFormElement)
  • Method Details

    • init

      public void init()
    • connect

      public void connect(Connection aConnection)
      This stuff is all quick, except for the refreshTree(). This unit can be kicked off in main Gui thread. The refreshTree will be backgrounded and this method will return.
      Parameters:
      aConnection -
    • keyPressed

      public void keyPressed(KeyEvent k)
      Specified by:
      keyPressed in interface KeyListener
    • keyReleased

      public void keyReleased(KeyEvent k)
      Specified by:
      keyReleased in interface KeyListener
    • keyTyped

      public void keyTyped(KeyEvent k)
      Specified by:
      keyTyped in interface KeyListener
    • actionPerformed

      public void actionPerformed(ActionEvent ev)
      Specified by:
      actionPerformed in interface ActionListener
    • setWaiting

      public void setWaiting(String description)
    • executeCurrentSQL

      public void executeCurrentSQL()
      Schedules to run in a Gui-safe thread
    • refreshTree

      protected void refreshTree()
      Schedules to run in a Gui-safe thread
    • directRefreshTree

      protected void directRefreshTree()
      Clear all existing nodes from the tree model and rebuild from scratch. This method executes in current thread
    • getRowCounts

      protected int[] getRowCounts(Vector inTable, Vector inSchema) throws Exception
      Throws:
      Exception
    • setStatementText

      public void setStatementText(String aString)
      Parameters:
      aString -
    • getStatementText

      public String getStatementText()
      getting
      Returns:
      recent sql string
    • setStatementChanged

      public void setStatementChanged()
      setting Statement to Changed: overwrite this method if other things have to be done.