public abstract static class DateOperators.TimezonedDateAggregationExpression extends Object
AggregationExpression capable of setting a given DateOperators.Timezone.| Modifier | Constructor and Description |
|---|---|
protected |
TimezonedDateAggregationExpression(Object value) |
| Modifier and Type | Method and Description |
|---|---|
protected List<Object> |
append(Object value) |
protected Map<String,Object> |
append(String key,
Object value) |
protected static Map<String,Object> |
appendTimezone(Object source,
DateOperators.Timezone timezone)
Append the
timezone to a given source. |
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.
|
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 abstract String |
getMongoMethod() |
protected boolean |
hasTimezone() |
org.bson.Document |
toDocument(AggregationOperationContext context)
|
org.bson.Document |
toDocument(Object value,
AggregationOperationContext context) |
protected List<Object> |
values() |
protected abstract DateOperators.TimezonedDateAggregationExpression |
withTimezone(DateOperators.Timezone timezone)
Optionally set the
DateOperators.Timezone to use. |
protected TimezonedDateAggregationExpression(Object value)
protected static Map<String,Object> appendTimezone(Object source, DateOperators.Timezone timezone)
timezone to a given source. The source itself can be a Map of already set properties
or a single value. In case of single value source the value will be added as date property.source - must not be null.timezone - must not be null use DateOperators.Timezone.none() instead.protected abstract DateOperators.TimezonedDateAggregationExpression withTimezone(DateOperators.Timezone timezone)
DateOperators.Timezone to use. If not specified UTC is used.timezone - must not be null. Consider DateOperators.Timezone.none() instead.IllegalArgumentException - if given timezone is null.protected boolean hasTimezone()
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 - protected abstract String getMongoMethod()
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.