Class ModeShapeExecutionFactory
- java.lang.Object
-
- org.teiid.translator.ExecutionFactory<DataSource,Connection>
-
- org.teiid.translator.jdbc.JDBCExecutionFactory
-
- org.teiid.translator.jdbc.modeshape.ModeShapeExecutionFactory
-
@Translator(name="modeshape", description="A translator for the open source Modeshape JCR Repository") public class ModeShapeExecutionFactory extends JDBCExecutionFactory
Translator class for accessing the ModeShape JCR repository.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
JDBCExecutionFactory.StructRetrieval
-
Nested classes/interfaces inherited from class org.teiid.translator.ExecutionFactory
ExecutionFactory.Format, ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteria, ExecutionFactory.TransactionSupport
-
-
Field Summary
-
Fields inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
DEFAULT_MAX_DEPENDENT_PREDICATES, DEFAULT_MAX_IN_CRITERIA, DEFAULT_TIME_ZONE, dialect
-
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 ModeShapeExecutionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected JDBCMetadataProcessor
createMetadataProcessor()
Deprecated.MetadataProcessor<Connection>
getMetadataProcessor()
Get a MetadataProcessor for the translator to read the metadata.List<String>
getSupportedFunctions()
Get list of all supported function names.void
start()
Initialize the connector with supplied configurationboolean
supportsAggregatesAvg()
Support indicates connector can accept the AVG aggregate functionboolean
supportsAggregatesCount()
Support indicates connector can accept the COUNT aggregate functionboolean
supportsAggregatesCountStar()
Support indicates connector can accept the COUNT(*) aggregate functionboolean
supportsAggregatesEnhancedNumeric()
Support indicates connector can accept STDDEV_POP, STDDEV_VAR, VAR_POP, VAR_SAMPboolean
supportsAggregatesMax()
Support indicates connector can accept the MAX aggregate functionboolean
supportsAggregatesMin()
Support indicates connector can accept the MIN aggregate functionboolean
supportsAggregatesSum()
Support indicates connector can accept the SUM aggregate functionboolean
supportsCorrelatedSubqueries()
Support indicates connector can accept correlated subqueries wherever subqueries are acceptedboolean
supportsExcept()
Support indicates that the connector supports the EXCEPT of two queries.boolean
supportsExistsCriteria()
Support indicates connector accepts the EXISTS criteriaboolean
supportsGroupBy()
Whether the source supports an explicit GROUP BY clauseboolean
supportsHaving()
Whether the source supports the HAVING clauseboolean
supportsInCriteriaSubquery()
Support indicates connector accepts IN criteria with a subquery on the right sideboolean
supportsInlineViews()
Support indicates connector can accept inline views (subqueries in the FROM clause).boolean
supportsIntersect()
Support indicates that the connector supports the INTERSECT of two queries.boolean
supportsOrderByNullOrdering()
Returns whether the database supports explicit null ordering.boolean
supportsQuantifiedCompareCriteriaAll()
Support indicates connector accepts the quantified comparison criteria that use ALLboolean
supportsQuantifiedCompareCriteriaSome()
Support indicates connector accepts the quantified comparison criteria that use SOMEboolean
supportsScalarSubqueries()
Support indicates connector can accept scalar subqueries in the SELECT, WHERE, and HAVING clausesboolean
supportsSearchedCaseExpressions()
Support indicates connector can accept queries with searched CASE WHEN criteria ...boolean
supportsSelectExpression()
Support indicates connector can accept expressions other than element symbols in the SELECT clause.boolean
supportsSetQueryOrderBy()
Support indicates that the connector supports an ORDER BY on a SetQuery.List<?>
translate(LanguageObject obj, ExecutionContext context)
Return a List of translated parts (LanguageObject
s and Objects), or null if to rely on the default translation.List<?>
translateCommand(Command command, ExecutionContext context)
Return a List of translated parts (LanguageObject
s and Objects), or null if to rely on the default translation.String
translateLiteralBoolean(Boolean booleanValue)
Subclasses should override this method to provide a different sql translation of the literal boolean value.String
translateLiteralDate(Date dateValue)
Subclasses should override this method to provide a different sql translation of the literal date value.String
translateLiteralTime(Time timeValue)
Subclasses should override this method to provide a different sql translation of the literal time value.String
translateLiteralTimestamp(Timestamp timestampValue)
Subclasses should override this method to provide a different sql translation of the literal timestamp value.boolean
useAnsiJoin()
TEIID-3102 - ModeShape requires the use of JOIN, and not ',' when joining tables.boolean
useBindVariables()
-
Methods inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
addSourceComment, afterInitialConnectionObtained, bindValue, closeConnection, convertObject, createDirectExecution, createProcedureExecution, createResultSetExecution, createTempTable, createUpdateExecution, executeStoredProcedure, formatDateValue, formatDateValue, getCommentFormat, getConnection, getCreateTemporaryTablePostfix, getCreateTemporaryTableString, getCreateTempTableSQL, getDatabaseCalendar, getDatabaseTimeZone, getDatabaseVersion, getDefaultNullOrder, getDefaultSupportedFunctions, getDialect, getFunctionModifiers, getHibernateDialectClassName, getLateralKeyword, getLikeRegexString, getMaxPreparedInsertBatchSize, getMetadata, getRemovePushdownCharacters, getSetOperationString, getSourceComment, getSQLConversionVisitor, getStructRetrieval, getTemporaryTableName, getTimestampNanoPrecision, getVersion, hasTimeType, initCapabilities, intializeConnectionAfterCancel, isCharacterType, isDefaultTimeZone, isEnableDependentJoins, isExtendedAscii, isNonAscii, isNonAscii, isNonAsciiFunction, isSourceRequired, isSourceRequiredForCapabilities, isTrimStrings, loadedTemporaryTable, obtainedConnection, registerFunctionModifier, registerSpecificTypeOfOutParameter, replaceElementName, retrieveGeographyValue, retrieveGeographyValue, retrieveGeometryValue, retrieveGeometryValue, retrieveValue, retrieveValue, setCommentFormat, setDatabaseTimeZone, setDatabaseVersion, setDatabaseVersion, setEnableDependentJoins, setFetchSize, setMaxPreparedInsertBatchSize, setRemovePushdownCharacters, setStructRetrieval, setTrimStrings, setUseBindingsForDependentJoin, setUseBindVariables, setUseCommentsInSourceQuery, supportsAggregatesDistinct, supportsAliasedTable, supportsBatchedUpdates, supportsBooleanExpressions, supportsBulkUpdate, supportsCompareCriteriaEquals, supportsCompareCriteriaOrdered, supportsDependentJoins, supportsFullDependentJoins, supportsGeneratedKeys, supportsGeneratedKeys, supportsInCriteria, supportsInsertWithQueryExpression, supportsIsNullCriteria, supportsLikeCriteria, supportsLikeCriteriaEscapeCharacter, supportsNotCriteria, supportsOrCriteria, supportsOrderByUnrelated, supportsProcedureParameterExpression, supportsSelfJoins, supportsUnions, tempTableRequiresTransaction, translateGeographyLiteral, translateGeographyParameter, translateGeographySelect, translateGeometryLiteral, translateGeometryParameter, translateGeometrySelect, translateLimit, translateLiteralBinaryType, useAsInGroupAlias, useBindingsForDependentJoin, useColumnNamesForGeneratedKeys, useCommentsInSourceQuery, useNBindingType, useParensForJoins, useParensForSetQueries, usePreparedStatements, useScientificNotation, usesDatabaseVersion, useSelectLimit, useStreamsForLobs, useUnicodePrefix, useWithRollup
-
Methods inherited from class org.teiid.translator.ExecutionFactory
addPushDownFunction, areLobsUsableAfterClose, createExecution, getCacheDirective, getCollationLocale, getConnection, getDirectQueryProcedureName, getExcludedCommonTableExpressionName, getInstance, getLanguageFactory, getMaxDependentInPredicates, getMaxFromGroups, getMaxInCriteriaSize, getMaxProjectedColumns, getNativeQueryProcedureName, getPushDownFunctions, getRequiredLikeEscape, getSupportedJoinCriteria, getTransactionSupport, getTypeFacility, isCopyLobs, isForkable, isImmutable, isSourceRequiredForMetadata, isThreadBound, requiresCriteria, returnsSingleUpdateCount, setCollationLocale, setCopyLobs, setDirectQueryProcedureName, setExcludedCommonTableExpressionName, setImmutable, setMaxDependentInPredicates, setMaxInCriteriaSize, setNativeQueryProcedureName, setRequiresCriteria, setSourceRequired, setSourceRequiredForMetadata, setSupportedJoinCriteria, setSupportsDirectQueryProcedure, setSupportsFullOuterJoins, setSupportsInnerJoins, setSupportsNativeQueries, setSupportsOrderBy, setSupportsOuterJoins, setSupportsSelectDistinct, setThreadBound, setTransactionSupport, supportsAdvancedOlapOperations, supportsAggregatesCountBig, supportsArrayAgg, supportsArrayType, supportsCommonTableExpressions, supportsCompareCriteriaOrderedExclusive, supportsConvert, supportsCorrelatedSubqueryLimit, supportsDirectQueryProcedure, supportsElementaryOlapOperations, supportsFormatLiteral, supportsFullOuterJoins, supportsFunctionsInGroupBy, supportsGeographyType, supportsGroupByMultipleDistinctAggregates, supportsGroupByRollup, supportsInnerJoins, supportsIsDistinctCriteria, supportsLateralJoin, supportsLateralJoinCondition, supportsLikeRegex, supportsListAgg, supportsMultipleOpenExecutions, supportsNativeQueries, supportsOnlyCorrelatedSubqueries, supportsOnlyFormatLiterals, supportsOnlyLateralJoinProcedure, supportsOnlyLiteralComparison, supportsOnlySingleTableGroupBy, supportsOnlyTimestampAddLiteral, supportsOrderBy, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsPartialFiltering, supportsProcedureTable, supportsRecursiveCommonTableExpressions, supportsRowLimit, supportsRowOffset, supportsScalarSubqueryProjection, supportsSelectDistinct, supportsSelectExpressionArrayType, supportsSelectWithoutFrom, supportsSetQueryLimitOffset, supportsSimilarTo, supportsStringAgg, supportsSubqueryCommonTableExpressions, supportsSubqueryInOn, supportsUpsert, supportsWindowDistinctAggregates, supportsWindowFrameClause, supportsWindowFunctionCumeDist, supportsWindowFunctionNthValue, supportsWindowFunctionNtile, supportsWindowFunctionPercentRank, supportsWindowOrderByWithAggregates
-
-
-
-
Method Detail
-
start
public void start() throws TranslatorException
Description copied from class:ExecutionFactory
Initialize the connector with supplied configuration- Overrides:
start
in classJDBCExecutionFactory
- Throws:
TranslatorException
-
translateLiteralDate
public String translateLiteralDate(Date dateValue)
Description copied from class:JDBCExecutionFactory
Subclasses should override this method to provide a different sql translation of the literal date value. By default, a date literal is represented as:{d '2002-12-31'}
- Overrides:
translateLiteralDate
in classJDBCExecutionFactory
- Parameters:
dateValue
- Date value, never null- Returns:
- Translated string
-
translateLiteralTime
public String translateLiteralTime(Time timeValue)
Description copied from class:JDBCExecutionFactory
Subclasses should override this method to provide a different sql translation of the literal time value. By default, a time literal is represented as:{t '23:59:59'}
SeeJDBCExecutionFactory.hasTimeType()
to represent literal times as timestamps.- Overrides:
translateLiteralTime
in classJDBCExecutionFactory
- Parameters:
timeValue
- Time value, never null- Returns:
- Translated string
-
translateLiteralTimestamp
public String translateLiteralTimestamp(Timestamp timestampValue)
Description copied from class:JDBCExecutionFactory
Subclasses should override this method to provide a different sql translation of the literal timestamp value. By default, a timestamp literal is represented as:{ts '2002-12-31 23:59:59'}
. SeeJDBCExecutionFactory.getTimestampNanoPrecision()
to control the literal precision.- Overrides:
translateLiteralTimestamp
in classJDBCExecutionFactory
- Parameters:
timestampValue
- Timestamp value, never null- Returns:
- Translated string
-
translateLiteralBoolean
public String translateLiteralBoolean(Boolean booleanValue)
Description copied from class:JDBCExecutionFactory
Subclasses should override this method to provide a different sql translation of the literal boolean value. By default, a boolean literal is represented as:'0'
or'1'
.- Overrides:
translateLiteralBoolean
in classJDBCExecutionFactory
- Parameters:
booleanValue
- Boolean value, never null- Returns:
- Translated string
-
getSupportedFunctions
public List<String> getSupportedFunctions()
Description copied from class:ExecutionFactory
Get list of all supported function names. Arithmetic functions have names like "+".- Overrides:
getSupportedFunctions
in classJDBCExecutionFactory
- 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.
-
translate
public List<?> translate(LanguageObject obj, ExecutionContext context)
Description copied from class:JDBCExecutionFactory
Return a List of translated parts (LanguageObject
s and Objects), or null if to rely on the default translation. Override with care.- Overrides:
translate
in classJDBCExecutionFactory
- Returns:
- list of translated parts
-
useBindVariables
public boolean useBindVariables()
- Overrides:
useBindVariables
in classJDBCExecutionFactory
-
supportsAggregatesAvg
public boolean supportsAggregatesAvg()
Description copied from class:ExecutionFactory
Support indicates connector can accept the AVG aggregate function- Overrides:
supportsAggregatesAvg
in classJDBCExecutionFactory
-
supportsAggregatesCountStar
public boolean supportsAggregatesCountStar()
Description copied from class:ExecutionFactory
Support indicates connector can accept the COUNT(*) aggregate function- Overrides:
supportsAggregatesCountStar
in classJDBCExecutionFactory
-
supportsAggregatesCount
public boolean supportsAggregatesCount()
Description copied from class:ExecutionFactory
Support indicates connector can accept the COUNT aggregate function- Overrides:
supportsAggregatesCount
in classJDBCExecutionFactory
-
supportsAggregatesEnhancedNumeric
public boolean supportsAggregatesEnhancedNumeric()
Description copied from class:ExecutionFactory
Support indicates connector can accept STDDEV_POP, STDDEV_VAR, VAR_POP, VAR_SAMP- Overrides:
supportsAggregatesEnhancedNumeric
in classExecutionFactory<DataSource,Connection>
-
supportsAggregatesMax
public boolean supportsAggregatesMax()
Description copied from class:ExecutionFactory
Support indicates connector can accept the MAX aggregate function- Overrides:
supportsAggregatesMax
in classJDBCExecutionFactory
-
supportsAggregatesMin
public boolean supportsAggregatesMin()
Description copied from class:ExecutionFactory
Support indicates connector can accept the MIN aggregate function- Overrides:
supportsAggregatesMin
in classJDBCExecutionFactory
-
supportsAggregatesSum
public boolean supportsAggregatesSum()
Description copied from class:ExecutionFactory
Support indicates connector can accept the SUM aggregate function- Overrides:
supportsAggregatesSum
in classJDBCExecutionFactory
-
supportsGroupBy
public boolean supportsGroupBy()
Description copied from class:ExecutionFactory
Whether the source supports an explicit GROUP BY clause- Overrides:
supportsGroupBy
in classJDBCExecutionFactory
-
supportsHaving
public boolean supportsHaving()
Description copied from class:ExecutionFactory
Whether the source supports the HAVING clause- Overrides:
supportsHaving
in classJDBCExecutionFactory
-
supportsSelectExpression
public boolean supportsSelectExpression()
Description copied from class:ExecutionFactory
Support indicates connector can accept expressions other than element symbols in the SELECT clause. Specific supports for the expression type are still checked.- Overrides:
supportsSelectExpression
in classJDBCExecutionFactory
-
supportsCorrelatedSubqueries
public boolean supportsCorrelatedSubqueries()
Description copied from class:ExecutionFactory
Support indicates connector can accept correlated subqueries wherever subqueries are accepted- Overrides:
supportsCorrelatedSubqueries
in classJDBCExecutionFactory
-
supportsExistsCriteria
public boolean supportsExistsCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts the EXISTS criteria- Overrides:
supportsExistsCriteria
in classJDBCExecutionFactory
-
supportsInCriteriaSubquery
public boolean supportsInCriteriaSubquery()
Description copied from class:ExecutionFactory
Support indicates connector accepts IN criteria with a subquery on the right side- Overrides:
supportsInCriteriaSubquery
in classJDBCExecutionFactory
-
supportsInlineViews
public boolean supportsInlineViews()
Description copied from class:ExecutionFactory
Support indicates connector can accept inline views (subqueries in the FROM clause).- Overrides:
supportsInlineViews
in classJDBCExecutionFactory
-
supportsOrderByNullOrdering
public boolean supportsOrderByNullOrdering()
Description copied from class:ExecutionFactory
Returns whether the database supports explicit null ordering.- Overrides:
supportsOrderByNullOrdering
in classExecutionFactory<DataSource,Connection>
- Returns:
- true if nulls first/last can be specified
-
supportsQuantifiedCompareCriteriaAll
public boolean supportsQuantifiedCompareCriteriaAll()
Description copied from class:ExecutionFactory
Support indicates connector accepts the quantified comparison criteria that use ALL- Overrides:
supportsQuantifiedCompareCriteriaAll
in classJDBCExecutionFactory
-
supportsQuantifiedCompareCriteriaSome
public boolean supportsQuantifiedCompareCriteriaSome()
Description copied from class:ExecutionFactory
Support indicates connector accepts the quantified comparison criteria that use SOME- Overrides:
supportsQuantifiedCompareCriteriaSome
in classJDBCExecutionFactory
-
supportsScalarSubqueries
public boolean supportsScalarSubqueries()
Description copied from class:ExecutionFactory
Support indicates connector can accept scalar subqueries in the SELECT, WHERE, and HAVING clauses- Overrides:
supportsScalarSubqueries
in classJDBCExecutionFactory
-
supportsSearchedCaseExpressions
public boolean supportsSearchedCaseExpressions()
Description copied from class:ExecutionFactory
Support indicates connector can accept queries with searched CASE WHEN criteria ... END- Overrides:
supportsSearchedCaseExpressions
in classJDBCExecutionFactory
-
supportsExcept
public boolean supportsExcept()
Description copied from class:ExecutionFactory
Support indicates that the connector supports the EXCEPT of two queries.- Overrides:
supportsExcept
in classExecutionFactory<DataSource,Connection>
-
supportsIntersect
public boolean supportsIntersect()
Description copied from class:ExecutionFactory
Support indicates that the connector supports the INTERSECT of two queries.- Overrides:
supportsIntersect
in classExecutionFactory<DataSource,Connection>
-
supportsSetQueryOrderBy
public boolean supportsSetQueryOrderBy()
Description copied from class:ExecutionFactory
Support indicates that the connector supports an ORDER BY on a SetQuery.- Overrides:
supportsSetQueryOrderBy
in classJDBCExecutionFactory
-
createMetadataProcessor
@Deprecated protected JDBCMetadataProcessor createMetadataProcessor()
Deprecated.- Overrides:
createMetadataProcessor
in classJDBCExecutionFactory
- See Also:
JDBCExecutionFactory.getMetadataProcessor()
-
getMetadataProcessor
public MetadataProcessor<Connection> getMetadataProcessor()
Description copied from class:ExecutionFactory
Get a MetadataProcessor for the translator to read the metadata. Typically this will return a new instance.- Overrides:
getMetadataProcessor
in classJDBCExecutionFactory
- Returns:
-
useAnsiJoin
public boolean useAnsiJoin()
TEIID-3102 - ModeShape requires the use of JOIN, and not ',' when joining tables. Whether the source prefers to use ANSI style joins.- Overrides:
useAnsiJoin
in classExecutionFactory<DataSource,Connection>
- See Also:
ExecutionFactory.useAnsiJoin()
-
translateCommand
public List<?> translateCommand(Command command, ExecutionContext context)
Description copied from class:JDBCExecutionFactory
Return a List of translated parts (LanguageObject
s and Objects), or null if to rely on the default translation.- Overrides:
translateCommand
in classJDBCExecutionFactory
- Returns:
- a list of translated parts
-
-