AppSearchSchema

public final classAppSearchSchemaextendsObject
implementsParcelable

The AppSearch Schema for a particular type of document.

For example, an e-mail message or a music recording could be a schema type.

The schema consists of type information, properties, and config (like tokenization type).

Nested Class Summary

class AppSearchSchema.BooleanPropertyConfig Configuration for a property containing a boolean.
class AppSearchSchema.Builder Builder forobjects.
class AppSearchSchema.BytesPropertyConfig Configuration for a property containing a byte array.
class AppSearchSchema.DocumentPropertyConfig Configuration for a property containing another Document.
class AppSearchSchema.DoublePropertyConfig Configuration for a property containing a double-precision decimal number.
class AppSearchSchema.LongPropertyConfig Configuration for a property containing a 64-bit integer.
class AppSearchSchema.PropertyConfig Common configuration for a single property (field) in a Document.
class AppSearchSchema.StringPropertyConfig Configuration for a property of type String in a Document.

Inherited Constant Summary

Field Summary

public static finalCreator<AppSearchSchema> CREATOR

Public Method Summary

boolean
String
getDescription()
Returns a natural language description of this schema type.
List<String>
getParentTypes()
Returns the list of parent types of this schema for polymorphism.
List<AppSearchSchema.PropertyConfig>
getProperties()
Returns the list of AppSearchSchema.PropertyConfigs that are part of this schema.
String
getSchemaType()
Returns the name of this schema type, such as Email.
int
String
void
writeToParcel(Parceldest, int flags)

Inherited Method Summary

Fields

public static finalCreator<AppSearchSchema> CREATOR

Public Methods

public booleanequals(Objectother)

publicStringgetDescription()

Returns a natural language description of this schema type.

Ex. The description for an Email type could be "A type of electronic message".

This information is purely to help apps consuming this type to understand its semantic meaning. This field has no effect in AppSearch - it is just stored with the AppSearchSchema. If AppSearchSchema.Builder.setDescription(String)is uncalled, then this method will return an empty string.

publicList<String> getParentTypes()

Returns the list of parent types of this schema for polymorphism.

publicList<AppSearchSchema.PropertyConfig> getProperties()

Returns the list of AppSearchSchema.PropertyConfigs that are part of this schema.

This method creates a new list when called.

publicStringgetSchemaType()

Returns the name of this schema type, such as Email.

public inthashCode()

publicStringtoString()

public voidwriteToParcel(Parceldest, int flags)