## org.eclipse.datatools.sqltools.core
Class SQLToolsFacade

    java.lang.Object
      org.eclipse.datatools.sqltools.core.SQLToolsFacade

public class SQLToolsFacade
extends java.lang.Object

This should be the central place to query about contributed `SQLDevToolsConfiguration`s. Unlike `SQLDevToolsConfigRegistry`, the default `SQLDevToolsConfiguration` will be used if no registered `SQLDevToolsConfiguration`.

Author:
  Hui Cao

Method Summary
`static SQLDevToolsConfiguration` `getConfiguration(DatabaseIdentifier databaseIdentifier, DatabaseVendorDefinitionId vendorId)` Gets the `SQLDevToolsConfiguration` object.
`static SQLDevToolsConfiguration` `getConfigurationByDBDefName(java.lang.String dbDefName)` Gets the `SQLDevToolsConfiguration` object by the database definition name.
`static SQLDevToolsConfiguration` `getConfigurationByProfileName(java.lang.String profileName)` Gets the `SQLDevToolsConfiguration` object by the connection profile name.
`static SQLDevToolsConfiguration` `getConfigurationByVendorIdentifier(DatabaseVendorDefinitionId vendorId)` Gets the `SQLDevToolsConfiguration` object by the `DatabaseVendorDefinitionId` object
`static java.util.Collection` `getConfigurations()` Gets all the contributed database factories
`static SQLDevToolsConfiguration` `getDefaultConfiguration()` Gets the default `SQLDevToolsConfiguration` object, which is contributed via the "isDefault" attribute of the "dbConfiguration" extension point, or if there's no such contribution, will use SQLDevToolsConfiguration.getDefaultInstance().
`static SQLToolsFacade` `getInstance()` Singleton
`static java.util.Collection` `getSupportedDBDefinitionNames()` Returns the database definition names which has associated `SQLDevToolsConfiguration`s.

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

Method Detail

### getInstance

    public static SQLToolsFacade getInstance()

  Singleton

  Returns:

### getConfigurations

    public static java.util.Collection getConfigurations()

  Gets all the contributed database factories

  Returns:

### getSupportedDBDefinitionNames

    public static java.util.Collection getSupportedDBDefinitionNames()

  Returns the database definition names which has associated `SQLDevToolsConfiguration`s.

  Returns:
    Full database definition names including product name and version

### getConfigurationByDBDefName

    public static SQLDevToolsConfiguration getConfigurationByDBDefName(java.lang.String dbDefName)

  Gets the `SQLDevToolsConfiguration` object by the database definition name.

  Parameters:
    `dbDefName` - database definition name, which is product name appended by "_" and version.
  Returns:
    `SQLDevToolsConfiguration` object

### getConfigurationByVendorIdentifier

    public static SQLDevToolsConfiguration getConfigurationByVendorIdentifier(DatabaseVendorDefinitionId vendorId)

  Gets the `SQLDevToolsConfiguration` object by the `DatabaseVendorDefinitionId` object

  Returns:
    `SQLDevToolsConfiguration` object

### getConfigurationByProfileName

    public static SQLDevToolsConfiguration getConfigurationByProfileName(java.lang.String profileName)

  Gets the `SQLDevToolsConfiguration` object by the connection profile name. Since different versions of a database may use the same connection profile provider id, we'll compare the real version of the server with the version string declared for the `SQLDevToolsConfiguration` and finds the most suitable one.

  Parameters:
    `profileName` - connection profile name
  Returns:
    `SQLDevToolsConfiguration` object

### getConfiguration

    public static SQLDevToolsConfiguration getConfiguration(DatabaseIdentifier databaseIdentifier,
                                                            DatabaseVendorDefinitionId vendorId)

  Gets the `SQLDevToolsConfiguration` object. This is a utility method for getDBFactoryByProfileName(String profileName) and getDBFactoryByDBName(String dbName). It will try to use the first parameter then the second.

  Parameters:
    `databaseIdentifier` - `DatabaseIdentifier` which contains connection profile name, can be null
  Returns:
    `SQLDevToolsConfiguration` object

### getDefaultConfiguration

    public static SQLDevToolsConfiguration getDefaultConfiguration()

  Gets the default `SQLDevToolsConfiguration` object, which is contributed via the "isDefault" attribute of the "dbConfiguration" extension point, or if there's no such contribution, will use SQLDevToolsConfiguration.getDefaultInstance().

  Returns:
    default `SQLDevToolsConfiguration` object. Will never be null.

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