站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

JDBCDriverManager (Database Explorer) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.db/0 1.20.0 4

org.netbeans.api.db.explorer
Class JDBCDriverManager

java.lang.Object
  extended by org.netbeans.api.db.explorer.JDBCDriverManager

public final class JDBCDriverManager
extends Object

This class manages the list of JDBC drivers registered in the Database Explorer.


Method Summary
 void addDriver(JDBCDriver driver)
          Adds a new JDBC driver.
 void addDriverListener(JDBCDriverListener listener)
          Registers a JDBCDriverListener.
static JDBCDriverManager getDefault()
          Gets the JDBCDriverManager singleton instance.
 JDBCDriver[] getDrivers()
          Gets the registered JDBC drivers.
 JDBCDriver[] getDrivers(String drvClass)
          Gets the registered JDBC drivers with the specified class name.
 void removeDriver(JDBCDriver driver)
          Removes a JDBC driver.
 void removeDriverListener(JDBCDriverListener listener)
          Unregisters the specified JDBCDriverListener.
 void showAddDriverDialog()
          Shows the Add Driver dialog, allowing the user to add a new JDBC driver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefault

public static JDBCDriverManager getDefault()
Gets the JDBCDriverManager singleton instance.

Returns:
the JDBCDriverManager singleton instance.

getDrivers

public JDBCDriver[] getDrivers()
Gets the registered JDBC drivers.

Returns:
a non-null array of JDBCDriver instances.

getDrivers

public JDBCDriver[] getDrivers(String drvClass)
Gets the registered JDBC drivers with the specified class name.

Parameters:
drvClass - driver class name; must not be null.
Returns:
a non-null array of JDBCDriver instances with the specified class name.
Throws:
NullPointerException - if the specified class name is null.

addDriver

public void addDriver(JDBCDriver driver)
               throws DatabaseException
Adds a new JDBC driver.

Parameters:
driver - the JDBCDriver instance describing the driver to be added; must not be null.
Throws:
NullPointerException - if the specified driver is null. DatabaseException if an error occurred while adding the driver.
DatabaseException

removeDriver

public void removeDriver(JDBCDriver driver)
                  throws DatabaseException
Removes a JDBC driver.

Parameters:
driver - the JDBCDriver instance to be removed.
Throws:
DatabaseException - if an error occurred while adding the driver.

showAddDriverDialog

public void showAddDriverDialog()
Shows the Add Driver dialog, allowing the user to add a new JDBC driver.


addDriverListener

public void addDriverListener(JDBCDriverListener listener)
Registers a JDBCDriverListener.


removeDriverListener

public void removeDriverListener(JDBCDriverListener listener)
Unregisters the specified JDBCDriverListener.


org.netbeans.modules.db/0 1.20.0 4

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.