public class BaseDelegatingExecutionFactory<F,C> extends ExecutionFactory<F,C> implements DelegatingExecutionFactory<F,C>
ExecutionFactory.
You will create a custom translator as a subclass of this class containing overrides for
any method you wish to intercept.
Given that subclass is given a Translator name of 'custom-delegator', your 'vdb.xml' file will
contain an XML fragment like the following to assign the delegate:
<translator type="custom-delegator" name="my-translator" description="custom translator">
<property value="delegateName" name="name of the delegate instance"/>
<!-- any custom properties will also appear here -->
</translator>
ExecutionFactory.Format, ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteriaDEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE| Constructor and Description |
|---|
BaseDelegatingExecutionFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areLobsUsableAfterClose()
Indicates if LOBs are usable after the execution is closed.
|
void |
closeConnection(C connection,
F factory)
Closes a connection object from the given connection factory.
|
Execution |
createExecution(Command command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
C connection)
Create an execution object for the specified command
|
ProcedureExecution |
createProcedureExecution(Call command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
C connection) |
ResultSetExecution |
createResultSetExecution(QueryExpression command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
C connection) |
UpdateExecution |
createUpdateExecution(Command command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
C connection) |
boolean |
equals(Object obj) |
C |
getConnection(F factory,
ExecutionContext executionContext)
Return a connection object from the given connection factory.
|
ExecutionFactory.NullOrder |
getDefaultNullOrder()
Returns the default null ordering
|
String |
getDelegateName() |
LanguageFactory |
getLanguageFactory()
Obtain a reference to the default LanguageFactory that can be used to construct
new language interface objects.
|
int |
getMaxDependentInPredicates()
Get the integer value representing the number of values allowed in an IN criteria
in the WHERE clause of a query
|
int |
getMaxFromGroups()
The number of groups supported in the from clause.
|
int |
getMaxInCriteriaSize()
Get the integer value representing the number of values allowed in an IN criteria
in the WHERE clause of a query
|
void |
getMetadata(MetadataFactory metadataFactory,
C conn)
Implement to provide metadata to the metadata for use by the engine.
|
List<FunctionMethod> |
getPushDownFunctions()
Get a list of
FunctionMethods that will be contributed to the SYS schema. |
List<String> |
getSupportedFunctions()
Get list of all supported function names.
|
ExecutionFactory.SupportedJoinCriteria |
getSupportedJoinCriteria()
Get the supported join criteria.
|
TypeFacility |
getTypeFacility()
Obtain a reference to the type facility, which can be used to perform many type
conversions supplied by the Connector API.
|
int |
hashCode() |
boolean |
isCopyLobs() |
boolean |
isImmutable()
Defines if the Connector is read-only connector
|
boolean |
isSourceRequired()
Flag that indicates if a underlying source connection required for this execution factory to work
|
boolean |
requiresCriteria()
Whether the source supports queries without criteria.
|
void |
setDelegate(ExecutionFactory<F,C> delegate)
Sets the delegate, will be called by Teiid after
ExecutionFactory.start() |
void |
setDelegateName(String delegateName) |
boolean |
supportsAdvancedOlapOperations() |
boolean |
supportsAggregatesAvg()
Support indicates connector can accept the AVG aggregate function
|
boolean |
supportsAggregatesCount()
Support indicates connector can accept the COUNT aggregate function
|
boolean |
supportsAggregatesCountStar()
Support indicates connector can accept the COUNT(*) aggregate function
|
boolean |
supportsAggregatesDistinct()
Support indicates connector can accept DISTINCT within aggregate functions
|
boolean |
supportsAggregatesEnhancedNumeric()
Support indicates connector can accept STDDEV_POP, STDDEV_VAR, VAR_POP, VAR_SAMP
|
boolean |
supportsAggregatesMax()
Support indicates connector can accept the MAX aggregate function
|
boolean |
supportsAggregatesMin()
Support indicates connector can accept the MIN aggregate function
|
boolean |
supportsAggregatesSum()
Support indicates connector can accept the SUM aggregate function
|
boolean |
supportsAliasedTable()
Support indicates connector can accept groups with aliases
|
boolean |
supportsArrayAgg() |
boolean |
supportsBatchedUpdates()
Whether the source supports
BatchedUpdates |
boolean |
supportsBulkUpdate()
Whether the source supports updates with multiple value sets
|
boolean |
supportsCommonTableExpressions() |
boolean |
supportsCompareCriteriaEquals()
Support indicates connector accepts criteria of form (element = constant)
|
boolean |
supportsCompareCriteriaOrdered()
Support indicates connector accepts criteria of form (element <=|>= constant)
The query engine will may pushdown queries containing < or > if NOT is also supported. |
boolean |
supportsConvert(int fromType,
int toType)
Used for fine grained control of convert/cast pushdown.
|
boolean |
supportsCorrelatedSubqueries()
Support indicates connector can accept correlated subqueries wherever subqueries
are accepted
|
boolean |
supportsDependentJoins() |
boolean |
supportsElementaryOlapOperations() |
boolean |
supportsExcept()
Support indicates that the connector supports the EXCEPT of two queries.
|
boolean |
supportsExistsCriteria()
Support indicates connector accepts the EXISTS criteria
|
boolean |
supportsFormatLiteral(String literal,
ExecutionFactory.Format format) |
boolean |
supportsFullOuterJoins()
Support indicates connector can accept full outer joins
|
boolean |
supportsFunctionsInGroupBy()
Support indicates that the connector supports functions in GROUP BY, such as:
SELECT dayofmonth(theDate), COUNT(*) FROM table GROUP BY dayofmonth(theDate) |
boolean |
supportsGroupBy()
Whether the source supports an explicit GROUP BY clause
|
boolean |
supportsHaving()
Whether the source supports the HAVING clause
|
boolean |
supportsInCriteria()
Support indicates connector accepts criteria of form (element IN set)
|
boolean |
supportsInCriteriaSubquery()
Support indicates connector accepts IN criteria with a subquery on the right side
|
boolean |
supportsInlineViews()
Support indicates connector can accept inline views (subqueries
in the FROM clause).
|
boolean |
supportsInnerJoins()
Support indicates connector can accept inner or cross joins
|
boolean |
supportsInsertWithQueryExpression()
|
boolean |
supportsIntersect()
Support indicates that the connector supports the INTERSECT of two queries.
|
boolean |
supportsIsNullCriteria()
Support indicates connector accepts criteria of form (element IS NULL)
|
boolean |
supportsLikeCriteria()
Support indicates connector accepts criteria of form (element LIKE constant)
|
boolean |
supportsLikeCriteriaEscapeCharacter()
Support indicates connector accepts criteria of form (element LIKE constant ESCAPE char)
|
boolean |
supportsLikeRegex() |
boolean |
supportsNotCriteria()
Support indicates connector accepts logical criteria NOT
|
boolean |
supportsOnlyFormatLiterals()
|
boolean |
supportsOnlyLiteralComparison() |
boolean |
supportsOnlySingleTableGroupBy()
Whether the source supports grouping only over a single table
|
boolean |
supportsOrCriteria()
Support indicates connector accepts logical criteria connected by OR
|
boolean |
supportsOrderBy()
Support indicates connector accepts ORDER BY clause, including multiple elements
and ascending and descending sorts.
|
boolean |
supportsOrderByNullOrdering()
Returns whether the database supports explicit join ordering.
|
boolean |
supportsOrderByUnrelated()
Support indicates connector accepts ORDER BY clause with columns not from the select
|
boolean |
supportsOuterJoins()
Support indicates connector can accept left outer joins
|
boolean |
supportsQuantifiedCompareCriteriaAll()
Support indicates connector accepts the quantified comparison criteria that
use ALL
|
boolean |
supportsQuantifiedCompareCriteriaSome()
Support indicates connector accepts the quantified comparison criteria that
use SOME
|
boolean |
supportsRowLimit()
Gets whether the connector can limit the number of rows returned by a query.
|
boolean |
supportsRowOffset()
Gets whether the connector supports a SQL clause (similar to the LIMIT with an offset) that can return
result sets that start in the middle of the resulting rows returned by a query
|
boolean |
supportsScalarSubqueries()
Support indicates connector can accept scalar subqueries in the SELECT, WHERE, and
HAVING clauses
|
boolean |
supportsSearchedCaseExpressions()
Support indicates connector can accept queries with searched CASE WHEN
|
boolean |
supportsSelectDistinct()
Support indicates connector can accept queries with SELECT DISTINCT
|
boolean |
supportsSelectExpression()
Support indicates connector can accept expressions other than element
symbols in the SELECT clause.
|
boolean |
supportsSelfJoins()
Support indicates connector can accept self-joins where a
group is joined to itself with aliases.
|
boolean |
supportsSetQueryOrderBy()
Support indicates that the connector supports an ORDER BY on a SetQuery.
|
boolean |
supportsSimilarTo() |
boolean |
supportsUnions()
Support indicates that the connector supports the UNION of two queries.
|
boolean |
supportsWindowDistinctAggregates() |
boolean |
supportsWindowOrderByWithAggregates() |
String |
toString() |
boolean |
useAnsiJoin()
Whether the source prefers to use ANSI style joins.
|
addPushDownFunction, getConnection, getInstance, setCopyLobs, setImmutable, setMaxDependentInPredicates, setMaxInCriteriaSize, setRequiresCriteria, setSourceRequired, setSupportedJoinCriteria, setSupportsFullOuterJoins, setSupportsInnerJoins, setSupportsOrderBy, setSupportsOuterJoins, setSupportsSelectDistinct, startpublic void setDelegate(ExecutionFactory<F,C> delegate)
ExecutionFactory.start()setDelegate in interface DelegatingExecutionFactory<F,C>@TranslatorProperty(display="Delegate name", required=true) public String getDelegateName()
getDelegateName in interface DelegatingExecutionFactory<F,C>public void setDelegateName(String delegateName)
public boolean areLobsUsableAfterClose()
ExecutionFactoryareLobsUsableAfterClose in class ExecutionFactory<F,C>public void closeConnection(C connection, F factory)
ExecutionFactoryConnection. Subclasses should override, if they use
another type of connection.closeConnection in class ExecutionFactory<F,C>public Execution createExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, C connection) throws TranslatorException
ExecutionFactorycreateExecution in class ExecutionFactory<F,C>command - the commandexecutionContext - Provides information about the context that this command is
executing within, such as the identifiers for the command being executedmetadata - Access to runtime metadata if needed to translate the commandconnection - connection factory object to the data sourceTranslatorExceptionpublic ProcedureExecution createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, C connection) throws TranslatorException
createProcedureExecution in class ExecutionFactory<F,C>TranslatorExceptionpublic ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, C connection) throws TranslatorException
createResultSetExecution in class ExecutionFactory<F,C>TranslatorExceptionpublic UpdateExecution createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, C connection) throws TranslatorException
createUpdateExecution in class ExecutionFactory<F,C>TranslatorExceptionpublic C getConnection(F factory, ExecutionContext executionContext) throws TranslatorException
ExecutionFactoryConnectionFactory. Subclasses should override, if they use
another type of connection factory or wish to use the ExecutionContext. By default calls ExecutionFactory.getConnection(Object)getConnection in class ExecutionFactory<F,C>executionContext - null if this is a system request for a connectionTranslatorExceptionpublic ExecutionFactory.NullOrder getDefaultNullOrder()
ExecutionFactorygetDefaultNullOrder in class ExecutionFactory<F,C>ExecutionFactory.NullOrderpublic LanguageFactory getLanguageFactory()
ExecutionFactorygetLanguageFactory in class ExecutionFactory<F,C>public int getMaxFromGroups()
ExecutionFactorygetMaxFromGroups in class ExecutionFactory<F,C>public void getMetadata(MetadataFactory metadataFactory, C conn) throws TranslatorException
ExecutionFactorygetMetadata in class ExecutionFactory<F,C>TranslatorExceptionpublic List<FunctionMethod> getPushDownFunctions()
ExecutionFactoryFunctionMethods that will be contributed to the SYS schema.
To avoid conflicts with system functions, the function name should contain a
qualifier - typically <translator name>.<function name>getPushDownFunctions in class ExecutionFactory<F,C>ExecutionFactory#addPushDownFunction(String, String, FunctionParameter, FunctionParameter...)public List<String> getSupportedFunctions()
ExecutionFactorygetSupportedFunctions in class ExecutionFactory<F,C>for a listing of system pushdown functions. Note that
not all system functions are listed as some functions will use a common name
such as CONCAT vs. the || operator, and other functions will be rewritten and
not pushed down, such as SPACE.public TypeFacility getTypeFacility()
ExecutionFactorygetTypeFacility in class ExecutionFactory<F,C>public boolean isImmutable()
ExecutionFactoryisImmutable in class ExecutionFactory<F,C>public boolean isSourceRequired()
ExecutionFactoryisSourceRequired in class ExecutionFactory<F,C>public boolean supportsAggregatesAvg()
ExecutionFactorysupportsAggregatesAvg in class ExecutionFactory<F,C>public boolean supportsAggregatesCount()
ExecutionFactorysupportsAggregatesCount in class ExecutionFactory<F,C>public boolean supportsAggregatesCountStar()
ExecutionFactorysupportsAggregatesCountStar in class ExecutionFactory<F,C>public boolean supportsAggregatesDistinct()
ExecutionFactorysupportsAggregatesDistinct in class ExecutionFactory<F,C>public boolean supportsAggregatesEnhancedNumeric()
ExecutionFactorysupportsAggregatesEnhancedNumeric in class ExecutionFactory<F,C>public boolean supportsAggregatesMax()
ExecutionFactorysupportsAggregatesMax in class ExecutionFactory<F,C>public boolean supportsAggregatesMin()
ExecutionFactorysupportsAggregatesMin in class ExecutionFactory<F,C>public boolean supportsAggregatesSum()
ExecutionFactorysupportsAggregatesSum in class ExecutionFactory<F,C>public boolean supportsAliasedTable()
ExecutionFactorysupportsAliasedTable in class ExecutionFactory<F,C>public boolean supportsBatchedUpdates()
ExecutionFactoryBatchedUpdatessupportsBatchedUpdates in class ExecutionFactory<F,C>public boolean supportsBulkUpdate()
ExecutionFactorysupportsBulkUpdate in class ExecutionFactory<F,C>public boolean supportsCommonTableExpressions()
supportsCommonTableExpressions in class ExecutionFactory<F,C>public boolean supportsCompareCriteriaEquals()
ExecutionFactorysupportsCompareCriteriaEquals in class ExecutionFactory<F,C>public boolean supportsCompareCriteriaOrdered()
ExecutionFactorysupportsCompareCriteriaOrdered in class ExecutionFactory<F,C>public boolean supportsCorrelatedSubqueries()
ExecutionFactorysupportsCorrelatedSubqueries in class ExecutionFactory<F,C>public boolean supportsExcept()
ExecutionFactorysupportsExcept in class ExecutionFactory<F,C>public boolean supportsExistsCriteria()
ExecutionFactorysupportsExistsCriteria in class ExecutionFactory<F,C>public boolean supportsFunctionsInGroupBy()
ExecutionFactorySupport indicates that the connector supports functions in GROUP BY, such as:
SELECT dayofmonth(theDate), COUNT(*) FROM table GROUP BY dayofmonth(theDate)
supportsFunctionsInGroupBy in class ExecutionFactory<F,C>public boolean supportsGroupBy()
ExecutionFactorysupportsGroupBy in class ExecutionFactory<F,C>public boolean supportsHaving()
ExecutionFactorysupportsHaving in class ExecutionFactory<F,C>public boolean supportsInCriteria()
ExecutionFactorysupportsInCriteria in class ExecutionFactory<F,C>public boolean supportsInCriteriaSubquery()
ExecutionFactorysupportsInCriteriaSubquery in class ExecutionFactory<F,C>public boolean supportsInlineViews()
ExecutionFactorysupportsInlineViews in class ExecutionFactory<F,C>public boolean supportsInsertWithQueryExpression()
ExecutionFactorySetQuery or SelectsupportsInsertWithQueryExpression in class ExecutionFactory<F,C>public boolean supportsIntersect()
ExecutionFactorysupportsIntersect in class ExecutionFactory<F,C>public boolean supportsIsNullCriteria()
ExecutionFactorysupportsIsNullCriteria in class ExecutionFactory<F,C>public boolean supportsLikeCriteria()
ExecutionFactorysupportsLikeCriteria in class ExecutionFactory<F,C>public boolean supportsLikeCriteriaEscapeCharacter()
ExecutionFactorysupportsLikeCriteriaEscapeCharacter in class ExecutionFactory<F,C>public boolean supportsNotCriteria()
ExecutionFactorysupportsNotCriteria in class ExecutionFactory<F,C>public boolean supportsOrCriteria()
ExecutionFactorysupportsOrCriteria in class ExecutionFactory<F,C>public boolean supportsOrderByNullOrdering()
ExecutionFactorysupportsOrderByNullOrdering in class ExecutionFactory<F,C>public boolean supportsOrderByUnrelated()
ExecutionFactorysupportsOrderByUnrelated in class ExecutionFactory<F,C>public boolean supportsQuantifiedCompareCriteriaAll()
ExecutionFactorysupportsQuantifiedCompareCriteriaAll in class ExecutionFactory<F,C>public boolean supportsQuantifiedCompareCriteriaSome()
ExecutionFactorysupportsQuantifiedCompareCriteriaSome in class ExecutionFactory<F,C>public boolean supportsRowLimit()
ExecutionFactorysupportsRowLimit in class ExecutionFactory<F,C>public boolean supportsRowOffset()
ExecutionFactorysupportsRowOffset in class ExecutionFactory<F,C>public boolean supportsScalarSubqueries()
ExecutionFactorysupportsScalarSubqueries in class ExecutionFactory<F,C>public boolean supportsSearchedCaseExpressions()
ExecutionFactorysupportsSearchedCaseExpressions in class ExecutionFactory<F,C>public boolean supportsSelectExpression()
ExecutionFactorysupportsSelectExpression in class ExecutionFactory<F,C>public boolean supportsSelfJoins()
ExecutionFactoryExecutionFactory.supportsAliasedTable().supportsSelfJoins in class ExecutionFactory<F,C>public boolean supportsSetQueryOrderBy()
ExecutionFactorysupportsSetQueryOrderBy in class ExecutionFactory<F,C>public boolean supportsUnions()
ExecutionFactorysupportsUnions in class ExecutionFactory<F,C>public boolean useAnsiJoin()
ExecutionFactoryuseAnsiJoin in class ExecutionFactory<F,C>public boolean isCopyLobs()
isCopyLobs in class ExecutionFactory<F,C>public boolean supportsArrayAgg()
supportsArrayAgg in class ExecutionFactory<F,C>public boolean supportsElementaryOlapOperations()
supportsElementaryOlapOperations in class ExecutionFactory<F,C>public boolean supportsFormatLiteral(String literal, ExecutionFactory.Format format)
supportsFormatLiteral in class ExecutionFactory<F,C>public boolean supportsLikeRegex()
supportsLikeRegex in class ExecutionFactory<F,C>public boolean supportsOnlyFormatLiterals()
ExecutionFactorysupportsOnlyFormatLiterals in class ExecutionFactory<F,C>public boolean supportsOnlySingleTableGroupBy()
ExecutionFactorysupportsOnlySingleTableGroupBy in class ExecutionFactory<F,C>public boolean supportsSimilarTo()
supportsSimilarTo in class ExecutionFactory<F,C>public boolean supportsWindowDistinctAggregates()
supportsWindowDistinctAggregates in class ExecutionFactory<F,C>public boolean supportsWindowOrderByWithAggregates()
supportsWindowOrderByWithAggregates in class ExecutionFactory<F,C>public int getMaxInCriteriaSize()
ExecutionFactorygetMaxInCriteriaSize in class ExecutionFactory<F,C>public ExecutionFactory.SupportedJoinCriteria getSupportedJoinCriteria()
ExecutionFactoryExecutionFactory.SupportedJoinCriteria.ANYgetSupportedJoinCriteria in class ExecutionFactory<F,C>public boolean requiresCriteria()
ExecutionFactoryrequiresCriteria in class ExecutionFactory<F,C>public boolean supportsFullOuterJoins()
ExecutionFactorysupportsFullOuterJoins in class ExecutionFactory<F,C>public boolean supportsInnerJoins()
ExecutionFactorysupportsInnerJoins in class ExecutionFactory<F,C>public boolean supportsOrderBy()
ExecutionFactorysupportsOrderBy in class ExecutionFactory<F,C>public boolean supportsOuterJoins()
ExecutionFactorysupportsOuterJoins in class ExecutionFactory<F,C>public boolean supportsSelectDistinct()
ExecutionFactorysupportsSelectDistinct in class ExecutionFactory<F,C>public int getMaxDependentInPredicates()
ExecutionFactorygetMaxDependentInPredicates in class ExecutionFactory<F,C>public boolean supportsAdvancedOlapOperations()
supportsAdvancedOlapOperations in class ExecutionFactory<F,C>public boolean supportsConvert(int fromType,
int toType)
ExecutionFactoryExecutionFactory.getSupportedFunctions() should
contain SourceSystemFunctions.CONVERT. This method can then return false to indicate
a lack of specific support. The engine will does not care about an unnecessary conversion
where fromType == toType.
By default lob conversion is disabled.supportsConvert in class ExecutionFactory<F,C>fromType - @see RUNTIME_CODEStoType - @see RUNTIME_CODESpublic boolean supportsDependentJoins()
supportsDependentJoins in class ExecutionFactory<F,C>public boolean supportsOnlyLiteralComparison()
supportsOnlyLiteralComparison in class ExecutionFactory<F,C>Copyright © 2012 JBoss by Red Hat. All Rights Reserved.