官方文档:
org.springframework.data.mongodb.core.aggregation
Class LookupOperation
- java.lang.Object
-
- org.springframework.data.mongodb.core.aggregation.LookupOperation
-
-
All Implemented Interfaces:
- AggregationOperation, FieldsExposingAggregationOperation, FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation
public class LookupOperation extends Object implements FieldsExposingAggregationOperation, FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation
Encapsulates the aggregation framework$lookup
-operation. We recommend to use the static factory methodAggregation.lookup(String, String, String, String)
instead of creating instances of this class directly.-
Since:
- 1.9 Author:
- Alessio Fachechi, Christoph Strobl, Mark Paluch See Also:
- MongoDB Aggregation Framework: $lookup
-
-
Nested Class Summary
Modifier and Type Class and Description static interface
LookupOperation.AsBuilder
static interface
LookupOperation.ForeignFieldBuilder
static interface
LookupOperation.FromBuilder
static interface
LookupOperation.LocalFieldBuilder
static class
LookupOperation.LookupOperationBuilder
Builder for fluentLookupOperation
creation.-
Nested classes/interfaces inherited from interface org.springframework.data.mongodb.core.aggregation.FieldsExposingAggregationOperation
FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation
-
-
Constructor Summary
Constructor and Description LookupOperation(Field from, Field localField, Field foreignField, Field as)
Creates a newLookupOperation
for the givenField
s.
-
Method Summary
Modifier and Type Method and Description ExposedFields
getFields()
Returns the fields exposed by theAggregationOperation
.static LookupOperation.FromBuilder
newLookup()
Get a builder that allows creation ofLookupOperation
.org.bson.Document
toDocument(AggregationOperationContext context)
-
-
-
Method Detail
-
getFields
public ExposedFields getFields()
Description copied from interface:FieldsExposingAggregationOperation
Returns the fields exposed by theAggregationOperation
.-
Specified by:
-
getFields
in interfaceFieldsExposingAggregationOperation
Returns:
- will never be null.
-
-
toDocument
public org.bson.Document toDocument(AggregationOperationContext context)
Description copied from interface:AggregationOperation
-
Specified by:
-
toDocument
in interfaceAggregationOperation
Returns:
- the Document
-
-
newLookup
public static LookupOperation.FromBuilder newLookup()
Get a builder that allows creation ofLookupOperation
.-
Returns:
-
-