Module spring.data.mongodb
Class GraphLookupOperation.GraphLookupOperationBuilder
java.lang.Object
org.springframework.data.mongodb.core.aggregation.GraphLookupOperation.GraphLookupOperationBuilder
- Enclosing class:
- GraphLookupOperation
- Author:
- Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionSet the name of the array field added to each output document and return the finalGraphLookupOperation.depthField(String fieldName) Optionally add a depth field fieldName to each traversed document in the search path.maxDepth(long numberOfRecursions) Optionally limit the number of recursions.restrict(CriteriaDefinition criteriaDefinition) Optionally add a query specifying conditions to the recursive search.
-
Method Details
-
maxDepth
Optionally limit the number of recursions.- Parameters:
numberOfRecursions- must be greater or equal to zero.- Returns:
- this.
-
depthField
Optionally add a depth field fieldName to each traversed document in the search path.- Parameters:
fieldName- must not be null or empty.- Returns:
- this.
-
restrict
public GraphLookupOperation.GraphLookupOperationBuilder restrict(CriteriaDefinition criteriaDefinition) Optionally add a query specifying conditions to the recursive search.- Parameters:
criteriaDefinition- must not be null.- Returns:
-
as
Set the name of the array field added to each output document and return the finalGraphLookupOperation. Contains the documents traversed in the $graphLookup stage to reach the document.- Parameters:
fieldName- must not be null or empty.- Returns:
- the final
GraphLookupOperation.
-