# ODA Dynamic Result Set

###### Identifier:

org.eclipse.datatools.connectivity.oda.dynamicResultSet

###### Since:

3.3 (DTP 1.8)

###### Description:

[API] This extension point is for declaring support of dynamic operations, such as filtering, row ordering and projection, on a result set of an ODA data source extension.

###### Configuration Markup:

<!ELEMENT extension (contributor , filterExpressionTypes? , aggregateExpressionTypes? , valueExpressionTypes?)>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #REQUIRED

name CDATA #IMPLIED

>

<!ELEMENT contributor (supportedDataSetType+ , supportsRowOrdering? , supportsCombiningQueries?)>

<!ATTLIST contributor

validatorClass CDATA #IMPLIED

specificationFactoryClass CDATA #IMPLIED

>

Defines the scope and capabilities of this extension's contributor.

- validatorClass - The fully qualified name of a Java concrete class that implements the runtime validator to validate all its contributed expressions and any dynamic result set specification that may be set by an ODA consumer application. The class must be public and implement the org.eclipse.datatools.connectivity.oda.spec.IValidator interface with a public 0-argument constructor.
- specificationFactoryClass - The fully qualified name of a Java concrete factory class that creates extended specification classes for use in an ODA extension's dynamic query specification. The class must be public and extends the org.eclipse.datatools.connectivity.oda.spec.util.QuerySpecificationFactory base class with a public 0-argument constructor.

<!ELEMENT filterExpressionTypes (supportedOdaFilterExpression* , filterType+)>

A grouping of supportedOdaFilterExpression and filterType elements, defining the types of filter expression supported or contributed by this extension for all its supported data set types.

<!ELEMENT filterType (variableRestriction*)>

<!ATTLIST filterType

id CDATA #REQUIRED

displayName CDATA #IMPLIED

description CDATA #IMPLIED

class CDATA #IMPLIED

minArguments CDATA "1"

maxArguments CDATA "*"

isNegatable (true | false) "false"

isOptionable (true | false) "false"

>

Defines a type of filter expression contributed by this extension.

- id - The id that uniquely identifies this type of filter expression within the extension.
- displayName - A translatable name that will be used to refer to this particular expression type in dialogs presented to the user. Default to the expression id if no name is specified. The name should be unique within the extension.
- description - A brief translatable description of this type of filter expression type. It may be used to describe this particular expression in dialogs presented to the user.
- class - The fully qualified name of a concrete implementation class of this custom filter expression.
  Must extend from the org.eclipse.datatools.connectivity.oda.spec.result.filter.CustomExpression base class. The extended class must be public with a public 0-argument constructor.
- minArguments - The minimum number of arguments required by this expression type. The value must be zero or higher integer value.
- maxArguments - The maximum number of arguments required by this expression type. It must be an integer value greater or equal to the minArgments value, or "*" for unbounded, i.e. no upper limit on the maximum. The default value is "*" for unbounded.
- isNegatable - Indicates whether the expression type can be negated, i.e. applied with a NotExpression. The default value is false.
- isOptionable - Indicates whether the custom expression type can be optional and skipped in a filter specification if none of its expected argument values are provided. The default value is false.

<!ELEMENT aggregateExpressionTypes (aggregateType+)>

A grouping of one or more aggregateType elements, defining the types of aggregate expression contributed by this extension for all its supported data set types.

<!ELEMENT aggregateType (variableRestriction*)>

<!ATTLIST aggregateType

id CDATA #REQUIRED

displayName CDATA #IMPLIED

description CDATA #IMPLIED

class CDATA #IMPLIED

minInputVariables CDATA "1"

maxInputVariables CDATA "1"

canIgnoreDuplicates (true | false) "false"

canIgnoreNull (true | false) "false"

>

Defines a type of aggregate expression contributed by this extension.

- id - The id that uniquely identifies this aggregate type within the extension.
- displayName - A translatable name that will be used to refer to this particular aggregate expression type in dialogs presented to the user. Default to the expression id if no name is specified. The name should be unique within the extension.
- description - A brief translatable description of this type of aggregate. It may be used to describe this particular aggregate type in dialogs presented to the user.
- class - The fully qualified name of a concrete implementation class of this custom aggregate type
  Must extend from the org.eclipse.datatools.connectivity.oda.spec.result.CustomAggregate base class. The extended class must be public with a public 0-argument constructor.
