Document.LongProperty

public static abstract @interface Document.LongProperty
implements Annotation

androidx.appsearch.annotation.Document.LongProperty


Configures a 64-bit integer field of a class as a property known to AppSearch.

Summary

Public methods

String name()

The name of this property.

boolean required()

Configures whether this property must be specified for the document to be valid.

Inherited methods

Public methods

name

public String name ()

The name of this property. This string is used to query against this property.

If not specified, the name of the field in the code will be used instead.

Returns
String

required

public boolean required ()

Configures whether this property must be specified for the document to be valid.

This attribute does not apply to properties of a repeated type (e.g. a list).

Please make sure you understand the consequences of required fields on schema migration before setting this attribute to true.

Returns
boolean