PipelineResult

@Beta
public final classPipelineResult


Represents the results of a Pipeline query, including the data and metadata. It is usually accessed viaPipeline.Snapshot.

Summary

Public fields

finalTimestamp

The time the document was created.

finalDocumentReference

The reference to the document, if the query returns the document id for a document.

finalTimestamp

The time the document was last updated (at the time the snapshot was generated).

Public methods

boolean
equals(Object other)
finalObject

Retrieves the field specified byfield.

finalObject
get(@NonNullFieldPath fieldPath)

Retrieves the field specified byfieldPath.

final @NonNullMap<@NonNullStringObject>

Retrieves all fields in the result as an object map.

finalString

Returns the ID of the document represented by this result.

int
@NonNullString

Public fields

createTime

public final Timestamp createTime

The time the document was created. Null if this result is not a document.

ref

public final DocumentReference ref

The reference to the document, if the query returns the document id for a document. The name field will be returned by default if querying a document.

Document ids will not be returned if certain pipeline stages omit the document id. For example,Pipeline.select,Pipeline.removeFields andPipeline.aggregate can omit the document id.

Returns
DocumentReference

DocumentReference Reference to the document, if applicable.

updateTime

public final Timestamp updateTime

The time the document was last updated (at the time the snapshot was generated). Null if this result is not a document.

Public methods

equals

public boolean equals(Object other)

get

public final Object get(@NonNullString field)

Retrieves the field specified byfield.

Parameters
@NonNullString field

The field path (e.g. "foo" or "foo.bar") to a specific field.

Returns
Object

The data at the specified field location or null if no such field exists.

get

public final Object get(@NonNullFieldPath fieldPath)

Retrieves the field specified byfieldPath.

Parameters
@NonNullFieldPath fieldPath

The field path to a specific field.

Returns
Object

The data at the specified field location or null if no such field exists.

getData

public final @NonNullMap<@NonNullStringObjectgetData()

Retrieves all fields in the result as an object map.

Returns
@NonNullMap<@NonNullStringObject>

Map of field names to objects.

getId

public final String getId()

Returns the ID of the document represented by this result. Returns null if this result is not corresponding to a Firestore document.

Returns
String

ID of document, if applicable.

hashCode

public int hashCode()

toString

public @NonNullString toString()

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-15 UTC.