Package org.teiid.translator.solr
Class SolrExecutionFactory
- java.lang.Object
-
- org.teiid.translator.ExecutionFactory<ConnectionFactory,SolrConnection>
-
- org.teiid.translator.solr.SolrExecutionFactory
-
@Translator(name="solr", description="A translator for Solr search platform") public class SolrExecutionFactory extends ExecutionFactory<ConnectionFactory,SolrConnection>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.translator.ExecutionFactory
ExecutionFactory.Format, ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteria, ExecutionFactory.TransactionSupport
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,FunctionModifier>functionModifiers-
Fields inherited from class org.teiid.translator.ExecutionFactory
DEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE, DEFAULT_MAX_PROJECTED_COLUMNS
-
-
Constructor Summary
Constructors Constructor Description SolrExecutionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectconvertFromSolrType(Object value, Class<?> expectedType)ResultSetExecutioncreateResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, SolrConnection connection)UpdateExecutioncreateUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, SolrConnection connection)List<String>getDefaultSupportedFunctions()Map<String,FunctionModifier>getFunctionModifiers()MetadataProcessor<SolrConnection>getMetadataProcessor()Get a MetadataProcessor for the translator to read the metadata.List<String>getSupportedFunctions()Get list of all supported function names.voidregisterFunctionModifier(String name, FunctionModifier modifier)booleanreturnsSingleUpdateCount()True if only a single value is returned for the update count.voidstart()Initialize the connector with supplied configurationbooleansupportsAggregatesCountStar()Support indicates connector can accept the COUNT(*) aggregate functionbooleansupportsBulkUpdate()Whether the source supports updates with multiple value setsbooleansupportsCompareCriteriaEquals()Support indicates connector accepts criteria of form (element = constant)booleansupportsCompareCriteriaOrdered()Support indicates connector accepts criteria of form (element <=|>= constant)
The query engine will may pushdown queries containing < or > if NOT is also supported.booleansupportsInCriteria()Support indicates connector accepts criteria of form (element IN set)booleansupportsLikeCriteria()Support indicates connector accepts criteria of form (element LIKE constant)booleansupportsNotCriteria()Support indicates connector accepts logical criteria NOTbooleansupportsOnlyLiteralComparison()booleansupportsOrCriteria()Support indicates connector accepts logical criteria connected by ORbooleansupportsOrderBy()Support indicates connector accepts ORDER BY clause, including multiple elements and ascending and descending sorts.booleansupportsOrderByUnrelated()Support indicates connector accepts ORDER BY clause with columns not from the selectbooleansupportsRowLimit()Gets whether the connector can limit the number of rows returned by a query.booleansupportsSelectExpression()Support indicates connector can accept expressions other than element symbols in the SELECT clause.-
Methods inherited from class org.teiid.translator.ExecutionFactory
addPushDownFunction, areLobsUsableAfterClose, closeConnection, createDirectExecution, createExecution, createProcedureExecution, getCacheDirective, getCollationLocale, getConnection, getConnection, getDefaultNullOrder, getDirectQueryProcedureName, getExcludedCommonTableExpressionName, getInstance, getLanguageFactory, getMaxDependentInPredicates, getMaxFromGroups, getMaxInCriteriaSize, getMaxProjectedColumns, getMetadata, getNativeQueryProcedureName, getPushDownFunctions, getRequiredLikeEscape, getSupportedJoinCriteria, getTransactionSupport, getTypeFacility, initCapabilities, isCopyLobs, isForkable, isImmutable, isSourceRequired, isSourceRequiredForCapabilities, isSourceRequiredForMetadata, isThreadBound, requiresCriteria, setCollationLocale, setCopyLobs, setDirectQueryProcedureName, setExcludedCommonTableExpressionName, setImmutable, setMaxDependentInPredicates, setMaxInCriteriaSize, setNativeQueryProcedureName, setRequiresCriteria, setSourceRequired, setSourceRequiredForMetadata, setSupportedJoinCriteria, setSupportsDirectQueryProcedure, setSupportsFullOuterJoins, setSupportsInnerJoins, setSupportsNativeQueries, setSupportsOrderBy, setSupportsOuterJoins, setSupportsSelectDistinct, setThreadBound, setTransactionSupport, supportsAdvancedOlapOperations, supportsAggregatesAvg, supportsAggregatesCount, supportsAggregatesCountBig, supportsAggregatesDistinct, supportsAggregatesEnhancedNumeric, supportsAggregatesMax, supportsAggregatesMin, supportsAggregatesSum, supportsAliasedTable, supportsArrayAgg, supportsArrayType, supportsBatchedUpdates, supportsCommonTableExpressions, supportsCompareCriteriaOrderedExclusive, supportsConvert, supportsCorrelatedSubqueries, supportsCorrelatedSubqueryLimit, supportsDependentJoins, supportsDirectQueryProcedure, supportsElementaryOlapOperations, supportsExcept, supportsExistsCriteria, supportsFormatLiteral, supportsFullDependentJoins, supportsFullOuterJoins, supportsFunctionsInGroupBy, supportsGeographyType, supportsGroupBy, supportsGroupByMultipleDistinctAggregates, supportsGroupByRollup, supportsHaving, supportsInCriteriaSubquery, supportsInlineViews, supportsInnerJoins, supportsInsertWithQueryExpression, supportsIntersect, supportsIsDistinctCriteria, supportsIsNullCriteria, supportsLateralJoin, supportsLateralJoinCondition, supportsLikeCriteriaEscapeCharacter, supportsLikeRegex, supportsListAgg, supportsMultipleOpenExecutions, supportsNativeQueries, supportsOnlyCorrelatedSubqueries, supportsOnlyFormatLiterals, supportsOnlyLateralJoinProcedure, supportsOnlyRelationshipStyleJoins, supportsOnlySingleTableGroupBy, supportsOnlyTimestampAddLiteral, supportsOrderByNullOrdering, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsPartialFiltering, supportsProcedureParameterExpression, supportsProcedureTable, supportsQuantifiedCompareCriteriaAll, supportsQuantifiedCompareCriteriaSome, supportsRecursiveCommonTableExpressions, supportsRowOffset, supportsScalarSubqueries, supportsScalarSubqueryProjection, supportsSearchedCaseExpressions, supportsSelectDistinct, supportsSelectExpressionArrayType, supportsSelectWithoutFrom, supportsSelfJoins, supportsSetQueryLimitOffset, supportsSetQueryOrderBy, supportsSimilarTo, supportsStringAgg, supportsSubqueryCommonTableExpressions, supportsSubqueryInOn, supportsUnions, supportsUpsert, supportsWindowDistinctAggregates, supportsWindowFrameClause, supportsWindowFunctionCumeDist, supportsWindowFunctionNthValue, supportsWindowFunctionNtile, supportsWindowFunctionPercentRank, supportsWindowOrderByWithAggregates, useAnsiJoin, useBindingsForDependentJoin
-
-
-
-
Field Detail
-
functionModifiers
protected Map<String,FunctionModifier> functionModifiers
-
-
Method Detail
-
start
public void start() throws TranslatorExceptionDescription copied from class:ExecutionFactoryInitialize the connector with supplied configuration- Overrides:
startin classExecutionFactory<ConnectionFactory,SolrConnection>- Throws:
TranslatorException
-
getMetadataProcessor
public MetadataProcessor<SolrConnection> getMetadataProcessor()
Description copied from class:ExecutionFactoryGet a MetadataProcessor for the translator to read the metadata. Typically this will return a new instance.- Overrides:
getMetadataProcessorin classExecutionFactory<ConnectionFactory,SolrConnection>- Returns:
-
registerFunctionModifier
public void registerFunctionModifier(String name, FunctionModifier modifier)
-
getFunctionModifiers
public Map<String,FunctionModifier> getFunctionModifiers()
-
getSupportedFunctions
public List<String> getSupportedFunctions()
Description copied from class:ExecutionFactoryGet list of all supported function names. Arithmetic functions have names like "+".- Overrides:
getSupportedFunctionsin classExecutionFactory<ConnectionFactory,SolrConnection>- See Also:
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. Note: User defined functions should be specified fully qualified.
-
createResultSetExecution
public ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, SolrConnection connection) throws TranslatorException
- Overrides:
createResultSetExecutionin classExecutionFactory<ConnectionFactory,SolrConnection>- Throws:
TranslatorException
-
createUpdateExecution
public UpdateExecution createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, SolrConnection connection) throws TranslatorException
- Overrides:
createUpdateExecutionin classExecutionFactory<ConnectionFactory,SolrConnection>- Throws:
TranslatorException
-
supportsCompareCriteriaEquals
public boolean supportsCompareCriteriaEquals()
Description copied from class:ExecutionFactorySupport indicates connector accepts criteria of form (element = constant)- Overrides:
supportsCompareCriteriaEqualsin classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsInCriteria
public boolean supportsInCriteria()
Description copied from class:ExecutionFactorySupport indicates connector accepts criteria of form (element IN set)- Overrides:
supportsInCriteriain classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsRowLimit
public boolean supportsRowLimit()
Description copied from class:ExecutionFactoryGets whether the connector can limit the number of rows returned by a query.- Overrides:
supportsRowLimitin classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsNotCriteria
public boolean supportsNotCriteria()
Description copied from class:ExecutionFactorySupport indicates connector accepts logical criteria NOT- Overrides:
supportsNotCriteriain classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsLikeCriteria
public boolean supportsLikeCriteria()
Description copied from class:ExecutionFactorySupport indicates connector accepts criteria of form (element LIKE constant)- Overrides:
supportsLikeCriteriain classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsOrderBy
public boolean supportsOrderBy()
Description copied from class:ExecutionFactorySupport indicates connector accepts ORDER BY clause, including multiple elements and ascending and descending sorts.- Overrides:
supportsOrderByin classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsCompareCriteriaOrdered
public boolean supportsCompareCriteriaOrdered()
Description copied from class:ExecutionFactorySupport indicates connector accepts criteria of form (element <=|>= constant)
The query engine will may pushdown queries containing < or > if NOT is also supported.- Overrides:
supportsCompareCriteriaOrderedin classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsOrCriteria
public boolean supportsOrCriteria()
Description copied from class:ExecutionFactorySupport indicates connector accepts logical criteria connected by OR- Overrides:
supportsOrCriteriain classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsOnlyLiteralComparison
public boolean supportsOnlyLiteralComparison()
- Overrides:
supportsOnlyLiteralComparisonin classExecutionFactory<ConnectionFactory,SolrConnection>- Returns:
- true if only Literal comparisons (equality, ordered, like, etc.) are supported for non-join conditions.
-
supportsOrderByUnrelated
public boolean supportsOrderByUnrelated()
Description copied from class:ExecutionFactorySupport indicates connector accepts ORDER BY clause with columns not from the select- Overrides:
supportsOrderByUnrelatedin classExecutionFactory<ConnectionFactory,SolrConnection>- Returns:
-
supportsSelectExpression
public boolean supportsSelectExpression()
Description copied from class:ExecutionFactorySupport indicates connector can accept expressions other than element symbols in the SELECT clause. Specific supports for the expression type are still checked.- Overrides:
supportsSelectExpressionin classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsBulkUpdate
public boolean supportsBulkUpdate()
Description copied from class:ExecutionFactoryWhether the source supports updates with multiple value sets- Overrides:
supportsBulkUpdatein classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsAggregatesCountStar
public boolean supportsAggregatesCountStar()
Description copied from class:ExecutionFactorySupport indicates connector can accept the COUNT(*) aggregate function- Overrides:
supportsAggregatesCountStarin classExecutionFactory<ConnectionFactory,SolrConnection>
-
returnsSingleUpdateCount
public boolean returnsSingleUpdateCount()
Description copied from class:ExecutionFactoryTrue if only a single value is returned for the update count. This overrides the default expectation of an update count array for bulk/batch commands. It is expected that every command is successful.- Overrides:
returnsSingleUpdateCountin classExecutionFactory<ConnectionFactory,SolrConnection>- Returns:
-
-