org.teiid.translator.jdbc.modeshape
Class ModeShapeExecutionFactory

java.lang.Object
  extended by org.teiid.translator.ExecutionFactory<javax.sql.DataSource,java.sql.Connection>
      extended by org.teiid.translator.jdbc.JDBCExecutionFactory
          extended by 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.ExecutionFactory
ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteria
 
Field Summary
 
Fields inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
DEFAULT_MAX_DEPENDENT_PREDICATES, DEFAULT_MAX_IN_CRITERIA, DEFAULT_TIME_ZONE
 
Fields inherited from class org.teiid.translator.ExecutionFactory
DEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE
 
Constructor Summary
ModeShapeExecutionFactory()
           
 
Method Summary
 java.util.List<FunctionMethod> getPushDownFunctions()
           
 java.util.List<java.lang.String> getSupportedFunctions()
          Get list of all supported function names.
 void start()
          Initialize the connector with supplied configuration
 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 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 supportsCaseExpressions()
          Support indicates connector can accept queries with non-searched CASE WHEN ...
 boolean supportsCorrelatedSubqueries()
          Support indicates connector can accept correlated subqueries wherever subqueries are accepted
 boolean supportsExcept()
          Support indicates that the connector supports the EXCEPT of two queries.
 boolean supportsExistsCriteria()
          Support indicates connector accepts the EXISTS criteria
 boolean supportsGroupBy()
          Whether the source supports an explicit GROUP BY clause
 boolean supportsHaving()
          Whether the source supports the HAVING clause
 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 supportsIntersect()
          Support indicates that the connector supports the INTERSECT of two queries.
 boolean supportsOrderByNullOrdering()
          Returns whether the database supports explicit join ordering.
 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 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 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.
 java.util.List<?> translate(LanguageObject obj, ExecutionContext context)
          Return a List of translated parts (LanguageObjects and Objects), or null if to rely on the default translation.
 java.lang.String translateLiteralBoolean(java.lang.Boolean booleanValue)
          Subclasses should override this method to provide a different sql translation of the literal boolean value.
 java.lang.String translateLiteralDate(java.sql.Date dateValue)
          Subclasses should override this method to provide a different sql translation of the literal date value.
 java.lang.String translateLiteralTime(java.sql.Time timeValue)
          Subclasses should override this method to provide a different sql translation of the literal time value.
 java.lang.String translateLiteralTimestamp(java.sql.Timestamp timestampValue)
          Subclasses should override this method to provide a different sql translation of the literal timestamp value.
 boolean useBindVariables()
           
 
Methods inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
addSourceComment, afterInitialConnectionObtained, bindValue, closeConnection, createProcedureExecution, createResultSetExecution, createUpdateExecution, executeStoredProcedure, formatDateValue, getConnection, getDatabaseCalendar, getDatabaseTimeZone, getDatabaseVersion, getDefaultNullOrder, getDefaultSupportedFunctions, getFunctionModifiers, getMaxPreparedInsertBatchSize, getMetadata, getSetOperationString, getSourceComment, getSQLConversionVisitor, getTimestampNanoPrecision, hasTimeType, isSourceRequired, isTrimStrings, obtainedConnection, parseName, registerFunctionModifier, registerSpecificTypeOfOutParameter, replaceElementName, retrieveValue, retrieveValue, setDatabaseTimeZone, setDatabaseVersion, setMaxPreparedInsertBatchSize, setTrimStrings, setUseBindVariables, setUseCommentsInSourceQuery, supportsAggregatesDistinct, supportsAliasedTable, supportsBatchedUpdates, supportsBetweenCriteria, supportsBulkUpdate, supportsCompareCriteriaEquals, supportsCompareCriteriaOrdered, supportsInCriteria, supportsInsertWithIterator, supportsInsertWithQueryExpression, supportsIsNullCriteria, supportsLikeCriteria, supportsLikeCriteriaEscapeCharacter, supportsNotCriteria, supportsOrCriteria, supportsOrderByUnrelated, supportsSelfJoins, supportsUnions, translateCommand, translateLimit, useAsInGroupAlias, useCommentsInSourceQuery, useParensForJoins, useParensForSetQueries, usePreparedStatements, useSelectLimit
 
