Class ExposedFields
java.lang.Object
org.springframework.data.mongodb.core.aggregation.ExposedFields
- All Implemented Interfaces:
Iterable<org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField>
public final class ExposedFields
extends Object
implements Iterable<org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField>
Value object to capture the fields exposed by an
AggregationOperation.- Since:
- 1.3
- Author:
- Oliver Gierke, Thomas Darimont, Mark Paluch
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA reference to anExposedFields.ExposedField. -
Method Summary
Modifier and TypeMethodDescriptionand(org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField field) Creates a newExposedFieldsadding the givenExposedFields.ExposedField.static ExposedFieldsempty()Returns an emptyExposedFieldsinstance.static ExposedFieldsfrom(org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField... fields) Creates a newExposedFieldsinstance from the givenExposedFields.ExposedFields.@Nullable org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedFieldReturns the field with the given name or null if no field with the given name is available.Iterator<org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField> iterator()static ExposedFieldsnonSynthetic(Fields fields) Creates non-syntheticExposedFieldsfrom the givenFields.static ExposedFieldsCreates syntheticExposedFieldsfrom the givenFields.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
empty
Returns an emptyExposedFieldsinstance.- Returns:
- never null.
- Since:
- 2.0
-
from
public static ExposedFields from(org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField... fields) Creates a newExposedFieldsinstance from the givenExposedFields.ExposedFields.- Parameters:
fields- must not be null.- Returns:
- never null.
-
synthetic
Creates syntheticExposedFieldsfrom the givenFields.- Parameters:
fields- must not be null.- Returns:
- never null.
-
nonSynthetic
Creates non-syntheticExposedFieldsfrom the givenFields.- Parameters:
fields- must not be null.- Returns:
- never null.
-
and
public ExposedFields and(org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField field) Creates a newExposedFieldsadding the givenExposedFields.ExposedField.- Parameters:
field- must not be null.- Returns:
- new instance of
ExposedFields.
-
getField
public @Nullable org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField getField(String name) Returns the field with the given name or null if no field with the given name is available.- Parameters:
name- must not be null.- Returns:
- can be null.
-
iterator
-