org.teiid.connector.jdbc
Class SimpleCapabilities

java.lang.Object
  extended by org.teiid.connector.basic.BasicConnectorCapabilities
      extended by org.teiid.connector.jdbc.JDBCCapabilities
          extended by org.teiid.connector.jdbc.SimpleCapabilities
All Implemented Interfaces:
ConnectorCapabilities

public class SimpleCapabilities
extends JDBCCapabilities

This is a "simple" capabilities class that allows criteria but no complicated joins, subqueries, etc to be passed to the connector. This capabilities class may come in handy for testing and for sources that support JDBC but don't support extended JDBC capabilities.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.teiid.connector.api.ConnectorCapabilities
ConnectorCapabilities.SupportedJoinCriteria
 
Constructor Summary
SimpleCapabilities()
           
 
Method Summary
 int getMaxInCriteriaSize()
          Get the integer value representing the number of values allowed in an IN criteria in the WHERE clause of a query
 java.util.List getSupportedFunctions()
          Return null to indicate no functions are supported.
 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 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 supportsAliasedGroup()
          Support indicates connector can accept groups with aliases
 boolean supportsBetweenCriteria()
          Support indicates connector accepts criteria of form (element BETWEEN constant AND constant)
NOT CURRENTLY USED - between is rewritten as compound compare criteria
 boolean supportsCaseExpressions()
          Support indicates connector can accept queries with non-searched CASE WHEN ...
 boolean supportsCompareCriteriaEquals()
          Support indicates connector accepts criteria of form (element = constant)
 boolean supportsCorrelatedSubqueries()
          Support indicates connector can accept correlated subqueries wherever subqueries are accepted
 boolean supportsExistsCriteria()
          Support indicates connector accepts the EXISTS criteria
 boolean supportsFullOuterJoins()
          Support indicates connector can accept full outer joins
 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 supportsInsertWithQueryExpression()
          Support indicates that the connector can accept INSERTs with values specified by an ISetQuery.
 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 supportsNotCriteria()
          Support indicates connector accepts logical criteria NOT
 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 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 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 supportsSelfJoins()
          Support indicates connector can accept self-joins where a group is joined to itself with aliases.
 boolean supportsUnions()
          Support indicates that the connector supports the UNION of two queries.
 
Methods inherited from class org.teiid.connector.jdbc.JDBCCapabilities
getSupportedJoinCriteria, supportsBatchedUpdates, supportsBulkUpdate, supportsCompareCriteriaOrdered, supportsGroupBy, supportsHaving, supportsInnerJoins, supportsOrderByUnrelated, supportsSelectExpression, supportsSetQueryOrderBy
 
Methods inherited from class org.teiid.connector.basic.BasicConnectorCapabilities
getMaxFromGroups, requiresCriteria, supportsExcept, supportsFunctionsInGroupBy, supportsIntersect, supportsRowLimit, supportsRowOffset, useAnsiJoin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCapabilities

public SimpleCapabilities()
Method Detail

getMaxInCriteriaSize

public int getMaxInCriteriaSize()
Description copied from interface: ConnectorCapabilities
Get the integer value representing the number of values allowed in an IN criteria in the WHERE clause of a query

Specified by:
getMaxInCriteriaSize in interface ConnectorCapabilities
Overrides:
getMaxInCriteriaSize in class JDBCCapabilities
See Also:
BasicConnectorCapabilities.getMaxInCriteriaSize()

supportsCompareCriteriaEquals

public boolean supportsCompareCriteriaEquals()
Description copied from interface: ConnectorCapabilities
Support indicates connector accepts criteria of form (element = constant)

Specified by:
supportsCompareCriteriaEquals in interface ConnectorCapabilities
Overrides:
supportsCompareCriteriaEquals in class JDBCCapabilities

supportsInCriteria

public boolean supportsInCriteria()
Description copied from interface: ConnectorCapabilities
Support indicates connector accepts criteria of form (element IN set)

Specified by:
supportsInCriteria in interface ConnectorCapabilities
Overrides:
supportsInCriteria in class JDBCCapabilities

supportsIsNullCriteria

public boolean supportsIsNullCriteria()
Description copied from interface: ConnectorCapabilities
Support indicates connector accepts criteria of form (element IS NULL)

Specified by:
supportsIsNullCriteria in interface ConnectorCapabilities
Overrides:
supportsIsNullCriteria in class JDBCCapabilities

