public static class DateOperators.DateToParts extends DateOperators.TimezonedDateAggregationExpression
| Modifier and Type | Method and Description |
|---|---|
protected List<Object> |
append(Object value) |
protected Map<String,Object> |
append(String key,
Object value) |
protected Map<String,Object> |
argumentMap()
Get the argument map.
|
protected static List<Field> |
asFields(String... fieldRefs) |
protected boolean |
contains(Object key)
Check if the given key is available.
|
static DateOperators.DateToParts |
datePartsOf(AggregationExpression expression)
Creates new
DateOperators.DateToParts. |
static DateOperators.DateToParts |
datePartsOf(String fieldReference)
Creates new
DateOperators.DateToParts. |
static DateOperators.DateToParts |
dateToParts(Object value)
Creates new
DateOperators.DateToParts. |
protected <T> T |
get(int index)
Get the value at a given index.
|
protected <T> T |
get(Object key)
Get the value for a given key.
|
protected String |
getMongoMethod() |
DateOperators.DateToParts |
iso8601()
Use ISO week date fields in the resulting document.
|
org.bson.Document |
toDocument(AggregationOperationContext context)
|
org.bson.Document |
toDocument(Object value,
AggregationOperationContext context) |
protected List<Object> |
values() |
DateOperators.DateToParts |
withTimezone(DateOperators.Timezone timezone)
Optionally set the
DateOperators.Timezone to use. |
appendTimezone, hasTimezonepublic static DateOperators.DateToParts dateToParts(Object value)
DateOperators.DateToParts.value - must not be null.DateOperators.DateToParts.IllegalArgumentException - if given value is null.public static DateOperators.DateToParts datePartsOf(String fieldReference)
DateOperators.DateToParts.fieldReference - must not be null.DateOperators.DateToParts.IllegalArgumentException - if given fieldReference is null.public static DateOperators.DateToParts datePartsOf(AggregationExpression expression)
DateOperators.DateToParts.expression - must not be null.DateOperators.DateToParts.IllegalArgumentException - if given expression is null.public DateOperators.DateToParts iso8601()
DateOperators.DateToParts.public DateOperators.DateToParts withTimezone(DateOperators.Timezone timezone)
DateOperators.Timezone to use. If not specified UTC is used.withTimezone in class DateOperators.TimezonedDateAggregationExpressiontimezone - must not be null. Consider DateOperators.Timezone.none() instead.DateOperators.DateFromParts.IllegalArgumentException - if given timezone is null.protected String getMongoMethod()
public org.bson.Document toDocument(AggregationOperationContext context)
AggregationExpressiontoDocument in interface AggregationExpressionpublic org.bson.Document toDocument(Object value, AggregationOperationContext context)
protected <T> T get(int index)
T - index - protected <T> T get(Object key)
T - key - protected boolean contains(Object key)
key - Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.