- minInputVariables - The minimum number of input source variables required by this aggregate expression type. The value must be zero or higher integer value. The default value is "1".
- maxInputVariables - The maximum number of input source variables required by this aggregate expression type. It must be an integer value greater or equal to the minInputVariables value, or "*" for unbounded, i.e. no upper limit on the maximum. The default value is "1".
- canIgnoreDuplicates - Indicates whether the aggregate type is capable of ignoring duplicate values of its input source variable. The default value is false.
- canIgnoreNull - Indicates whether the aggregate type is capable of ignoring null values of its input source variable. The default value is false.

<!ELEMENT variableRestriction ((variableOdaDataTypeRestriction | variableClassRestriction))*>

<!ATTLIST variableRestriction

variableType (ResultSetColumn|InstanceOf|QueryExpression) "ResultSetColumn"

>

Restriction on the type of variables that can be applied with the expression.

- variableType - The type of variables that can be applied with the associated expression. The ResultSetColumn variable type is applied as the default restriction, if none is specified. A QueryExpression variable type is a superset that covers any value expression types including a ResultSetColumn reference. Further restriction on a type of variable, such as the data types, may be defined by its type-specific variable restriction element. No further restrictions exist if none is specified.

<!ELEMENT variableOdaDataTypeRestriction EMPTY>

<!ATTLIST variableOdaDataTypeRestriction

odaScalarDataType (String|Integer|Double|Decimal|Date|Time|Timestamp|Boolean|Blob|Clob|JavaObject)

>

The restriction on the ODA data types of a variable that can be applied with this expression. For example, a string pattern matching expression would restrict its use with a string-typed variable. An expression has no data type restriction if none is specified.

- odaScalarDataType - A compatible data type of the target variable. It is used to restrict the data type of variables that can be applied with this expression type. For example, a pattern matching expression may only be applicable to a variable of the String data type. It must be an ODA scalar data type supported by the ODA data source provider, as defined in its datasource extension's dataSet.dataTypeMapping.

<!ELEMENT variableClassRestriction EMPTY>

<!ATTLIST variableClassRestriction

class CDATA #REQUIRED

>

The restriction on the type of instance variables that can be applied with this expression. An expression has no restriction on the type of instance variable if none is specified.

- class - The concrete class name of an instance variable.

<!ELEMENT supportedDataSetType EMPTY>

<!ATTLIST supportedDataSetType

odaDataSourceId CDATA #REQUIRED

odaDataSetId CDATA #REQUIRED

>

The ODA data set type to which this extension contributes filtering support.

- odaDataSourceId - A fully qualified id that uniquely identifies the ODA data source type to which this extension contributes filtering support. Its value must match the dataSource.id attribute value defined in the org.eclipse.datatools.connectivity.oda.dataSource extension of the supported ODA runtime driver.
- odaDataSetId - An id that uniquely identifies the ODA data set type within the supported data source type, whose id is specified in the odaDataSourceId attribute. Its value must match the dataSet.id attribute value defined within the org.eclipse.datatools.connectivity.oda.dataSource extension of the supported ODA runtime driver.

<!ELEMENT supportedOdaFilterExpression EMPTY>

<!ATTLIST supportedOdaFilterExpression

name (AndExpression|OrExpression|NotExpression)

>

The type of ODA composite filter expression supported by the extension for all its supported data set types. It must be one of the built-in concrete filter expressions pre-defined by the ODA filter framework.

- name -

<!ELEMENT supportsRowOrdering EMPTY>

<!ATTLIST supportsRowOrdering

nullValueOrdering (true | false)

>

Indicates this extension contributes dynamic row ordering of its result sets for all its supported data set types. Absence of this element indicates no support.

- nullValueOrdering - Indicates whether this row ordering support can also handle ordering of null vs. non-null values in the row order. The default value is false for no control over null value ordering.

