Interface Resolver<ProductType,CriteriaType>

Type Parameters:
ProductType - the type of objects produced by this resolver
CriteriaType - the type of criteria to process during resolution

public interface Resolver<ProductType,CriteriaType>
Generic interface for resolvers which process specified criteria and produce some implementation-specific result information.
  • Method Summary

    Modifier and Type
    Method
    Description
    Process the specified criteria and return the resulting instances of the product type which satisfy the criteria.
    Process the specified criteria and return a single instance of the product type which satisfies the criteria.
  • Method Details

    • resolve

      @Nonnull @NonnullElements Iterable<ProductType> resolve(@Nullable CriteriaType criteria) throws ResolverException
      Process the specified criteria and return the resulting instances of the product type which satisfy the criteria.
      Parameters:
      criteria - the criteria to evaluate or process
      Returns:
      instances which satisfy the criteria
      Throws:
      ResolverException - thrown if there is an error processing the specified criteria
    • resolveSingle

      @Nullable ProductType resolveSingle(@Nullable CriteriaType criteria) throws ResolverException
      Process the specified criteria and return a single instance of the product type which satisfies the criteria. If multiple items satisfy the criteria, the choice of which single item to return is implementation-dependent.
      Parameters:
      criteria - the criteria to evaluate or process
      Returns:
      a single instance satisfying the criteria, or null
      Throws:
      ResolverException - thrown if there is an error processing the specified criteria