org.eclipse.datatools.sqltools.core
Interface IDBFactory

All Known Subinterfaces:
IDBDebuggerFactory
All Known Implementing Classes:
DefaultDBDebuggerFactory, DefaultDBFactory

public interface IDBFactory

This interface is for database vendors to provide database-specific features and algorithms. It's not intended to be implemented directly. Instead, vendors should extend DefaultDBFactory. On one hand, vendors are free to concentrate only on the APIs that they are interested in; on the other hand, subclasses of DefaultDBFactory is unlikely to be broken in the future.

Clients should extend DefaultDBFactory rather than implement this interface directly.

Author:
Hui Cao

Method Summary
 java.lang.Runnable createExecuteParallelRunnable(java.lang.String sql, DatabaseIdentifier databaseIdentifier)
          The returned thread will be started together with the SQL execution logic.
 IConnectionService getConnectionService()
          Returns the connection service associated with this database definition
 IDatabaseConfiguration getDatabaseConfiguration(DatabaseIdentifier databaseIdentifier)
          Return an IDatabaseConfiguration object which can be used to query database configurations such as "case sensitive".
 DatabaseVendorDefinitionId getDatabaseVendorDefinitionId()
          Returns the associated DatabaseVendorDefinitionId object.
 IDBHelper getDBHelper()
          Return a database-specific utility class.
 IPlanService getPlanService()
          Returns the query execution plan service associated with this database definition
 ISQLDataService getSQLDataService()
          Returns the SQL data service associated with this database definition
 ISQLEditorService getSQLEditorService()
          Returns the SQL Editor service associated with this database definition
 ISQLService getSQLService()
          Returns the SQL service associated with this database definition
 void setDatabaseVendorDefinitionId(DatabaseVendorDefinitionId dbdefinition)
          Associcates this factory with a particular DatabaseVendorDefinitionId.
 

Method Detail

getDatabaseVendorDefinitionId

public DatabaseVendorDefinitionId getDatabaseVendorDefinitionId()
Returns the associated DatabaseVendorDefinitionId object. A IDBFactory is attached to a certain DatabaseVendorDefinitionId. DatabaseVendorDefinitionId specifies the database specific capabilities, while a IDBFactory encapsulates database specific algorithms.

Returns:
The associated DatabaseDefinition object.

setDatabaseVendorDefinitionId

public void setDatabaseVendorDefinitionId(DatabaseVendorDefinitionId dbdefinition)
Associcates this factory with a particular DatabaseVendorDefinitionId. This method should only be called once by the DatabaseFactoryRegistry.

Parameters:
dbdefinition - the associated DatabaseDefinition object.

getConnectionService

public IConnectionService getConnectionService()
Returns the connection service associated with this database definition


getSQLService

public ISQLService getSQLService()
Returns the SQL service associated with this database definition


getPlanService

public IPlanService getPlanService()
Returns the query execution plan service associated with this database definition


getSQLEditorService

public ISQLEditorService getSQLEditorService()
Returns the SQL Editor service associated with this database definition


getSQLDataService

public ISQLDataService getSQLDataService()
Returns the SQL data service associated with this database definition


getDatabaseConfiguration

public IDatabaseConfiguration getDatabaseConfiguration(DatabaseIdentifier databaseIdentifier)
Return an IDatabaseConfiguration object which can be used to query database configurations such as "case sensitive".

Parameters:
databaseIdentifier - uniquely identifies a database

getDBHelper

public IDBHelper getDBHelper()
Return a database-specific utility class.


createExecuteParallelRunnable

public java.lang.Runnable createExecuteParallelRunnable(java.lang.String sql,
                                                        DatabaseIdentifier databaseIdentifier)
The returned thread will be started together with the SQL execution logic. A typical usage of this method is to retrieve query plan while executing the sql statement.

Returns:


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