supportsLikeCriteria

public boolean supportsLikeCriteria()
Description copied from interface: ConnectorCapabilities
Support indicates connector accepts criteria of form (element LIKE constant)

Specified by:
supportsLikeCriteria in interface ConnectorCapabilities
Overrides:
supportsLikeCriteria in class JDBCCapabilities

supportsNotCriteria

public boolean supportsNotCriteria()
Description copied from interface: ConnectorCapabilities
Support indicates connector accepts logical criteria NOT

Specified by:
supportsNotCriteria in interface ConnectorCapabilities
Overrides:
supportsNotCriteria in class JDBCCapabilities

supportsOrCriteria

public boolean supportsOrCriteria()
Description copied from interface: ConnectorCapabilities
Support indicates connector accepts logical criteria connected by OR

Specified by:
supportsOrCriteria in interface ConnectorCapabilities
Overrides:
supportsOrCriteria in class JDBCCapabilities

supportsSelectDistinct

public boolean supportsSelectDistinct()
Description copied from interface: ConnectorCapabilities
Support indicates connector can accept queries with SELECT DISTINCT

Specified by:
supportsSelectDistinct in interface ConnectorCapabilities
Overrides:
supportsSelectDistinct in class JDBCCapabilities

supportsAliasedGroup

public boolean supportsAliasedGroup()
Description copied from interface: ConnectorCapabilities
Support indicates connector can accept groups with aliases

Specified by:
supportsAliasedGroup in interface ConnectorCapabilities
Overrides:
supportsAliasedGroup in class JDBCCapabilities

supportsSelfJoins

public boolean supportsSelfJoins()
Description copied from interface: ConnectorCapabilities
Support indicates connector can accept self-joins where a group is joined to itself with aliases. Connector must also support ConnectorCapabilities.supportsAliasedGroup().

Specified by:
supportsSelfJoins in interface ConnectorCapabilities
Overrides:
supportsSelfJoins in class JDBCCapabilities

supportsOuterJoins

public boolean supportsOuterJoins()
Description copied from interface: ConnectorCapabilities
Support indicates connector can accept left outer joins

Specified by:
supportsOuterJoins in interface ConnectorCapabilities
Overrides:
supportsOuterJoins in class JDBCCapabilities

supportsFullOuterJoins

public boolean supportsFullOuterJoins()
Description copied from interface: ConnectorCapabilities
Support indicates connector can accept full outer joins

Specified by:
supportsFullOuterJoins in interface ConnectorCapabilities
Overrides:
supportsFullOuterJoins in class JDBCCapabilities

supportsBetweenCriteria

public boolean supportsBetweenCriteria()
Description copied from interface: ConnectorCapabilities
Support indicates connector accepts criteria of form (element BETWEEN constant AND constant)
NOT CURRENTLY USED - between is rewritten as compound compare criteria

Specified by:
supportsBetweenCriteria in interface ConnectorCapabilities
Overrides:
supportsBetweenCriteria in class JDBCCapabilities

supportsLikeCriteriaEscapeCharacter

public boolean supportsLikeCriteriaEscapeCharacter()
Description copied from interface: ConnectorCapabilities
Support indicates connector accepts criteria of form (element LIKE constant ESCAPE char)

Specified by:
supportsLikeCriteriaEscapeCharacter in interface ConnectorCapabilities
Overrides:
supportsLikeCriteriaEscapeCharacter in class JDBCCapabilities

supportsInCriteriaSubquery

public boolean supportsInCriteriaSubquery()
Description copied from interface: ConnectorCapabilities
Support indicates connector accepts IN criteria with a subquery on the right side

Specified by:
supportsInCriteriaSubquery in interface ConnectorCapabilities
Overrides:
supportsInCriteriaSubquery in class JDBCCapabilities

supportsExistsCriteria

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

Specified by:
supportsExistsCriteria in interface ConnectorCapabilities
Overrides:
supportsExistsCriteria in class JDBCCapabilities

supportsQuantifiedCompareCriteriaSome

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

Specified by:
supportsQuantifiedCompareCriteriaSome in interface ConnectorCapabilities
Overrides:
supportsQuantifiedCompareCriteriaSome in class JDBCCapabilities
See Also:
ConnectorCapabilities.supportsQuantifiedCompareCriteriaSome()

supportsQuantifiedCompareCriteriaAll

