Module spring.data.mongodb
Class SetWindowFieldsOperation.RangeWindowBuilder
java.lang.Object
org.springframework.data.mongodb.core.aggregation.SetWindowFieldsOperation.RangeWindowBuilder
- Enclosing class:
- SetWindowFieldsOperation
Builder API for a
SetWindowFieldsOperation.RangeWindow.- Author:
- Christoph Strobl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build theSetWindowFieldsOperation.RangeWindow.The lower (inclusive) range limit value to add to the value based on the sortBy field.The lower (inclusive) range limit based on the sortBy field.Use current aslowerlimit.Use unbounded aslowerlimit.The upper (inclusive) range limit value to add to the value based on the sortBy field.The upper (inclusive) range limit based on the sortBy field.Use current asupperlimit.Use unbounded asupperlimit.unit(SetWindowFieldsOperation.WindowUnit windowUnit) Set theunitor measure for the givenSetWindowFieldsOperation.Window.
-
Constructor Details
-
RangeWindowBuilder
public RangeWindowBuilder()
-
-
Method Details
-
from
The lower (inclusive) range limit based on the sortBy field.- Parameters:
lower- eg. current or unbounded.- Returns:
- this.
-
to
The upper (inclusive) range limit based on the sortBy field.- Parameters:
upper- eg. current or unbounded.- Returns:
- this.
-
from
The lower (inclusive) range limit value to add to the value based on the sortBy field. Use a negative integer for a position before the current document. Use a positive integer for a position after the current document.0is the current document position.- Parameters:
lower-- Returns:
- this.
-
to
The upper (inclusive) range limit value to add to the value based on the sortBy field. Use a negative integer for a position before the current document. Use a positive integer for a position after the current document.0is the current document position.- Parameters:
upper-- Returns:
- this.
-
fromCurrent
Use current aslowerlimit.- Returns:
- this.
-
fromUnbounded
Use unbounded aslowerlimit.- Returns:
- this.
-
toCurrent
Use current asupperlimit.- Returns:
- this.
-
toUnbounded
Use unbounded asupperlimit.- Returns:
- this.
-
unit
public SetWindowFieldsOperation.RangeWindowBuilder unit(SetWindowFieldsOperation.WindowUnit windowUnit) Set theunitor measure for the givenSetWindowFieldsOperation.Window.- Parameters:
windowUnit- must not be null. Can be on ofSetWindowFieldsOperation.Windows.- Returns:
- this.
-
build
Build theSetWindowFieldsOperation.RangeWindow.- Returns:
- new instance of
SetWindowFieldsOperation.RangeWindow.
-