public class TypeBasedAggregationOperationContext extends Object implements AggregationOperationContext
AggregationOperationContext aware of a particular type and a MappingContext to potentially translate
property references into document field names.| Constructor and Description |
|---|
TypeBasedAggregationOperationContext(Class<?> type,
MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> mappingContext,
QueryMapper mapper)
Creates a new
TypeBasedAggregationOperationContext for the given type, MappingContext and
QueryMapper. |
| Modifier and Type | Method and Description |
|---|---|
com.mongodb.DBObject |
getMappedObject(com.mongodb.DBObject dbObject)
Returns the mapped
DBObject, potentially converting the source considering mapping metadata etc. |
org.springframework.data.mongodb.core.aggregation.ExposedFields.FieldReference |
getReference(Field field)
Returns a
ExposedFields.FieldReference for the given field or null if the context does not expose the given
field. |
org.springframework.data.mongodb.core.aggregation.ExposedFields.FieldReference |
getReference(String name)
Returns the
ExposedFields.FieldReference for the field with the given name or null if the context does not
expose a field with the given name. |
public TypeBasedAggregationOperationContext(Class<?> type, MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> mappingContext, QueryMapper mapper)
TypeBasedAggregationOperationContext for the given type, MappingContext and
QueryMapper.type - must not be null.mappingContext - must not be null.mapper - must not be null.public com.mongodb.DBObject getMappedObject(com.mongodb.DBObject dbObject)
AggregationOperationContextDBObject, potentially converting the source considering mapping metadata etc.getMappedObject in interface AggregationOperationContextdbObject - will never be null.public org.springframework.data.mongodb.core.aggregation.ExposedFields.FieldReference getReference(Field field)
AggregationOperationContextExposedFields.FieldReference for the given field or null if the context does not expose the given
field.getReference in interface AggregationOperationContextfield - must not be null.public org.springframework.data.mongodb.core.aggregation.ExposedFields.FieldReference getReference(String name)
AggregationOperationContextExposedFields.FieldReference for the field with the given name or null if the context does not
expose a field with the given name.getReference in interface AggregationOperationContextname - must not be null or empty.Copyright © 2011-2014–2015 Pivotal Software, Inc.. All rights reserved.