org.eclipse.datatools.sqltools.core
Class SQLToolsFacade

java.lang.Object
  extended byorg.eclipse.datatools.sqltools.core.SQLToolsFacade

public class SQLToolsFacade
extends java.lang.Object

This should be the central place to query about contributed IDBFactorys. Unlike DatabaseFactoryRegistry, a DefaultDBFactory will be used if no registered IDBFactory.

Author:
Hui Cao

Method Summary
static java.util.Collection getDBFactories()
          Gets all the contributed database factories
static IDBFactory getDBFactory(DatabaseIdentifier databaseIdentifier, DatabaseVendorDefinitionId vendorId)
          Gets the IDBFactory object.
static IDBFactory getDBFactoryByDBDefName(java.lang.String dbDefName)
          Gets the IDBFactory object by the database definition name.
static IDBFactory getDBFactoryByProfileName(java.lang.String profileName)
          Gets the IDBFactory object by the connection profile name.
static IDBFactory getDBFactoryByVendorIdentifier(DatabaseVendorDefinitionId vendorId)
          Gets the IDBFactory object by the DatabaseVendorDefinitionId object
static SQLToolsFacade getInstance()
          Singleton
static java.util.Collection getSupportedDBDefinitionNames()
          Returns the database definition names which has associated IDBFactorys.
 
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:

getDBFactories

public static java.util.Collection getDBFactories()
Gets all the contributed database factories

Returns:

getSupportedDBDefinitionNames

public static java.util.Collection getSupportedDBDefinitionNames()
Returns the database definition names which has associated IDBFactorys.

Returns:
Full database definition names including product name and version

getDBFactoryByDBDefName

public static IDBFactory getDBFactoryByDBDefName(java.lang.String dbDefName)
Gets the IDBFactory object by the database definition name.

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

getDBFactoryByVendorIdentifier

public static IDBFactory getDBFactoryByVendorIdentifier(DatabaseVendorDefinitionId vendorId)
Gets the IDBFactory object by the DatabaseVendorDefinitionId object

Returns:
IDBFactory object

getDBFactoryByProfileName

public static IDBFactory getDBFactoryByProfileName(java.lang.String profileName)
Gets the IDBFactory 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 IDBFactory and finds the most suitable one.

Parameters:
profileName - connection profile name
Returns:
IDBFactory object

getDBFactory

public static IDBFactory getDBFactory(DatabaseIdentifier databaseIdentifier,
                                      DatabaseVendorDefinitionId vendorId)
Gets the IDBFactory 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:
IDBFactory object


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