public boolean supportsQuantifiedCompareCriteriaAll()
Description copied from interface: ConnectorCapabilities
Support indicates connector accepts the quantified comparison criteria that use ALL

Specified by:
supportsQuantifiedCompareCriteriaAll in interface ConnectorCapabilities
Overrides:
supportsQuantifiedCompareCriteriaAll in class JDBCCapabilities

supportsOrderBy

public boolean supportsOrderBy()
Description copied from interface: ConnectorCapabilities
Support indicates connector accepts ORDER BY clause, including multiple elements and ascending and descending sorts.

Specified by:
supportsOrderBy in interface ConnectorCapabilities
Overrides:
supportsOrderBy in class JDBCCapabilities

supportsAggregatesSum

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

Specified by:
supportsAggregatesSum in interface ConnectorCapabilities
Overrides:
supportsAggregatesSum in class JDBCCapabilities

supportsAggregatesAvg

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

Specified by:
supportsAggregatesAvg in interface ConnectorCapabilities
Overrides:
supportsAggregatesAvg in class JDBCCapabilities

supportsAggregatesMin

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

Specified by:
supportsAggregatesMin in interface ConnectorCapabilities
Overrides:
supportsAggregatesMin in class JDBCCapabilities

supportsAggregatesMax

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

Specified by:
supportsAggregatesMax in interface ConnectorCapabilities
Overrides:
supportsAggregatesMax in class JDBCCapabilities

supportsAggregatesCount

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

Specified by:
supportsAggregatesCount in interface ConnectorCapabilities
Overrides:
supportsAggregatesCount in class JDBCCapabilities

supportsAggregatesCountStar

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

Specified by:
supportsAggregatesCountStar in interface ConnectorCapabilities
Overrides:
supportsAggregatesCountStar in class JDBCCapabilities

supportsAggregatesDistinct

public boolean supportsAggregatesDistinct()
Description copied from interface: ConnectorCapabilities
Support indicates connector can accept DISTINCT within aggregate functions

Specified by:
supportsAggregatesDistinct in interface ConnectorCapabilities
Overrides:
supportsAggregatesDistinct in class JDBCCapabilities

supportsScalarSubqueries

public boolean supportsScalarSubqueries()
Description copied from interface: ConnectorCapabilities
Support indicates connector can accept scalar subqueries in the SELECT, WHERE, and HAVING clauses

Specified by:
supportsScalarSubqueries in interface ConnectorCapabilities
Overrides:
supportsScalarSubqueries in class JDBCCapabilities

supportsCorrelatedSubqueries

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

Specified by:
supportsCorrelatedSubqueries in interface ConnectorCapabilities
Overrides:
supportsCorrelatedSubqueries in class JDBCCapabilities

supportsCaseExpressions

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

Specified by:
supportsCaseExpressions in interface ConnectorCapabilities
Overrides:
supportsCaseExpressions in class JDBCCapabilities

supportsSearchedCaseExpressions

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

Specified by:
supportsSearchedCaseExpressions in interface ConnectorCapabilities
Overrides:
supportsSearchedCaseExpressions in class JDBCCapabilities

getSupportedFunctions

public java.util.List getSupportedFunctions()
Return null to indicate no functions are supported.

Specified by:
getSupportedFunctions in interface ConnectorCapabilities
Overrides:
getSupportedFunctions in class JDBCCapabilities
Returns:
null
See Also:
ConnectorCapabilities.getSupportedFunctions()

supportsInlineViews

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

Specified by:
supportsInlineViews in interface ConnectorCapabilities
Overrides:
supportsInlineViews in class JDBCCapabilities
See Also:
ConnectorCapabilities.supportsInlineViews()

supportsUnions

public boolean supportsUnions()
Description copied from interface: ConnectorCapabilities
Support indicates that the connector supports the UNION of two queries.

Specified by:
supportsUnions in interface ConnectorCapabilities
Overrides:
supportsUnions in class JDBCCapabilities
Since:
4.2
See Also:
ConnectorCapabilities.supportsUnions()

supportsInsertWithQueryExpression

public boolean supportsInsertWithQueryExpression()
Description copied from interface: ConnectorCapabilities
Support indicates that the connector can accept INSERTs with values specified by an ISetQuery.

Specified by:
supportsInsertWithQueryExpression in interface ConnectorCapabilities
Overrides:
supportsInsertWithQueryExpression in class JDBCCapabilities


Copyright © 2009. All Rights Reserved.