public abstract class

AppSearchSchema.PropertyConfig

extends java.lang.Object

 java.lang.Object

↳androidx.appsearch.app.AppSearchSchema.PropertyConfig

Subclasses:

AppSearchSchema.StringPropertyConfig, AppSearchSchema.LongPropertyConfig, AppSearchSchema.DoublePropertyConfig, AppSearchSchema.BooleanPropertyConfig, AppSearchSchema.BytesPropertyConfig, AppSearchSchema.DocumentPropertyConfig

Overview

Common configuration for a single property (field) in a Document.

For example, an EmailMessage would be a type and the subject would be a property.

Summary

Fields
public static final intCARDINALITY_OPTIONAL

Zero or one value [0,1].

public static final intCARDINALITY_REPEATED

Any number of items (including zero) [0...*].

public static final intCARDINALITY_REQUIRED

Exactly one value [1].

public static final intDATA_TYPE_BOOLEAN

public static final intDATA_TYPE_BYTES

Unstructured BLOB.

public static final intDATA_TYPE_DOCUMENT

Indicates that the property is itself a GenericDocument, making it part of a hierarchical schema.

public static final intDATA_TYPE_DOUBLE

public static final intDATA_TYPE_LONG

public static final intDATA_TYPE_STRING

Methods
public booleanequals(java.lang.Object other)

public static AppSearchSchema.PropertyConfigfromBundle(Bundle propertyBundle)

Converts a into a AppSearchSchema.PropertyConfig depending on its internal data type.

public intgetCardinality()

Returns the cardinality of the property (whether it is optional, required or repeated).

public intgetDataType()

Returns the type of data the property contains (e.g.

public java.lang.StringgetName()

Returns the name of this property.

public inthashCode()

public java.lang.StringtoString()

from java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait

Fields

public static final int DATA_TYPE_STRING

public static final int DATA_TYPE_LONG

public static final int DATA_TYPE_DOUBLE

public static final int DATA_TYPE_BOOLEAN

public static final int DATA_TYPE_BYTES

Unstructured BLOB.

public static final int DATA_TYPE_DOCUMENT

Indicates that the property is itself a GenericDocument, making it part of a hierarchical schema. Any property using this DataType MUST have a valid AppSearchSchema.getSchemaType().

public static final int CARDINALITY_REPEATED

Any number of items (including zero) [0...*].

public static final int CARDINALITY_OPTIONAL

Zero or one value [0,1].

public static final int CARDINALITY_REQUIRED

Exactly one value [1].

Methods

public java.lang.String toString()

public java.lang.String getName()

Returns the name of this property.

public int getDataType()

Returns the type of data the property contains (e.g. string, int, bytes, etc).

public int getCardinality()

Returns the cardinality of the property (whether it is optional, required or repeated).

public boolean equals(java.lang.Object other)

public int hashCode()

public static AppSearchSchema.PropertyConfig fromBundle(Bundle propertyBundle)

Converts a into a AppSearchSchema.PropertyConfig depending on its internal data type.

The bundle is not cloned.