## org.eclipse.datatools.sqltools.editor.template
Class GenericSQLContextType

    java.lang.Object
      TemplateContextType
          org.eclipse.datatools.sqltools.editor.template.GenericSQLContextType

    public class GenericSQLContextType

extends TemplateContextType

A generic SQL context type defines a context within which generic SQL statement templates are resolved. It stores a number of `TemplateVariableResolver`s. A `TemplateBuffer` can be resolved in a `TemplateContext` using the `#resolve(TemplateBuffer, TemplateContext)` method.

Clients may extend this class to provide vendor specific template support.

Author:
  Hui Cao

Field Summary
`static java.lang.String` `SQL_CONTEXT_TYPE` This context's id

Constructor Summary
`GenericSQLContextType()`

Method Summary
`GenericSQLContext` `createContext(IDocument document, int completionOffset, int completionLength, ParsingResult result)`
`java.lang.String[]` `getIds()` return the compatible context type ids.
`java.lang.String` `getSQLContextId()`

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

Field Detail

### SQL_CONTEXT_TYPE

    public static final java.lang.String SQL_CONTEXT_TYPE

  This context's id

  See Also:
    Constant Field Values

Constructor Detail

### GenericSQLContextType

    public GenericSQLContextType()

Method Detail

### createContext

    public GenericSQLContext createContext(IDocument document,
                                           int completionOffset,
                                           int completionLength,
                                           ParsingResult result)

### getIds

    public java.lang.String[] getIds()

  return the compatible context type ids. subclass should override this method.

  Returns:

### getSQLContextId

    public java.lang.String getSQLContextId()

  Returns:
    Returns the sQL_CONTEXT_TYPE.

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