Methods inherited from class org.teiid.translator.ExecutionFactory
areLobsUsableAfterClose, createExecution, getInstance, getLanguageFactory, getMaxDependentInPredicates, getMaxFromGroups, getMaxInCriteriaSize, getSupportedJoinCriteria, getTypeFacility, isImmutable, requiresCriteria, setImmutable, setMaxDependentInPredicates, setMaxInCriteriaSize, setRequiresCriteria, setSourceRequired, setSupportedJoinCriteria, setSupportsFullOuterJoins, setSupportsInnerJoins, setSupportsOrderBy, setSupportsOuterJoins, setSupportsSelectDistinct, supportsCommonTableExpressions, supportsFullOuterJoins, supportsFunctionsInGroupBy, supportsInnerJoins, supportsOrderBy, supportsOuterJoins, supportsRowLimit, supportsRowOffset, supportsSelectDistinct, useAnsiJoin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModeShapeExecutionFactory

public ModeShapeExecutionFactory()
Method Detail

start

public void start()
           throws TranslatorException
Description copied from class: ExecutionFactory
Initialize the connector with supplied configuration

Overrides:
start in class JDBCExecutionFactory
Throws:
TranslatorException

translateLiteralDate

public java.lang.String translateLiteralDate(java.sql.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 class JDBCExecutionFactory
Parameters:
dateValue - Date value, never null
Returns:
Translated string

translateLiteralTime

public java.lang.String translateLiteralTime(java.sql.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'} See JDBCExecutionFactory.hasTimeType() to represent literal times as timestamps.

Overrides:
translateLiteralTime in class JDBCExecutionFactory
Parameters:
timeValue - Time value, never null
Returns:
Translated string

translateLiteralTimestamp

public java.lang.String translateLiteralTimestamp(java.sql.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'}. See JDBCExecutionFactory.getTimestampNanoPrecision() to control the literal precision.

Overrides:
translateLiteralTimestamp in class JDBCExecutionFactory
Parameters:
timestampValue - Timestamp value, never null
Returns:
Translated string

translateLiteralBoolean

public java.lang.String translateLiteralBoolean(java.lang.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 class JDBCExecutionFactory
Parameters:
booleanValue - Boolean value, never null
Returns:
Translated string

getSupportedFunctions

public java.util.List<java.lang.String> getSupportedFunctions()
Description copied from class: ExecutionFactory
Get list of all supported function names. Arithmetic functions have names like "+".

Overrides:
getSupportedFunctions in class JDBCExecutionFactory

getPushDownFunctions

public java.util.List<FunctionMethod> getPushDownFunctions()
Overrides:
getPushDownFunctions in class ExecutionFactory<javax.sql.DataSource,java.sql.Connection>

translate

public java.util.List<?> translate(LanguageObject obj,
                                   ExecutionContext context)
Description copied from class: JDBCExecutionFactory
Return a List of translated parts (LanguageObjects and Objects), or null if to rely on the default translation. Override with care.

Overrides:
translate in class JDBCExecutionFactory
Returns:
list of translated parts

useBindVariables

public boolean useBindVariables()
Overrides:
useBindVariables in class JDBCExecutionFactory

supportsAggregatesAvg

public boolean supportsAggregatesAvg()
Description copied from class: ExecutionFactory
Support indicates connector can accept the AVG aggregate function

Overrides:
supportsAggregatesAvg in class JDBCExecutionFactory

supportsAggregatesCountStar

public boolean supportsAggregatesCountStar()
Description copied from class: ExecutionFactory
Support indicates connector can accept the COUNT(*) aggregate function

Overrides:
supportsAggregatesCountStar in class JDBCExecutionFactory

supportsAggregatesCount

public boolean supportsAggregatesCount()
Description copied from class: ExecutionFactory
Support indicates connector can accept the COUNT aggregate function

Overrides:
supportsAggregatesCount in class JDBCExecutionFactory

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 class ExecutionFactory<javax.sql.DataSource,java.sql.Connection>

supportsAggregatesMax

public boolean supportsAggregatesMax()
Description copied from class: ExecutionFactory
Support indicates connector can accept the MAX aggregate function

Overrides:
supportsAggregatesMax in class JDBCExecutionFactory

supportsAggregatesMin

public boolean supportsAggregatesMin()
Description copied from class: ExecutionFactory
Support indicates connector can accept the MIN aggregate function

Overrides:
supportsAggregatesMin in class JDBCExecutionFactory

supportsAggregatesSum

public boolean supportsAggregatesSum()
Description copied from class: ExecutionFactory
Support indicates connector can accept the SUM aggregate function

Overrides:
supportsAggregatesSum in class JDBCExecutionFactory

supportsGroupBy

public boolean supportsGroupBy()
Description copied from class: ExecutionFactory
Whether the source supports an explicit GROUP BY clause

Overrides:
supportsGroupBy in class JDBCExecutionFactory

supportsHaving

public boolean supportsHaving()
Description copied from class: ExecutionFactory
Whether the source supports the HAVING clause

Overrides:
supportsHaving in class JDBCExecutionFactory

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 class JDBCExecutionFactory

supportsCaseExpressions

public boolean supportsCaseExpressions()
Description copied from class: ExecutionFactory
Support indicates connector can accept queries with non-searched CASE WHEN ... END
NOT CURRENTLY USED - case is pushed down as searched case

Overrides:
supportsCaseExpressions in class JDBCExecutionFactory

supportsCorrelatedSubqueries

public boolean supportsCorrelatedSubqueries()
Description copied from class: ExecutionFactory
Support indicates connector can accept correlated subqueries wherever subqueries are accepted

Overrides:
supportsCorrelatedSubqueries in class JDBCExecutionFactory

supportsExistsCriteria

public boolean supportsExistsCriteria()
Description copied from class: ExecutionFactory
Support indicates connector accepts the EXISTS criteria

Overrides:
supportsExistsCriteria in class JDBCExecutionFactory

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 class JDBCExecutionFactory

supportsInlineViews

public boolean supportsInlineViews()
Description copied from class: ExecutionFactory
Support indicates connector can accept inline views (subqueries in the FROM clause).

Overrides:
supportsInlineViews in class JDBCExecutionFactory

supportsOrderByNullOrdering

public boolean supportsOrderByNullOrdering()
Description copied from class: ExecutionFactory
Returns whether the database supports explicit join ordering.

Overrides:
supportsOrderByNullOrdering in class ExecutionFactory<javax.sql.DataSource,java.sql.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 class JDBCExecutionFactory

supportsQuantifiedCompareCriteriaSome

public boolean supportsQuantifiedCompareCriteriaSome()
Description copied from class: ExecutionFactory
Support indicates connector accepts the quantified comparison criteria that use SOME

Overrides:
supportsQuantifiedCompareCriteriaSome in class JDBCExecutionFactory

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 class JDBCExecutionFactory

supportsSearchedCaseExpressions

public boolean supportsSearchedCaseExpressions()
Description copied from class: ExecutionFactory
Support indicates connector can accept queries with searched CASE WHEN ... END

Overrides:
supportsSearchedCaseExpressions in class JDBCExecutionFactory

supportsExcept

public boolean supportsExcept()
Description copied from class: ExecutionFactory
Support indicates that the connector supports the EXCEPT of two queries.

Overrides:
supportsExcept in class ExecutionFactory<javax.sql.DataSource,java.sql.Connection>

supportsIntersect

public boolean supportsIntersect()
Description copied from class: ExecutionFactory
Support indicates that the connector supports the INTERSECT of two queries.

Overrides:
supportsIntersect in class ExecutionFactory<javax.sql.DataSource,java.sql.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 class JDBCExecutionFactory


Copyright © 2011. All Rights Reserved.