com.holonplatform.datastore.jdbc.composer.resolvers

## Interface SQLContextExpressionResolver<E extends com.holonplatform.core.Expression,R extends com.holonplatform.core.Expression>

- Type Parameters:
    `E` - Expression type
    `R` - Resolved expression type
  All Superinterfaces:
    com.holonplatform.core.Expression.ExpressionResolverFunction<E,R>, com.holonplatform.core.ExpressionResolver<E,R>, Serializable
  All Known Subinterfaces:
    JdbcDatastoreExpressionResolver<E,R>, SQLExpressionResolver<E>

      public interface SQLContextExpressionResolver<E extends com.holonplatform.core.Expression,R extends com.holonplatform.core.Expression>
      extends com.holonplatform.core.ExpressionResolver<E,R>

  An `ExpressionResolver` to be used with a `SQLCompositionContext` resultion context.

  If the `ResolutionContext` is not a `SQLCompositionContext` an exception is thrown.

  Since:
    5.1.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.ExpressionResolver

      `com.holonplatform.core.ExpressionResolver.ExpressionResolverBuilder<C extends com.holonplatform.core.ExpressionResolver.ExpressionResolverBuilder<C>>, com.holonplatform.core.ExpressionResolver.ExpressionResolverHandler, com.holonplatform.core.ExpressionResolver.ExpressionResolverProvider, com.holonplatform.core.ExpressionResolver.ExpressionResolverSupport, com.holonplatform.core.ExpressionResolver.ResolutionContext`

  - ### Field Summary

    - ### Fields inherited from interface com.holonplatform.core.ExpressionResolver

      `DEFAULT_PRIORITY`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Iterable<SQLContextExpressionResolver>` | `getDefaultResolvers()` Get the default `SQLContextExpressionResolver`s.
    `default Optional<R>` | `resolve(E expression, com.holonplatform.core.ExpressionResolver.ResolutionContext context)`
    `Optional<R>` | `resolve(E expression, SQLCompositionContext context)` Resolve given `expression` into required expression type.

    - ### Methods inherited from interface com.holonplatform.core.ExpressionResolver

      `create, getExpressionType, getResolvedType`

- - ### Method Detail

    - #### resolve

          default Optional<R> resolve(E expression,
                                      com.holonplatform.core.ExpressionResolver.ResolutionContext context)
                               throws com.holonplatform.core.Expression.InvalidExpressionException

      Specified by:
        `resolve` in interface `com.holonplatform.core.Expression.ExpressionResolverFunction<E extends com.holonplatform.core.Expression,R extends com.holonplatform.core.Expression>`
      Throws:
        `com.holonplatform.core.Expression.InvalidExpressionException`

    - #### resolve

          Optional<R> resolve(E expression,
                              SQLCompositionContext context)
                       throws com.holonplatform.core.Expression.InvalidExpressionException

      Resolve given `expression` into required expression type.
      Parameters:
        `expression` - Expression to resolve
        `context` - Resolution context as a `SQLCompositionContext`
      Returns:
        The resolved expression, or an empty Optional if this resolver is not able to resolve given expression.
      Throws:
        `com.holonplatform.core.Expression.InvalidExpressionException` - If an expression resolution error occurred

    - #### getDefaultResolvers

          static Iterable<SQLContextExpressionResolver> getDefaultResolvers()

      Get the default `SQLContextExpressionResolver`s.
      Returns:
        the default expression resolvers

Copyright © 2019 The Holon Platform. All rights reserved.