## org.eclipse.datatools.connectivity.oda.spec
Interface IValidator

    public interface IValidator

Interface for a custom validator contributed by an extension of the ODA dynamicResultSet extension point. It may be used by an ODA consumer to validate a dynamic result set specification or an extension-defined expression that may be applied at runtime.
It is implementation-dependent on the scope of validation covered, and whether it requires opening a connection to the underlying data source.

Since:
  3.3 (DTP 1.8)

Method Summary
`void` `closeConnection(ValidationContext.Connection validationConnection)` Closes any connection handle that a custom validator may have cached in the specified context.
`void` `validate(AggregateExpression aggrExpr, ValidationContext context)` Validates the specified aggregate expression in the specified context.
`void` `validate(FilterExpression filterExpr, ValidationContext context)` Validates the specified filter expression in the specified context.
`void` `validate(QuerySpecification querySpec, ValidationContext context)` Validates the specified query specification in the specified context.
`void` `validate(ResultSetSpecification resultSetSpec, ValidationContext context)` Validates the specified result set specification in the specified context.
`void` `validate(SortSpecification sortSpec, ValidationContext context)` Validates the specified sort specification in the specified context.
`void` `validate(ValueExpression valueExpr, ValidationContext context)` Validates the specified value expression in the specified context.
`void` `validateSyntax(AggregateExpression aggrExpr, ValidationContext context)` Performs syntactic validation of the specified aggregate expression in the specified context.
`void` `validateSyntax(FilterExpression filterExpr, ValidationContext context)` Performs syntactic validation of the specified filter expression in the specified context.
`void` `validateSyntax(ValueExpression valueExpr, ValidationContext context)` Performs syntactic validation of the specified value expression in the specified context.

Method Detail

### validate

    void validate(QuerySpecification querySpec,
                  ValidationContext context)
                  throws OdaException

  Validates the specified query specification in the specified context.

  Parameters:
    `querySpec` - a `QuerySpecification` to validate
    `context` - context for validation; may be null which would limit the scope of validation; should contain the `ValidationContext.DATA_PROPERTY_QUERY_TEXT` context property value to extend the scope of validation
  Throws:
    `OdaException` - if validation failed. The cause is defined by the class implementing this method.

### validate

    void validate(ResultSetSpecification resultSetSpec,
                  ValidationContext context)
                  throws OdaException

  Validates the specified result set specification in the specified context.

  Parameters:
    `resultSetSpec` - a `ResultSetSpecification` to validate
    `context` - context for validation; may be null, which would limit the scope of validation; should contain the `ValidationContext.DATA_PROPERTY_QUERY_TEXT` context property value to extend the scope of validation
  Throws:
    `OdaException` - if validation failed. The cause is defined by the class implementing this method.
  Since:
    3.2.2 (DTP 1.7.2)
  See Also:
    `ValidationContext#setQueryText(String)}`, `ValidationContext#setConnectionProfile(Object)}`

### validate

    void validate(FilterExpression filterExpr,
                  ValidationContext context)
                  throws OdaException

  Validates the specified filter expression in the specified context.

  Parameters:
    `filterExpr` - the filter expression to validate; may be the root of an expression tree
    `context` - context for validation; may be null which would limit the scope of validation
  Throws:
    `OdaException` - if validation failed. The cause is defined by the class implementing this method.

### validateSyntax

    void validateSyntax(FilterExpression filterExpr,
                        ValidationContext context)
                        throws OdaException

  Performs syntactic validation of the specified filter expression in the specified context.

  Parameters:
    `filterExpr` - the filter expression to validate; may be a single filter node at the root, or nested within a filter expression tree
    `context` - context for validation; may be null which would limit the scope of validation
  Throws:
    `OdaException` - if validation failed. The cause is defined by the class implementing this method.

### validate

    void validate(AggregateExpression aggrExpr,
                  ValidationContext context)
                  throws OdaException

  Validates the specified aggregate expression in the specified context.

  Parameters:
    `aggrExpr` - aggregate expression to validate
    `context` - context for validation; may be null which would limit the scope of validation
  Throws:
    `OdaException` - if validation failed. The cause is defined by the class implementing this method.

### validateSyntax

    void validateSyntax(AggregateExpression aggrExpr,
                        ValidationContext context)
                        throws OdaException

  Performs syntactic validation of the specified aggregate expression in the specified context.

  Parameters:
    `aggrExpr` - the aggregate expression to validate
    `context` - context for validation; may be null which would limit the scope of validation
  Throws:
    `OdaException` - if validation failed. The cause is defined by the class implementing this method.

### validate

    void validate(ValueExpression valueExpr,
                  ValidationContext context)
                  throws OdaException

  Validates the specified value expression in the specified context.

  Parameters:
    `valueExpr` - value expression to validate
    `context` - context for validation; may be null which would limit the scope of validation
  Throws:
    `OdaException` - if validation failed. The cause is defined by the class implementing this method.
  Since:
    3.2.2 (DTP 1.7.2)

### validateSyntax

    void validateSyntax(ValueExpression valueExpr,
                        ValidationContext context)
                        throws OdaException

  Performs syntactic validation of the specified value expression in the specified context.

  Parameters:
    `valueExpr` - the value expression to validate
    `context` - context for validation; may be null which would limit the scope of validation
  Throws:
    `OdaException` - if validation failed. The cause is defined by the class implementing this method.
  Since:
    3.2.2 (DTP 1.7.2)

### validate

    void validate(SortSpecification sortSpec,
                  ValidationContext context)
                  throws OdaException

  Validates the specified sort specification in the specified context.

  Parameters:
    `sortSpec` - a `SortSpecification` to validate
    `context` - context for validation; may be null which would limit the scope of validation
  Throws:
    `OdaException` - if validation failed. The cause is defined by the class implementing this method.

### closeConnection

    void closeConnection(ValidationContext.Connection validationConnection)

  Closes any connection handle that a custom validator may have cached in the specified context.

  Parameters:
    `validationConnection` - connection context used for online validation
  Since:
    3.2.2 (DTP 1.7.2)