public final class

GetByDocumentIdRequest.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.appsearch.app.GetByDocumentIdRequest.Builder

Overview

Builder for GetByDocumentIdRequest objects.

Summary

Constructors
publicBuilder(java.lang.String namespace)

Creates a GetByDocumentIdRequest.Builder instance.

Methods
public GetByDocumentIdRequest.BuilderaddIds(java.util.Collection<java.lang.String> ids)

Adds a collection of IDs to the request.

public GetByDocumentIdRequest.BuilderaddIds(java.lang.String ids[])

Adds one or more document IDs to the request.

public GetByDocumentIdRequest.BuilderaddProjection(java.lang.String schemaType, java.util.Collection<java.lang.String> propertyPaths)

Adds property paths for the specified type to be used for projection.

public GetByDocumentIdRequestbuild()

Builds a new GetByDocumentIdRequest.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(java.lang.String namespace)

Creates a GetByDocumentIdRequest.Builder instance.

Methods

public GetByDocumentIdRequest.Builder addIds(java.lang.String ids[])

Adds one or more document IDs to the request.

public GetByDocumentIdRequest.Builder addIds(java.util.Collection<java.lang.String> ids)

Adds a collection of IDs to the request.

public GetByDocumentIdRequest.Builder addProjection(java.lang.String schemaType, java.util.Collection<java.lang.String> propertyPaths)

Adds property paths for the specified type to be used for projection. If property paths are added for a type, then only the properties referred to will be retrieved for results of that type. If a property path that is specified isn't present in a result, it will be ignored for that result. Property paths cannot be null.

If no property paths are added for a particular type, then all properties of results of that type will be retrieved.

If property path is added for the GetByDocumentIdRequest.PROJECTION_SCHEMA_TYPE_WILDCARD, then those property paths will apply to all results, excepting any types that have their own, specific property paths set.

See also: SearchSpec.Builder.addProjection(String, Collection)

public GetByDocumentIdRequest build()

Builds a new GetByDocumentIdRequest.