org.eclipse.datatools.sqltools.core
Class DefaultDBFactory

java.lang.Object
  extended byorg.eclipse.datatools.sqltools.core.DefaultDBFactory
All Implemented Interfaces:
IDBFactory
Direct Known Subclasses:
DefaultDBDebuggerFactory

public class DefaultDBFactory
extends java.lang.Object
implements IDBFactory

Subclasses should override methods in this class to create various database-dependent classes.

Author:
Hui Cao

Constructor Summary
DefaultDBFactory()
           
 
Method Summary
 java.lang.Runnable createExecuteParallelRunnable(java.lang.String sql, DatabaseIdentifier databaseIdentifier)
          The returned thread will be started together with the SQL execution logic.
 java.lang.Object getAdapter(java.lang.Class adapter)
           
 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.
static DefaultDBFactory getDefaultInstance()
           
 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 dbdefinitionId)
          Associcates this factory with a particular DatabaseVendorDefinitionId.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDBFactory

public DefaultDBFactory()
Method Detail

getDefaultInstance

public static DefaultDBFactory getDefaultInstance()

getDatabaseVendorDefinitionId

public DatabaseVendorDefinitionId getDatabaseVendorDefinitionId()
Description copied from interface: IDBFactory
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.

Specified by:
getDatabaseVendorDefinitionId in interface IDBFactory
Returns:
The associated DatabaseDefinition object.

getConnectionService

public IConnectionService getConnectionService()
Description copied from interface: IDBFactory
Returns the connection service associated with this database definition

Specified by:
getConnectionService in interface IDBFactory

getSQLService

public ISQLService getSQLService()
Description copied from interface: IDBFactory
Returns the SQL service associated with this database definition

Specified by:
getSQLService in interface IDBFactory

getPlanService

public IPlanService getPlanService()
Description copied from interface: IDBFactory
Returns the query execution plan service associated with this database definition

Specified by:
getPlanService in interface IDBFactory

getSQLEditorService

public ISQLEditorService getSQLEditorService()
Description copied from interface: IDBFactory
Returns the SQL Editor service associated with this database definition

Specified by:
getSQLEditorService in interface IDBFactory

getSQLDataService

public ISQLDataService getSQLDataService()
Description copied from interface: IDBFactory
Returns the SQL data service associated with this database definition

Specified by:
getSQLDataService in interface IDBFactory

getDatabaseConfiguration

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

Specified by:
getDatabaseConfiguration in interface IDBFactory
Parameters:
databaseIdentifier - uniquely identifies a database

getDBHelper

public IDBHelper getDBHelper()
Description copied from interface: IDBFactory
Return a database-specific utility class.

Specified by:
getDBHelper in interface IDBFactory

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)

setDatabaseVendorDefinitionId

public void setDatabaseVendorDefinitionId(DatabaseVendorDefinitionId dbdefinitionId)
Description copied from interface: IDBFactory
Associcates this factory with a particular DatabaseVendorDefinitionId. This method should only be called once by the DatabaseFactoryRegistry.

Specified by:
setDatabaseVendorDefinitionId in interface IDBFactory
Parameters:
dbdefinitionId - the associated DatabaseDefinition object.

createExecuteParallelRunnable

public java.lang.Runnable createExecuteParallelRunnable(java.lang.String sql,
                                                        DatabaseIdentifier databaseIdentifier)
Description copied from interface: IDBFactory
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.

Specified by:
createExecuteParallelRunnable in interface IDBFactory
Returns:


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