## org.eclipse.datatools.connectivity.drivers
Class DriverInstance

    java.lang.Object
      org.eclipse.datatools.connectivity.drivers.DriverInstance

    public class DriverInstance

extends java.lang.Object

Collection of Driver properties

Author:
  brianf

Field Summary
`static java.lang.String` `ATTR_CLASS`
`static java.lang.String` `ATTR_DRIVERTEMPLATEID`
`static java.lang.String` `ELEM_MIGRATION`

Constructor Summary
`DriverInstance(IPropertySet instance)` Basic constructor.
`DriverInstance(TemplateDescriptor template, IPropertySet instance)` Constructor to pass an explicit template along with the property set.

Method Summary
`java.lang.ClassLoader` `createClassLoader(java.lang.ClassLoader parentCL)` Creates a ClassLoader for the Driver Instance and loads the files from the jar list.
`boolean` `equals(java.lang.Object obj)`
`java.lang.ClassLoader` `getClassLoader()` Returns a default class loader (no parent) and loads the files from the jar list.
`java.lang.String` `getId()` Return the id of the Driver instance
`java.lang.String` `getJarList()` Return the jar list for the driver instance as a comma-delimited string.
`java.lang.String[]` `getJarListAsArray()` Return the jar list for the driver instance as an array.
`IDriverMigrator` `getMigrator(IConfigurationElement element)` Retrieves the migrator for the incoming configuration element.
`java.lang.String` `getName()` Return the name of the Driver instance
`java.lang.String` `getNamedProperty(java.lang.String name)` Retrieve a property value by name.
`java.lang.String` `getNamedPropertyByID(java.lang.String id)` Retrieve a property value by property id
`java.lang.String` `getProperty(java.lang.String id)` Retrieve a property value by property id.
`IPropertySet` `getPropertySet()` Returns the actual property set for the driver instance.
`TemplateDescriptor` `getTemplate()` Get the Template the Driver Instance was based on.
`void` `handleException(java.lang.Throwable exception, java.lang.String message)` Logs an exception
`int` `hashCode()`
`boolean` `migrate()`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ELEM_MIGRATION

    public static final java.lang.String ELEM_MIGRATION

See Also:
  Constant Field Values

### ATTR_CLASS

    public static final java.lang.String ATTR_CLASS

See Also:
  Constant Field Values

### ATTR_DRIVERTEMPLATEID

    public static final java.lang.String ATTR_DRIVERTEMPLATEID

See Also:
  Constant Field Values

Constructor Detail

### DriverInstance

    public DriverInstance(IPropertySet instance)

  Basic constructor. Picks up template details from the property set.

  Parameters:
    `instance` - An instance of an IPropertySet object

### DriverInstance

    public DriverInstance(TemplateDescriptor template,
                          IPropertySet instance)

  Constructor to pass an explicit template along with the property set.

  Parameters:
    `template` - TemplateDescriptor
    `instance` - IPropertySet

Method Detail

### getName

    public java.lang.String getName()

  Return the name of the Driver instance

  Returns:
    String Driver name

### getId

    public java.lang.String getId()

  Return the id of the Driver instance

  Returns:
    String Driver ID

### getJarList

    public java.lang.String getJarList()

  Return the jar list for the driver instance as a comma-delimited string.

  Returns:
    String Comma-delimited jar list

### getJarListAsArray

    public java.lang.String[] getJarListAsArray()

  Return the jar list for the driver instance as an array.

  Returns:
    String[] String array of jar paths

### getNamedProperty

    public java.lang.String getNamedProperty(java.lang.String name)

  Retrieve a property value by name.

  Parameters:
    `name` - Property name
  Returns:
    String Property value

### getNamedPropertyByID

    public java.lang.String getNamedPropertyByID(java.lang.String id)

  Retrieve a property value by property id

  Parameters:
    `id` - Property id
  Returns:
    String Property value

### getProperty

    public java.lang.String getProperty(java.lang.String id)

  Retrieve a property value by property id.

  Parameters:
    `id` - Property ID
  Returns:
    String Property value

### getTemplate

    public TemplateDescriptor getTemplate()

  Get the Template the Driver Instance was based on.

  Returns:
    TemplateDescriptor Template information

### getPropertySet

    public IPropertySet getPropertySet()

  Returns the actual property set for the driver instance.

  Returns:
    IPropertySet

### getClassLoader

    public java.lang.ClassLoader getClassLoader()
                                         throws java.lang.Exception

  Returns a default class loader (no parent) and loads the files from the jar list.

  Returns:
    ClassLoader URLClassLoader with jar list pre-loaded
  Throws:
    `java.lang.Exception`

### createClassLoader

    public java.lang.ClassLoader createClassLoader(java.lang.ClassLoader parentCL)
                                            throws java.lang.Exception

  Creates a ClassLoader for the Driver Instance and loads the files from the jar list.

  Parameters:
    `parentCL` - ClassLoader parent
  Returns:
    ClassLoader URLClassLoader with jar list pre-loaded
  Throws:
    `java.lang.Exception`

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### handleException

    public void handleException(java.lang.Throwable exception,
                                java.lang.String message)

  Logs an exception

  Parameters:
    `exception` -
    `message` -

### migrate

    public boolean migrate()

### getMigrator

    public IDriverMigrator getMigrator(IConfigurationElement element)

  Retrieves the migrator for the incoming configuration element. The config element must be from the TemplateDescriptor used to define the Driver.

  Parameters:
    `element` -
  Returns:

Copyright © 2006 -- 2008 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.