Class Out<O>
- java.lang.Object
-
- dev.morphia.aggregation.experimental.stages.Stage
-
- dev.morphia.aggregation.experimental.stages.Out<O>
-
- Type Parameters:
O
- the output type used to lookup the collection name
public class Out<O> extends Stage
Takes the documents returned by the aggregation pipeline and writes them to a specified collection. The $out operator must be the last stage in the pipeline. The $out operator lets the aggregation framework return result sets of any size.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Out()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCollection()
Class<?>
getType()
static <O> Out<O>
to(Class<O> type)
Creates a $out stage with target type/collectionstatic Out<org.bson.Document>
to(String collection)
Creates a $out stage with target collection-
Methods inherited from class dev.morphia.aggregation.experimental.stages.Stage
getStageName
-
-
-
-
Method Detail
-
to
public static <O> Out<O> to(Class<O> type)
Creates a $out stage with target type/collection- Type Parameters:
O
- the output type used to lookup the collection name- Parameters:
type
- the type to use to determine the target collection- Returns:
- the new stage
-
to
public static Out<org.bson.Document> to(String collection)
Creates a $out stage with target collection- Parameters:
collection
- the target collection- Returns:
- the new stage
-
getCollection
public String getCollection()
- Returns:
- the collection name
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
getType
public Class<?> getType()
- Returns:
- the type representing the collection
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-