com.holonplatform.datastore.jpa.jpql.context

## Interface JPQLContextExpressionResolver<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:
    JpaDatastoreExpressionResolver<E,R>

      public interface JPQLContextExpressionResolver<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 `JPQLResolutionContext` resultion context.

  If the `ResolutionContext` is not a `JPQLResolutionContext` 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 Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default Optional<R>` | `resolve(E expression, com.holonplatform.core.ExpressionResolver.ResolutionContext context)`
    `Optional<R>` | `resolve(E expression, JPQLResolutionContext 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,
                              JPQLResolutionContext context)
                       throws com.holonplatform.core.Expression.InvalidExpressionException

      Resolve given `expression` into required expression type.
      Parameters:
        `expression` - Expression to resolve
        `context` - Resolution context as a `JPQLResolutionContext`
      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

Copyright © 2019 The Holon Platform. All rights reserved.