GetByDocumentIdRequest.Builder


public static final class GetByDocumentIdRequest.Builder
extends Object

java.lang.Object
   ↳ android.app.appsearch.GetByDocumentIdRequest.Builder


Builder for GetByDocumentIdRequest objects.

Summary

Public constructors

Builder(String namespace)

Creates a GetByDocumentIdRequest.Builder instance.

Public methods

GetByDocumentIdRequest.Builder addIds(String... ids)

Adds one or more document IDs to the request.

GetByDocumentIdRequest.Builder addIds(Collection<String> ids)

Adds a collection of IDs to the request.

GetByDocumentIdRequest.Builder addProjection(String schemaType, Collection<String> propertyPaths)

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

GetByDocumentIdRequest.Builder addProjectionPaths(String schemaType, Collection<PropertyPath> propertyPaths)

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

GetByDocumentIdRequest build()

Builds a new GetByDocumentIdRequest.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

Added in API level 31
public Builder (String namespace)

Creates a GetByDocumentIdRequest.Builder instance.

Parameters
namespace String: This value cannot be null.

Public methods

addIds

Added in API level 31
public GetByDocumentIdRequest.Builder addIds (String... ids)

Adds one or more document IDs to the request.

Parameters
ids String: This value cannot be null.

Returns
GetByDocumentIdRequest.Builder This value cannot be null.

addIds

Added in API level 31
public GetByDocumentIdRequest.Builder addIds (Collection<String> ids)

Adds a collection of IDs to the request.

Parameters
ids Collection: This value cannot be null.

Returns
GetByDocumentIdRequest.Builder This value cannot be null.

addProjection

Added in API level 31
public GetByDocumentIdRequest.Builder addProjection (String schemaType, 
                Collection<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.

Parameters
schemaType String: This value cannot be null.

propertyPaths Collection: This value cannot be null.

addProjectionPaths

Added in API level 34
Also in T Extensions 7
public GetByDocumentIdRequest.Builder addProjectionPaths (String schemaType, 
                Collection<PropertyPath> 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.

Parameters
schemaType String: This value cannot be null.

propertyPaths Collection: This value cannot be null.

build

Added in API level 31
public GetByDocumentIdRequest build ()

Builds a new GetByDocumentIdRequest.

Returns
GetByDocumentIdRequest This value cannot be null.