Interface RecipeQuery

All Superinterfaces:
Extensible, OsidBrowsableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, OsidSourceableQuery, Suppliable

public interface RecipeQuery extends OsidObjectQuery, OsidSourceableQuery

This is the query for searching recipes. Each method match specifies an AND term while multiple invocations of the same method produce a nested OR .

  • Method Details

    • matchTotalEstimatedDuration

      void matchTotalEstimatedDuration(Duration start, Duration end, boolean match)
      Matches recipes with an estimated duration between the given range inclusive.
      Parameters:
      start - starting duration
      end - ending duration
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - start is greater than end
      NullArgumentException - start or end is null
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyTotalEstimatedDuration

      void matchAnyTotalEstimatedDuration(boolean match)
      Matches recipes with any estimated duration.
      Parameters:
      match - true to match directions with any estimated duration, false to match directions with no estimated duration
      Compliance:
      mandatory - This method must be implemented.
    • clearTotalEstimatedDurationTerms

      void clearTotalEstimatedDurationTerms()
      Clears the duration query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAssetId

      void matchAssetId(Id assetId, boolean match)
      Sets the asset Id for this query.
      Parameters:
      assetId - the asset Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - assetId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAssetIdTerms

      void clearAssetIdTerms()
      Clears the asset Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAssetQuery

      boolean supportsAssetQuery()
      Tests if an AssetQuery is available.
      Returns:
      true if an asset query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAssetQuery

      AssetQuery getAssetQuery()
      Gets the query for an asset. Multiple retrievals produce a nested OR term.
      Returns:
      the asset query
      Throws:
      UnimplementedException - supportsAssetQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAssetQuery()} is {@code true} .
    • matchAnyAsset

      void matchAnyAsset(boolean match)
      Matches directions with any asset.
      Parameters:
      match - true to match directions with any asset, false to match directions with no assets
      Compliance:
      mandatory - This method must be implemented.
    • clearAssetTerms

      void clearAssetTerms()
      Clears the asset query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDirectionId

      void matchDirectionId(Id qualifierId, boolean match)
      Sets the direction Id for this query.
      Parameters:
      qualifierId - the direction Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - directionId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearDirectionIdTerms

      void clearDirectionIdTerms()
      Clears the direction Id query terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsDirectionQuery

      boolean supportsDirectionQuery()
      Tests if a DirectionQuery is available.
      Returns:
      true if a direction query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getDirectionQuery

      DirectionQuery getDirectionQuery()
      Gets the query for a direction. Multiple retrievals produce a nested OR term.
      Returns:
      the direction query
      Throws:
      UnimplementedException - supportsDirectionQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsDirectionQuery()} is {@code true} .
    • matchAnyDirection

      void matchAnyDirection(boolean match)
      Matches recipes that have any direction.
      Parameters:
      match - true to match recipes with any direction, false to match recipes with no direction
      Compliance:
      mandatory - This method must be implemented.
    • clearDirectionTerms

      void clearDirectionTerms()
      Clears the direction query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchTotalDuration

      void matchTotalDuration(Duration start, Duration end, boolean match)
      Matches recipes with an estimated duration between the given range inclusive.
      Parameters:
      start - starting duration
      end - ending duration
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - start is greater than end
      NullArgumentException - start or end is null
      Compliance:
      mandatory - This method must be implemented.
    • clearTotalDurationTerms

      void clearTotalDurationTerms()
      Clears the duration query terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCookbookId

      void matchCookbookId(Id cookbookId, boolean match)
      Sets the award Id for this query to match recipes assigned to cookbooks.
      Parameters:
      cookbookId - a cookbook Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - cookbookId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCookbookIdTerms

      void clearCookbookIdTerms()
      Clears the cookbook Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCookbookQuery

      boolean supportsCookbookQuery()
      Tests if a CookbookQuery is available.
      Returns:
      true if a cookbook query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCookbookQuery

      CookbookQuery getCookbookQuery()
      Gets the query for a cookbook. Multiple retrievals produce a nested OR term.
      Returns:
      the cookbook query
      Throws:
      UnimplementedException - supportsCookbookQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCookbookQuery()} is {@code true} .
    • clearCookbookTerms

      void clearCookbookTerms()
      Clears the cookbook query terms.
      Compliance:
      mandatory - This method must be implemented.
    • getRecipeQueryRecord

      RecipeQueryRecord getRecipeQueryRecord(Type recipeRecordType) throws OperationFailedException, PermissionDeniedException
      Gets the recipe query record corresponding to the given Recipe record Type .Multiple record retrievals produce a nested OR term.
      Parameters:
      recipeRecordType - a recipe record type
      Returns:
      the recipe query record
      Throws:
      NullArgumentException - recipeRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      UnsupportedException - hasRecordType(recipeRecordType) is false
      Compliance:
      mandatory - This method must be implemented.