com.holonplatform.datastore.mongo.core.resolver

## Interface MongoExpressionResolver<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:
    BsonExpressionResolver<E>, MongoDatastoreExpressionResolver<E,R>

      public interface MongoExpressionResolver<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 `MongoResolutionContext` resolution context.

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

  Since:
    5.2.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<MongoExpressionResolver>` | `getDefaultResolvers()` Get the default `MongoExpressionResolver`s.
    `default Optional<R>` | `resolve(E expression, com.holonplatform.core.ExpressionResolver.ResolutionContext context)`
    `Optional<R>` | `resolve(E expression, MongoResolutionContext<?> 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,
                              MongoResolutionContext<?> context)
                       throws com.holonplatform.core.Expression.InvalidExpressionException

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

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

Copyright © 2019 The Holon Platform. All rights reserved.