## org.eclipse.datatools.connectivity.oda.spec.result.filter
Class CustomExpression

    java.lang.Object
      org.eclipse.datatools.connectivity.oda.spec.result.FilterExpression
          org.eclipse.datatools.connectivity.oda.spec.result.filter.AtomicExpression
              org.eclipse.datatools.connectivity.oda.spec.result.filter.CustomExpression

All Implemented Interfaces:
  org.eclipse.core.runtime.IExecutableExtension

    public class CustomExpression

extends AtomicExpression
implements org.eclipse.core.runtime.IExecutableExtension

Represents an instance of custom filter expression contributed by an extension of the org.eclipse.datatools.connectivity.oda.dynamicResultSet extension point.

Since:
  3.2 (DTP 1.7)

Method Summary
`java.lang.Object` `getData(java.lang.String key)` Gets the value of an extension-defined property of the specified name.
`java.lang.String` `getDeclaringExtensionId()` Gets the unique id of the ODA dynamicResultSet extension that declares this custom expression type.
`FilterExpressionDefinition` `getDefinition()` Gets the definition of this expression's capabilities and metadata, as registered by the provider in its extension of the org.eclipse.datatools.connectivity.oda.dynamicResultSet extension point.
`java.lang.String` `getId()` Gets the expression id.
`java.lang.String` `getName()` Gets the name of this filter expression type.
`java.lang.String` `getQualifiedId()` Returns the qualified id of this expression type.
`boolean` `isNegatable()` Indicates whether this expression can be negated.
`boolean` `isOptionable()` Indicates whether this expression can be optional and skipped in a filter specification if all its expected argument values are null.
`void` `setData(java.lang.String key, java.lang.Object value)` Sets the value of an extension-defined property of the specified name.
`void` `setInitializationData(org.eclipse.core.runtime.IConfigurationElement exprElement, java.lang.String propertyName, java.lang.Object data)`
`boolean` `supportsDataSetType(java.lang.String odaDataSourceId, java.lang.String odaDataSetId)` Indicates whether this expression can be applied to the specified data set type within the data source type.
`boolean` `supportsDataSetType(SupportedDataSetType dataSetType)` Indicates whether this expression can be applied to the specified data set type.
`void` `validateSyntax(ValidationContext context)` Performs syntactic validation of this expression in the specified context.

Methods inherited from class org.eclipse.datatools.connectivity.oda.spec.result.filter.AtomicExpression
`getArguments, getVariable, setArguments, setVariable, toString, validate`

Methods inherited from class org.eclipse.datatools.connectivity.oda.spec.result.FilterExpression
`validate`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### setInitializationData

    public void setInitializationData(org.eclipse.core.runtime.IConfigurationElement exprElement,
                                      java.lang.String propertyName,
                                      java.lang.Object data)
                               throws org.eclipse.core.runtime.CoreException

  Specified by:
    `setInitializationData` in interface `org.eclipse.core.runtime.IExecutableExtension`
  Throws:
    `org.eclipse.core.runtime.CoreException`

### getId

    public java.lang.String getId()

  Gets the expression id. It is unique within the contributing extension.

  Returns:
    the expression id

### getDeclaringExtensionId

    public java.lang.String getDeclaringExtensionId()

  Gets the unique id of the ODA dynamicResultSet extension that declares this custom expression type.

  Returns:
    unique id of declaring extension

### getQualifiedId

    public java.lang.String getQualifiedId()

  Description copied from class: `FilterExpression`
  Returns the qualified id of this expression type.

  Overrides:
    `getQualifiedId` in class `FilterExpression`
  Returns:
    qualified id

### getName

    public java.lang.String getName()

  Description copied from class: `FilterExpression`
  Gets the name of this filter expression type. It may be used to identify this in user messages or logging.

  Overrides:
    `getName` in class `FilterExpression`
  Returns:
    name of this filter expression

### supportsDataSetType

    public boolean supportsDataSetType(java.lang.String odaDataSourceId,
                                       java.lang.String odaDataSetId)

  Indicates whether this expression can be applied to the specified data set type within the data source type.

  Parameters:
    `odaDataSourceId` - id of an ODA data source extension
    `odaDataSetId` - id of an ODA data set defined within the data source extension
  Returns:
    true if this can be applied to the specified data set type; false otherwise

### supportsDataSetType

    public boolean supportsDataSetType(SupportedDataSetType dataSetType)

  Indicates whether this expression can be applied to the specified data set type.

  Parameters:
    `dataSetType` - an instance of `SupportedDataSetType`
  Returns:
    true if this can be applied to the specified ODA data set type; false otherwise

### getData

    public java.lang.Object getData(java.lang.String key)

  Gets the value of an extension-defined property of the specified name. An extension contributor may have arbitrary objects associated with an expression.

  Parameters:
    `key` - the name of property
  Returns:
    the value of the named property, or null if it has not been set

### setData

    public void setData(java.lang.String key,
                        java.lang.Object value)

  Sets the value of an extension-defined property of the specified name. An extension contributor may use this to associate arbitrary objects with an expression.

  Parameters:
    `key` - the name of property
    `value` - the new value of the named property

### getDefinition

    public FilterExpressionDefinition getDefinition()

  Gets the definition of this expression's capabilities and metadata, as registered by the provider in its extension of the org.eclipse.datatools.connectivity.oda.dynamicResultSet extension point.

  Returns:
    definition of this custom filter expression

### validateSyntax

    public void validateSyntax(ValidationContext context)
                        throws OdaException

  Description copied from class: `FilterExpression`
  Performs syntactic validation of this expression in the specified context.

  Specified by:
    `validateSyntax` in class `FilterExpression`
  Parameters:
    `context` - context for validation; may be null which would limit the scope of validation
  Throws:
    `OdaException` - if validation failed. The concrete cause is defined by the subclass implementing this method.

### isNegatable

    public boolean isNegatable()

  Description copied from class: `FilterExpression`
  Indicates whether this expression can be negated.

  Specified by:
    `isNegatable` in class `FilterExpression`
  Returns:
    true if expression can be negated; false otherwise

### isOptionable

    public boolean isOptionable()

  Description copied from class: `AtomicExpression`
  Indicates whether this expression can be optional and skipped in a filter specification if all its expected argument values are null. Default value is false if none is specified in the extension.

  Overrides:
    `isOptionable` in class `AtomicExpression`
  Returns:
    true if this expression can be skipped when no argument values are available; false otherwise