public abstract static class DateOperators.DateParts<T extends DateOperators.DateParts<T>> extends DateOperators.TimezonedDateAggregationExpression
| Modifier | Constructor and Description |
|---|---|
protected |
DateParts(Object value) |
| 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.
|
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() |
abstract T |
hour(Object hour)
Set the hour to the given value which must resolve to a value in range of
0 - 23. |
T |
hourOf(AggregationExpression expression)
Set the hour to the result of the given
expression. |
T |
hourOf(String fieldReference)
Set the hour to the value resolved by following the given
field reference. |
abstract T |
milliseconds(Object milliseconds)
Set the milliseconds to the given value which must resolve to a value in range
0 - 999. |
T |
millisecondsOf(AggregationExpression expression)
Set the milliseconds to the result of the given
expression. |
T |
millisecondsOf(String fieldReference)
Set the milliseconds to the value resolved by following the given
field reference. |
abstract T |
minute(Object minute)
Set the minute to the given value which must resolve to a value in range
0 - 59. |
T |
minuteOf(AggregationExpression expression)
Set the minute to the result of the given
expression. |
T |
minuteOf(String fieldReference)
Set the minute to the value resolved by following the given
field reference. |
abstract T |
second(Object second)
Set the second to the given value which must resolve to a value in range
0 - 59. |
T |
secondOf(AggregationExpression expression)
Set the second to the result of the given
expression. |
T |
secondOf(String fieldReference)
Set the second to the value resolved by following the given
field reference. |
com.mongodb.DBObject |
toDbObject(AggregationOperationContext context)
|
com.mongodb.DBObject |
toDbObject(Object value,
AggregationOperationContext context) |
protected List<Object> |
values() |
appendTimezone, hasTimezone, withTimezoneprotected DateParts(Object value)
public abstract T hour(Object hour)
0 - 23. Can be a
simple value, field reference or expression.hour - must not be null.IllegalArgumentException - if given hour is nullpublic T hourOf(String fieldReference)
field reference.fieldReference - must not be null.IllegalArgumentException - if given fieldReference is null.public T hourOf(AggregationExpression expression)
expression.expression - must not be null.IllegalArgumentException - if given expression is null.public abstract T minute(Object minute)
0 - 59. Can be a
simple value, field reference or expression.minute - must not be null.IllegalArgumentException - if given minute is nullpublic T minuteOf(String fieldReference)
field reference.fieldReference - must not be null.IllegalArgumentException - if given fieldReference is null.public T minuteOf(AggregationExpression expression)
expression.expression - must not be null.IllegalArgumentException - if given expression is null.public abstract T second(Object second)
0 - 59. Can be a
simple value, field reference or expression.second - must not be null.IllegalArgumentException - if given second is nullpublic T secondOf(String fieldReference)
field reference.fieldReference - must not be null.IllegalArgumentException - if given fieldReference is null.public T secondOf(AggregationExpression expression)
expression.expression - must not be null.IllegalArgumentException - if given expression is null.public abstract T milliseconds(Object milliseconds)
0 - 999. Can be
a simple value, field reference or expression.milliseconds - must not be null.IllegalArgumentException - if given milliseconds is nullpublic T millisecondsOf(String fieldReference)
field reference.fieldReference - must not be null.IllegalArgumentException - if given fieldReference is null.public T millisecondsOf(AggregationExpression expression)
expression.expression - must not be null.IllegalArgumentException - if given expression is null.public com.mongodb.DBObject toDbObject(AggregationOperationContext context)
AggregationExpressiontoDbObject in interface AggregationExpressionpublic com.mongodb.DBObject toDbObject(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–2018 Pivotal Software, Inc.. All rights reserved.