SetSchemaRequest.Builder

public static final class SetSchemaRequest.Builder
extends Object

java.lang.Object
   ↳ androidx.appsearch.app.SetSchemaRequest.Builder


Builder for SetSchemaRequest objects.

Summary

Public constructors

Builder()

Public methods

SetSchemaRequest.Builder addDocumentClasses(Class...<?> documentClasses)

Adds one or more Document annotated classes to the schema.

SetSchemaRequest.Builder addDocumentClasses(Collection<? extends Class<?>> documentClasses)

Adds a collection of Document annotated classes to the schema.

SetSchemaRequest.Builder addSchemas(AppSearchSchema... schemas)

Adds one or more AppSearchSchema types to the schema.

SetSchemaRequest.Builder addSchemas(Collection<AppSearchSchema> schemas)

Adds a collection of AppSearchSchema objects to the schema.

SetSchemaRequest build()

Builds a new SetSchemaRequest object.

SetSchemaRequest.Builder setDocumentClassDisplayedBySystem(Class<?> documentClass, boolean displayed)

Sets whether or not documents from the provided Document annotated class will be displayed and visible on any system UI surface.

SetSchemaRequest.Builder setDocumentClassVisibilityForPackage(Class<?> documentClass, boolean visible, PackageIdentifier packageIdentifier)

Sets whether or not documents from the provided Document annotated class can be read by the specified package.

SetSchemaRequest.Builder setForceOverride(boolean forceOverride)

Sets whether or not to override the current schema in the AppSearchSession database.

SetSchemaRequest.Builder setMigrator(String schemaType, Migrator migrator)

Sets the Migrator associated with the given SchemaType.

SetSchemaRequest.Builder setMigrators(Map<String, Migrator> migrators)

Sets a Map of Migrators.

SetSchemaRequest.Builder setSchemaTypeDisplayedBySystem(String schemaType, boolean displayed)