Package org.mongojack
Class Aggregation.Pipeline<S>
- java.lang.Object
-
- org.mongojack.AbstractListDecorator<Aggregation.Stage<Object>>
-
- org.mongojack.Aggregation.Pipeline<S>
-
- All Implemented Interfaces:
Iterable<Aggregation.Stage<Object>>
,Collection<Aggregation.Stage<Object>>
,List<Aggregation.Stage<Object>>
,InitializationRequiredForTransformation
- Enclosing class:
- Aggregation<T>
public static class Aggregation.Pipeline<S> extends AbstractListDecorator<Aggregation.Stage<Object>> implements List<Aggregation.Stage<Object>>, InitializationRequiredForTransformation
A fluent Aggregation builder.Type parameter S is the type of value that can be passed to set(String, S), given current latest stage.
-
-
Constructor Summary
Constructors Constructor Description Pipeline(Aggregation.Stage<S> stage)
-
Method Summary
-
Methods inherited from class org.mongojack.AbstractListDecorator
add, addAll, clear, contains, containsAll, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, subList, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
add, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, size, spliterator, subList, toArray, toArray
-
-
-
-
Constructor Detail
-
Pipeline
public Pipeline(Aggregation.Stage<S> stage)
-
-
Method Detail
-
then
public <X> Aggregation.Pipeline<X> then(Aggregation.Stage<X> stage)
-
group
public Aggregation.Pipeline<Aggregation.Group.Accumulator> group(Aggregation.Expression<?> key, Map<String,Aggregation.Group.Accumulator> calculatedFields)
-
group
public Aggregation.Pipeline<Aggregation.Group.Accumulator> group(Aggregation.Expression<?> key)
-
group
public Aggregation.Pipeline<Aggregation.Group.Accumulator> group(String... key)
-
set
public Aggregation.Pipeline<S> set(String field, S value)
-
limit
public Aggregation.Pipeline<Void> limit(int n)
-
match
public Aggregation.Pipeline<Void> match(DBQuery.Query query)
-
project
public Aggregation.Pipeline<Aggregation.Expression<?>> project(DBProjection.ProjectionBuilder projection)
-
project
public Aggregation.Pipeline<Aggregation.Expression<?>> project(String field)
-
project
public Aggregation.Pipeline<Aggregation.Expression<?>> project(String field, Aggregation.Expression<?> value)
-
project
public Aggregation.Pipeline<Aggregation.Expression<?>> project(Collection<String> fields)
-
projectFields
public Aggregation.Pipeline<Aggregation.Expression<?>> projectFields(String... fields)
-
projectField
public Aggregation.Pipeline<Aggregation.Expression<?>> projectField(String field, String... value)
-
skip
public Aggregation.Pipeline<Void> skip(int n)
-
sort
public Aggregation.Pipeline<Void> sort(DBSort.SortBuilder builder)
-
unwind
public Aggregation.Pipeline<Void> unwind(String... path)
-
out
public Aggregation.Pipeline<Void> out(String collectionName)
-
stages
public List<Aggregation.Stage<Object>> stages()
-
initialize
public void initialize(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.databind.JavaType type, JacksonCodecRegistry codecRegistry)
- Specified by:
initialize
in interfaceInitializationRequiredForTransformation
-
delegate
protected List<Aggregation.Stage<Object>> delegate()
- Specified by:
delegate
in classAbstractListDecorator<Aggregation.Stage<Object>>
-
set
public Aggregation.Stage<Object> set(int index, Aggregation.Stage<Object> element)
- Specified by:
set
in interfaceList<S>
- Overrides:
set
in classAbstractListDecorator<Aggregation.Stage<Object>>
-
add
public void add(int index, Aggregation.Stage<Object> element)
- Specified by:
add
in interfaceList<S>
- Overrides:
add
in classAbstractListDecorator<Aggregation.Stage<Object>>
-
remove
public Aggregation.Stage<Object> remove(int index)
- Specified by:
remove
in interfaceList<S>
- Overrides:
remove
in classAbstractListDecorator<Aggregation.Stage<Object>>
-
addAll
public boolean addAll(int index, Collection<? extends Aggregation.Stage<Object>> c)
- Specified by:
addAll
in interfaceList<S>
- Overrides:
addAll
in classAbstractListDecorator<Aggregation.Stage<Object>>
-
replaceAll
public void replaceAll(UnaryOperator<Aggregation.Stage<Object>> operator)
- Specified by:
replaceAll
in interfaceList<S>
- Overrides:
replaceAll
in classAbstractListDecorator<Aggregation.Stage<Object>>
-
sort
public void sort(Comparator<? super Aggregation.Stage<Object>> c)
- Specified by:
sort
in interfaceList<S>
- Overrides:
sort
in classAbstractListDecorator<Aggregation.Stage<Object>>
-
-