Package dev.morphia.aggregation.stages
Class Fill
- java.lang.Object
-
- dev.morphia.aggregation.stages.Stage
-
- dev.morphia.aggregation.stages.Fill
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Fill.Method
Possible methods for defining fill strategies.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Fill()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Fill
field(String name, dev.morphia.aggregation.expressions.impls.ValueExpression value)
Specifies an object indicating how to fill missing values in the target field.Fill
field(String name, Fill.Method method)
Specifies an object indicating how to fill missing values in the target field.Map<String,Object>
fields()
static Fill
fill()
Creates a new $fill stagedev.morphia.aggregation.expressions.impls.Expression
partitionBy()
Fill
partitionBy(dev.morphia.aggregation.expressions.impls.Expression partitionBy)
Specifies an array of fields as the compound key to group the documents.List<String>
partitionByFields()
Fill
partitionByFields(String... fields)
Specifies an array of fields as the compound key to group the documents.Sort[]
sortBy()
Fill
sortBy(Sort... sorts)
Specifies the field or fields to sort the documents within each partition.-
Methods inherited from class dev.morphia.aggregation.stages.Stage
aggregation, stageName
-
-
-
-
Method Detail
-
fill
public static Fill fill()
Creates a new $fill stage- Returns:
- the new stage
-
field
public Fill field(String name, dev.morphia.aggregation.expressions.impls.ValueExpression value)
Specifies an object indicating how to fill missing values in the target field.- Parameters:
name
- the field namevalue
- the value to fill with- Returns:
- this
-
field
public Fill field(String name, Fill.Method method)
Specifies an object indicating how to fill missing values in the target field.- Parameters:
name
- the field namemethod
- the method to use when filling in missing values- Returns:
- this
-
fields
@MorphiaInternal public Map<String,Object> fields()
- Returns:
- this
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
partitionBy
public Fill partitionBy(dev.morphia.aggregation.expressions.impls.Expression partitionBy)
Specifies an array of fields as the compound key to group the documents.- Parameters:
partitionBy
- the partition expression- Returns:
- this
-
partitionBy
@Nullable @MorphiaInternal public dev.morphia.aggregation.expressions.impls.Expression partitionBy()
- Returns:
- this
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
partitionByFields
public Fill partitionByFields(String... fields)
Specifies an array of fields as the compound key to group the documents.- Parameters:
fields
- the fields- Returns:
- this
-
partitionByFields
@Nullable @MorphiaInternal public List<String> partitionByFields()
- Returns:
- this
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
sortBy
public Fill sortBy(Sort... sorts)
Specifies the field or fields to sort the documents within each partition.- Parameters:
sorts
- the sorting values to apply- Returns:
- this
-
-