com.anthonyeden.lib.db
Class DriverDescriptor

java.lang.Object
  extended bycom.anthonyeden.lib.db.DriverDescriptor

public class DriverDescriptor
extends java.lang.Object

Descriptor for a JDBC driver.

Author:
Anthony Eden

Constructor Summary
DriverDescriptor(java.lang.String className, java.lang.String protocol)
          Construct a new DriverDescriptor for the given driver class name and protocol.
DriverDescriptor(java.lang.String className, java.lang.String protocol, java.lang.String displayName)
          Construct a new DriverDescriptor for the given driver name, protocol and display name.
 
Method Summary
static void addAvailableDriver(DriverDescriptor descriptor)
          Add a DriverDescriptor to the shared list of available drivers.
static void addAvailableDriver(java.lang.String className, java.lang.String protocol)
          Add a driver to the list of available drivers.
static void addAvailableDriver(java.lang.String className, java.lang.String protocol, java.lang.String displayName)
          Add a driver to the list of available drivers.
static java.util.List getAvailableDrivers()
          Get a List of all available drivers.
 java.lang.String getClassName()
          Get the driver class name.
 java.lang.String getDisplayName()
          Get the user-readable display name.
 java.lang.String getProtocol()
          Get the JDBC protocol.
 void setClassName(java.lang.String className)
          Set the driver class name.
 void setDisplayName(java.lang.String displayName)
          Set the user-readable display name.
 void setProtocol(java.lang.String protocol)
          Set the JDBC protocol.
 java.lang.String toString()
          Return a String representation of the driver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DriverDescriptor

public DriverDescriptor(java.lang.String className,
                        java.lang.String protocol)
Construct a new DriverDescriptor for the given driver class name and protocol.

Parameters:
className - The driver class name
protocol - The protocol

DriverDescriptor

public DriverDescriptor(java.lang.String className,
                        java.lang.String protocol,
                        java.lang.String displayName)
Construct a new DriverDescriptor for the given driver name, protocol and display name.

Parameters:
className - The driver class name
protocol - The protocol
displayName - The display name
Method Detail

getDisplayName

public java.lang.String getDisplayName()
Get the user-readable display name.

Returns:
The display name

setDisplayName

public void setDisplayName(java.lang.String displayName)
Set the user-readable display name.

Parameters:
displayName - The display name

getClassName

public java.lang.String getClassName()
Get the driver class name.

Returns:
The driver class name

setClassName

public void setClassName(java.lang.String className)
Set the driver class name.

Parameters:
className - The driver class name

getProtocol

public java.lang.String getProtocol()
Get the JDBC protocol.

Returns:
The JDBC protocol

setProtocol

public void setProtocol(java.lang.String protocol)
Set the JDBC protocol.

Parameters:
protocol - The JDBC protocol

toString

public java.lang.String toString()
Return a String representation of the driver.

Returns:
A String

addAvailableDriver

public static void addAvailableDriver(DriverDescriptor descriptor)
Add a DriverDescriptor to the shared list of available drivers.

Parameters:
descriptor - The DriverDescriptor

addAvailableDriver

public static void addAvailableDriver(java.lang.String className,
                                      java.lang.String protocol)
Add a driver to the list of available drivers. This method will use the given arguments to create a new DriverDescriptor.

Parameters:
className - The driver class name
protocol - The protocol

addAvailableDriver

public static void addAvailableDriver(java.lang.String className,
                                      java.lang.String protocol,
                                      java.lang.String displayName)
Add a driver to the list of available drivers. This method will use the given arguments to create a new DriverDescriptor.

Parameters:
className - The driver class name
protocol - The protocol
displayName - The display name

getAvailableDrivers

public static java.util.List getAvailableDrivers()
Get a List of all available drivers.

Returns:
A List of DriverDescriptors


Copyright (c) 2000-2003 Anthony Eden. All Rights Reserved.