org.netbeans.modules.db/1 1.44.1 30

org.netbeans.api.db.explorer
Class JDBCDriver

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

public final class JDBCDriver
extends Object

Encapsulates a JDBC driver.


Method Summary
static JDBCDriver create(String name, String displayName, String clazz, URL[] urls)
          Creates a new JDBCDriver instance.
 String getClassName()
          Returns the JDBC driver class name.
 String getDisplayName()
          Returns the display name of the driver (used for example to display the driver in the UI).
 Driver getDriver()
          Get a reference to the underlying java.sql.Driver for this JDBCDriver.
 String getName()
          Return the programmatic driver name.
 URL[] getURLs()
          Returns the array of the JDBC driver files URLs.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static JDBCDriver create(String name,
                                String displayName,
                                String clazz,
                                URL[] urls)
Creates a new JDBCDriver instance.

Parameters:
name - the programmatic name of the driver; must not be null.
displayName - the display name of the driver (used for example to display the driver in the UI); must not be null.
clazz - the JDBC driver class; must not be null.
urls - the array of the JDBC driver files URLs; must not be null.
Throws:
NullPointerException - if any of the parameters is null.

getURLs

public URL[] getURLs()
Returns the array of the JDBC driver files URLs.

Returns:
the non-null array of the JDBC driver files URLs.

getClassName

public String getClassName()
Returns the JDBC driver class name.

Returns:
the JDBC driver class name.

getDisplayName

public String getDisplayName()
Returns the display name of the driver (used for example to display the driver in the UI).

Returns:
the display name of the driver.

getName

public String getName()
Return the programmatic driver name.

Returns:
the programmatic driver name.

getDriver

public Driver getDriver()
                 throws DatabaseException
Get a reference to the underlying java.sql.Driver for this JDBCDriver. This can be useful if you want to use the registered drivers to manage your own JDBC connections independent of the Database Explorer

Returns:
an instance of the java.sql.Driver for this JDBCDriver
Throws:
DatabaseException - if there was an error trying to get the driver instance
Since:
1.28

toString

public String toString()
Overrides:
toString in class Object

org.netbeans.modules.db/1 1.44.1 30

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.