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
Modifier and TypeClassDescriptionstatic interface
A reference to anExposedFields.ExposedField
. -
Method Summary
Modifier and TypeMethodDescriptionand
(org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField field) Creates a newExposedFields
adding the givenExposedFields.ExposedField
.static ExposedFields
empty()
Returns an emptyExposedFields
instance.static ExposedFields
from
(org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField... fields) Creates a newExposedFields
instance from the givenExposedFields.ExposedField
s.org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField
Returns 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 ExposedFields
nonSynthetic
(Fields fields) Creates non-syntheticExposedFields
from the givenFields
.static ExposedFields
Creates syntheticExposedFields
from the givenFields
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
empty
Returns an emptyExposedFields
instance.- Returns:
- never null.
- Since:
- 2.0
-
from
public static ExposedFields from(org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField... fields) Creates a newExposedFields
instance from the givenExposedFields.ExposedField
s.- Parameters:
fields
- must not be null.- Returns:
- never null.
-
synthetic
Creates syntheticExposedFields
from the givenFields
.- Parameters:
fields
- must not be null.- Returns:
- never null.
-
nonSynthetic
Creates non-syntheticExposedFields
from 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 newExposedFields
adding the givenExposedFields.ExposedField
.- Parameters:
field
- must not be null.- Returns:
- new instance of
ExposedFields
.
-
getField
@Nullable public 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
public Iterator<org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField> iterator()
-