Module spring.data.mongodb
Class DateOperators.DateFromPartsOperatorFactory
java.lang.Object
org.springframework.data.mongodb.core.aggregation.DateOperators.DateFromPartsOperatorFactory
- Enclosing class:
- DateOperators
- Since:
- 2.1
- Author:
- Matt Morrissette, Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionisoWeekYear(Object isoWeekYear) Set the week date year to the given value which must resolve to a weekday in range0 - 9999.isoWeekYearOf(String fieldReference) Set the week date year to the value resolved by following the givenfield reference.isoWeekYearOf(AggregationExpression expression) Set the week date year to the result of the givenexpression.withTimezone(DateOperators.Timezone timezone) Set the year to the given value which must resolve to a calendar year.Set the year to the value resolved by following the givenfield reference.yearOf(AggregationExpression expression) Set the year to the result of the givenexpression.
-
Method Details
-
isoWeekYear
Set the week date year to the given value which must resolve to a weekday in range0 - 9999. Can be a simple value,field referenceorexpression.- Parameters:
isoWeekYear- must not be null.- Returns:
- new instance of
DateOperators.IsoDateFromPartswithDateOperators.Timezoneif set. - Throws:
IllegalArgumentException- if given isoWeekYear is null.
-
isoWeekYearOf
Set the week date year to the value resolved by following the givenfield reference.- Parameters:
fieldReference- must not be null.- Returns:
- new instance of
DateOperators.IsoDateFromPartswithDateOperators.Timezoneif set. - Throws:
IllegalArgumentException- if given fieldReference is null.
-
isoWeekYearOf
Set the week date year to the result of the givenexpression.- Parameters:
expression- must not be null.- Returns:
- new instance of
DateOperators.IsoDateFromPartswithDateOperators.Timezoneif set. - Throws:
IllegalArgumentException- if given expression is null.
-
year
Set the year to the given value which must resolve to a calendar year. Can be a simple value,field referenceorexpression.- Parameters:
year- must not be null.- Returns:
- new instance of
DateOperators.DateFromPartswithDateOperators.Timezoneif set. - Throws:
IllegalArgumentException- if given year is null
-
yearOf
Set the year to the value resolved by following the givenfield reference.- Parameters:
fieldReference- must not be null.- Returns:
- new instance of
DateOperators.DateFromPartswithDateOperators.Timezoneif set. - Throws:
IllegalArgumentException- if given fieldReference is null.
-
yearOf
Set the year to the result of the givenexpression.- Parameters:
expression- must not be null.- Returns:
- new instance of
DateOperators.DateFromPartswithDateOperators.Timezoneif set. - Throws:
IllegalArgumentException- if given expression is null.
-
withTimezone
- Parameters:
timezone- must not be null. UseDateOperators.Timezone.none()instead.- Returns:
- new instance of
DateOperators.DateFromPartsOperatorFactory. - Throws:
IllegalArgumentException- if given timezone is null.
-