org.eclipse.datatools.sqltools.sqleditor.internal.sql
Class SQLCompletionProposalFactory

java.lang.Object
  extended by org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLCompletionProposalFactory

public final class SQLCompletionProposalFactory
extends java.lang.Object


Constructor Summary
SQLCompletionProposalFactory()
          Constructs an instance of this class.
 
Method Summary
 java.lang.String[] getContextInformation()
          Gets context information as an array of strings.
 java.util.List getDBObjectProposals(SQLDBProposalsRequest request)
          Gets a list of DBProposal objects.
 ISQLDBProposalsService getDBProposalsService()
          Get the DBProposalsService to use.
 java.lang.String[] getStatementProposals()
          Gets proposals based on SQL statement type.
 void setFactoryDBContext(ISQLDBProposalsService dbProposalsService)
          Sets the DBProposalsService to use.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLCompletionProposalFactory

public SQLCompletionProposalFactory()
Constructs an instance of this class. This is the default constructor.

Method Detail

getStatementProposals

public java.lang.String[] getStatementProposals()
Gets proposals based on SQL statement type. This is to be implemented in the future if we want to provide proposals based on statement type. For example valid keywords for SELECT statement

Returns:
array of proposals based on statement type

getContextInformation

public java.lang.String[] getContextInformation()
Gets context information as an array of strings.

Returns:
the context information array

getDBObjectProposals

public java.util.List getDBObjectProposals(SQLDBProposalsRequest request)
Gets a list of DBProposal objects.

Parameters:
tokenList - list of tokens entered by user to invoke the content assist. For example if user entered schema1.table1 then the ArrayList consists of 2 tokens schema1, and table1.
Returns:
the list of DBProposal objects

setFactoryDBContext

public void setFactoryDBContext(ISQLDBProposalsService dbProposalsService)
Sets the DBProposalsService to use.

Parameters:
dbProposalsService - the DBProposalsService to use

getDBProposalsService

public ISQLDBProposalsService getDBProposalsService()
Get the DBProposalsService to use.

Returns:
IDBProposalsService the DBProposalsService to use