<!ELEMENT supportsCombiningQueries (#PCDATA)>

Indicates this extension contributes dynamic operation that combines two or more queries for all its supported data set types. Absence of this element indicates no support. @since 3.4 (DTP 1.11)

<!ELEMENT valueExpressionTypes (combinedOperatorTypes? , functionExpressionType*)>

<!ATTLIST valueExpressionTypes

supportsNestedExpressions (true | false)

>

A grouping of value expression type elements, defining the types of value expression supported and contributed by this extension for all its supported data set types. An extension must implement support of the simple and column value expression types. Support of complex expression types is optional and declared in this element.

- supportsNestedExpressions - Indicates whether this extension supports handling of nested value expression type. The default value is false for no support.

<!ELEMENT combinedOperatorTypes (supportedOdaCombinedOperator* , combinedOperatorType*)>

A grouping of supportedOdaCombinedOperator and combinedOperatorType elements, defining the types of expression combined operator supported or contributed by this extension for all its supported data set types.

<!ELEMENT supportedOdaCombinedOperator EMPTY>

<!ATTLIST supportedOdaCombinedOperator

id (Add|Subtract|Multiply|Divide|Concatenate)

class CDATA #IMPLIED

>

The type of ODA value expression combined operator supported by the extension for all its supported data set types. It must be one of the built-in CombinedValueExpressionOperator types pre-defined by the ODA framework.

- id - The id of an ODA built-in combined operator for combining 2 value expressions.
- class - The fully qualified name of a concrete implementation class that extends this built-in combined operator.
  The class must extend the org.eclipse.datatools.connectivity.oda.spec.valueexpr.CombinedValueExpressionOperator base class. The extended class must be public with a public 0-argument constructor. Defaults to the built-in operator class.

<!ELEMENT combinedOperatorType EMPTY>

<!ATTLIST combinedOperatorType

id CDATA #REQUIRED

displayName CDATA #IMPLIED

literal CDATA #REQUIRED

class CDATA #IMPLIED

>

Defines a type of custom combined operator contributed by this extension.

- id - The id that uniquely identifies this type of combined operator within the extension.
- displayName - A translatable name that will be used to refer to this particular combined operator type in dialogs presented to the user. Default to the operator id if no name is specified. The display name should be unique within the extension.
- literal - The default literal representation of this custom combined operator.
- class - The fully qualified name of a concrete implementation class of this custom combined operator.
  Must extend from the org.eclipse.datatools.connectivity.oda.spec.valueexpr.CombinedValueExpressionOperator base class. The extended class must be public with a public 0-argument constructor.

<!ELEMENT functionExpressionType (variableRestriction*)>

<!ATTLIST functionExpressionType

id CDATA #REQUIRED

name CDATA #IMPLIED

displayName CDATA #IMPLIED

description CDATA #IMPLIED

class CDATA #IMPLIED

minArguments CDATA "1"

maxArguments CDATA "1"

canIgnoreDuplicates (true | false) "false"

>

Defines a type of custom function value expression contributed by this extension. Its variableRestriction sub-element defines the type of expression variable that can be associated with this function type. The precise data types of the function argument(s) and return value are implementation-specific.

- id - The id that uniquely identifies this type of function value expression within the extension.
- name - The expression name of this function type. Default to the function id if no name is specified. The name should be unique within the extension.
- displayName - A translatable name that will be used to refer to this particular function expression type in dialogs presented to the user. Default to the function name if no display name is specified. The display name should be unique within the extension.
- description - A brief translatable description of this type of function expression. It may be used to describe this particular function type in dialogs presented to the user.
- class - The fully qualified name of a concrete implementation class of this custom function type.
  Must extend from the org.eclipse.datatools.connectivity.oda.spec.valueexpr.CustomFunction base class. The extended class must be public with a public 0-argument constructor.
- minArguments - The minimum number of arguments required by this function type. The value must be zero or higher integer value. The default value is "1".
- maxArguments - The maximum number of arguments required by this function type. It must be an integer value greater or equal to the minArgments value, or "*" for unbounded, i.e. no upper limit on the maximum. The default value is "1".
- canIgnoreDuplicates - Indicates whether this function type is capable of ignoring duplicate values of its input variable. The default value is false.

###### API Information:

See the Java interfaces and classes in the org.eclipse.datatools.connectivity.oda.spec package and its sub-packages.

###### Supplied Implementation:

A sample implementation of this extension point can be found in the org.eclipse.datatools.connectivity.oda.consumer.testdriver project in DTP Connectivity Git repository under the org.eclipse.datatools.connectivity/tests/ folder.

Copyright (c) 2009, 2014 Actuate Corporation. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html