public class PrefixingDelegatingAggregationOperationContext extends Object implements AggregationOperationContext
AggregationOperationContext implementation prefixing non-command keys on root level with the given prefix.
Useful when mapping fields to domain specific types while having to prefix keys for query purpose.
| Constructor and Description |
|---|
PrefixingDelegatingAggregationOperationContext(AggregationOperationContext delegate,
String prefix) |
PrefixingDelegatingAggregationOperationContext(AggregationOperationContext delegate,
String prefix,
Collection<String> denylist) |
| Modifier and Type | Method and Description |
|---|---|
Fields |
getFields(Class<?> type)
Returns the
Fields exposed by the type. |
org.bson.Document |
getMappedObject(org.bson.Document document)
Returns the mapped
Document, potentially converting the source considering mapping metadata etc. |
org.bson.Document |
getMappedObject(org.bson.Document document,
Class<?> type)
Returns the mapped
Document, potentially converting the source considering mapping metadata for the given
type. |
ExposedFields.FieldReference |
getReference(Field field)
Returns a
ExposedFields.FieldReference for the given field. |
ExposedFields.FieldReference |
getReference(String name)
Returns the
ExposedFields.FieldReference for the field with the given name. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontinueOnMissingFieldReferencepublic PrefixingDelegatingAggregationOperationContext(AggregationOperationContext delegate, String prefix)
public PrefixingDelegatingAggregationOperationContext(AggregationOperationContext delegate, String prefix, Collection<String> denylist)
public org.bson.Document getMappedObject(org.bson.Document document)
AggregationOperationContextDocument, potentially converting the source considering mapping metadata etc.getMappedObject in interface AggregationOperationContextdocument - will never be null.public org.bson.Document getMappedObject(org.bson.Document document,
@Nullable
Class<?> type)
AggregationOperationContextDocument, potentially converting the source considering mapping metadata for the given
type.getMappedObject in interface AggregationOperationContextdocument - will never be null.type - can be null.public ExposedFields.FieldReference getReference(Field field)
AggregationOperationContextExposedFields.FieldReference for the given field.getReference in interface AggregationOperationContextfield - must not be null.ExposedFields.FieldReference for the given Field.public ExposedFields.FieldReference getReference(String name)
AggregationOperationContextExposedFields.FieldReference for the field with the given name.getReference in interface AggregationOperationContextname - must not be null or empty.ExposedFields.FieldReference for the field with given name.public Fields getFields(Class<?> type)
AggregationOperationContextFields exposed by the type. May be a class or an interface. The default
implementation uses property descriptors discover fields from a
Class.getFields in interface AggregationOperationContexttype - must not be null.BeanUtils.getPropertyDescriptor(Class, String)Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.