Package com.mongodb.client.model
Class UnwindOptions
java.lang.Object
com.mongodb.client.model.UnwindOptions
The options for an unwind aggregation pipeline stage
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the includeArrayIndex field if set or nullincludeArrayIndex
(String arrayIndexFieldName) Sets the field to be used to store the array index of the unwound itemIf true the unwind stage will include documents that have null values or empty arrayspreserveNullAndEmptyArrays
(Boolean preserveNullAndEmptyArrays) Sets true if the unwind stage should include documents that have null values or empty arraystoString()
-
Constructor Details
-
UnwindOptions
public UnwindOptions()
-
-
Method Details
-
isPreserveNullAndEmptyArrays
If true the unwind stage will include documents that have null values or empty arrays- Returns:
- the preserve null values and empty arrays value or null
-
preserveNullAndEmptyArrays
Sets true if the unwind stage should include documents that have null values or empty arrays- Parameters:
preserveNullAndEmptyArrays
- flag depicting if the unwind stage should include documents that have null values or empty arrays- Returns:
- this
-
getIncludeArrayIndex
Gets the includeArrayIndex field if set or null- Returns:
- the includeArrayIndex field if set or null
-
includeArrayIndex
Sets the field to be used to store the array index of the unwound item- Parameters:
arrayIndexFieldName
- the field to be used to store the array index of the unwound item- Returns:
- this
-
toString
-