Spring Data MongoDB - Core

org.springframework.data.mongodb.core.aggregation
Class Fields

java.lang.Object
  extended by org.springframework.data.mongodb.core.aggregation.Fields
All Implemented Interfaces:
Iterable<Field>

public final class Fields
extends Object
implements Iterable<Field>

Value object to capture a list of Field instances.

Since:
1.3
Author:
Oliver Gierke

Field Summary
static String UNDERSCORE_ID
           
static String UNDERSCORE_ID_REF
           
 
Method Summary
 Fields and(Field field)
           
 Fields and(Fields fields)
           
 Fields and(String name)
          Creates a new Fields instance with a new Field of the given name added.
 Fields and(String name, String target)
           
static Field field(String name)
          Creates a Field with the given name.
static Field field(String name, String target)
           
static Fields fields(String... names)
          Creates a new Fields instance for Fields with the given names.
static Fields from(Field... fields)
          Creates a new Fields instance from the given Fields.
 Field getField(String name)
           
 Iterator<Field> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNDERSCORE_ID

public static final String UNDERSCORE_ID
See Also:
Constant Field Values

UNDERSCORE_ID_REF

public static final String UNDERSCORE_ID_REF
See Also:
Constant Field Values
Method Detail

from

public static Fields from(Field... fields)
Creates a new Fields instance from the given Fields.

Parameters:
fields - must not be null or empty.
Returns:

fields

public static Fields fields(String... names)
Creates a new Fields instance for Fields with the given names.

Parameters:
names - must not be null.
Returns:

field

public static Field field(String name)
Creates a Field with the given name.

Parameters:
name - must not be null or empty.
Returns:

field

public static Field field(String name,
                          String target)

and

public Fields and(String name)
Creates a new Fields instance with a new Field of the given name added.

Parameters:
name - must not be null.
Returns:

and

public Fields and(String name,
                  String target)

and

public Fields and(Field field)

and

public Fields and(Fields fields)

getField

public Field getField(String name)

iterator

public Iterator<Field> iterator()
Specified by:
iterator in interface Iterable<Field>

Spring Data MongoDB - Core

Copyright © 2011-2014-2014 Pivotal Software, Inc.. All Rights Reserved.