Package de.caluga.morphium.aggregation
Interface Aggregator<T,R>
-
- All Known Implementing Classes:
AggregatorImpl,InMemAggregator
public interface Aggregator<T,R>User: Stephan Bösebeck Date: 30.08.12 Time: 16:23 Aggregator Framework: represents the aggregator of Mongo 2.2.x. and above $project $match $limit $skip $unwind $group $sort $geoNear - implementation still missing
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAggregator.BucketGranularitystatic classAggregator.GeoNearFieldsstatic classAggregator.MergeActionWhenMatchedstatic classAggregator.MergeActionWhenNotMatched
-
Method Summary
-
-
-
Method Detail
-
getMorphium
Morphium getMorphium()
-
setMorphium
void setMorphium(Morphium m)
-
project
Aggregator<T,R> project(String... m)
-
project
Aggregator<T,R> project(String fld, Expr e)
-
match
Aggregator<T,R> match(Query<T> q)
-
matchSubQuery
Aggregator<T,R> matchSubQuery(Query<?> q)
-
match
Aggregator<T,R> match(Expr q)
-
count
Aggregator<T,R> count(String fld)
-
count
Aggregator<T,R> count(Enum fld)
-
bucket
Aggregator<T,R> bucket(Expr groupBy, List<Expr> boundaries, Expr preset, Map<String,Expr> output)
-
bucketAuto
Aggregator<T,R> bucketAuto(Expr groupBy, int numBuckets, Map<String,Expr> output, Aggregator.BucketGranularity granularity)
-
collStats
Aggregator<T,R> collStats(Boolean latencyHistograms, Double scale, boolean count, boolean queryExecStats)
- Parameters:
latencyHistograms- : if null, no latency statsscale- : if null, no storageStatscount-queryExecStats-- Returns:
-
currentOp
Aggregator<T,R> currentOp(boolean allUsers, boolean idleConnections, boolean idleCursors, boolean idleSessions, boolean localOps)
-
facet
Aggregator<T,R> facet(Map<String,Aggregator> pipeline)
-
geoNear
Aggregator<T,R> geoNear(Map<Aggregator.GeoNearFields,Object> param)
-
graphLookup
Aggregator<T,R> graphLookup(Class<?> fromType, Expr startWith, Enum connectFromField, Enum connectToField, String as, Integer maxDepth, String depthField, Query restrictSearchWithMatch)
-
graphLookup
Aggregator<T,R> graphLookup(Class<?> fromType, Expr startWith, String connectFromField, String connectToField, String as, Integer maxDepth, String depthField, Query restrictSearchWithMatch)
-
graphLookup
Aggregator<T,R> graphLookup(String fromCollection, Expr startWith, String connectFromField, String connectToField, String as, Integer maxDepth, String depthField, Query restrictSearchWithMatch)
-
indexStats
Aggregator<T,R> indexStats()
-
listLocalSessions
Aggregator<T,R> listLocalSessions()
-
listLocalSessionsAllUsers
Aggregator<T,R> listLocalSessionsAllUsers()
-
listSessions
Aggregator<T,R> listSessions()
-
listSessionsAllUsers
Aggregator<T,R> listSessionsAllUsers()
-
collation
Aggregator<T,R> collation(Collation collation)
-
getCollation
Collation getCollation()
-
lookup
Aggregator<T,R> lookup(Class fromType, Enum localField, Enum foreignField, String outputArray, List<Expr> pipeline, Map<String,Expr> let)
-
lookup
Aggregator<T,R> lookup(String fromCollection, String localField, String foreignField, String outputArray, List<Expr> pipeline, Map<String,Expr> let)
-
merge
Aggregator<T,R> merge(String intoDb, String intoCollection, Aggregator.MergeActionWhenMatched matchAction, Aggregator.MergeActionWhenNotMatched notMatchedAction, String... onFields)
-
merge
Aggregator<T,R> merge(String intoCollection, Aggregator.MergeActionWhenMatched matchAction, Aggregator.MergeActionWhenNotMatched notMatchedAction, String... onFields)
-
merge
Aggregator<T,R> merge(String intoCollection, Map<String,Expr> let, List<Map<String,Expr>> machedPipeline, Aggregator.MergeActionWhenNotMatched notMatchedAction, String... onFields)
-
merge
Aggregator<T,R> merge(Class<?> intoCollection, Map<String,Expr> let, List<Map<String,Expr>> machedPipeline, Aggregator.MergeActionWhenMatched matchAction, Aggregator.MergeActionWhenNotMatched notMatchedAction, String... onFields)
-
merge
Aggregator<T,R> merge(String intoDb, String intoCollection)
-
merge
Aggregator<T,R> merge(Class<?> intoCollection)
-
merge
Aggregator<T,R> merge(String intoCollection)
-
out
Aggregator<T,R> out(String collection)
-
out
Aggregator<T,R> out(Class<?> type)
-
out
Aggregator<T,R> out(String db, String collection)
-
redact
Aggregator<T,R> redact(Expr expr)
see https://docs.mongodb.com/manual/reference/operator/aggregation/redact/- Parameters:
expr-- Returns:
-
replaceRoot
Aggregator<T,R> replaceRoot(Expr newRoot)
-
replaceWith
Aggregator<T,R> replaceWith(Expr replacement)
Replaces the input document with the specified document. The operation replaces all existing fields in the input document, including the _id field. With $replaceWith, you can promote an embedded document to the top-level. You can also specify a new document as the replacement.- Parameters:
replacement-- Returns:
-
sample
Aggregator<T,R> sample(int sampleSize)
Randomly selects the specified number of documents from its input.- Parameters:
sampleSize-- Returns:
-
sortByCount
Aggregator<T,R> sortByCount(Expr countBy)
-
unionWith
Aggregator<T,R> unionWith(String collection)
-
unionWith
Aggregator<T,R> unionWith(Aggregator aggregator)
-
unset
Aggregator<T,R> unset(List<String> field)
-
unset
Aggregator<T,R> unset(String... param)
-
unset
Aggregator<T,R> unset(Enum... field)
-
genericStage
Aggregator<T,R> genericStage(String stageName, Object param)
-
limit
Aggregator<T,R> limit(int num)
-
skip
Aggregator<T,R> skip(int num)
-
unwind
Aggregator<T,R> unwind(Expr listField)
-
unwind
Aggregator<T,R> unwind(String listField)
-
sort
Aggregator<T,R> sort(String... prefixed)
-
getCollectionName
String getCollectionName()
-
setCollectionName
void setCollectionName(String cn)
-
getCount
long getCount()
-
aggregateIterable
MorphiumAggregationIterator<T,R> aggregateIterable()
-
aggregate
void aggregate(AsyncOperationCallback<R> callback)
-
aggregateMap
void aggregateMap(AsyncOperationCallback<Map<String,Object>> callback)
-
isExplain
boolean isExplain()
-
setExplain
void setExplain(boolean explain)
-
isUseDisk
boolean isUseDisk()
-
setUseDisk
void setUseDisk(boolean useDisk)
-
getAggregateCmd
AggregateMongoCommand getAggregateCmd()
-
-