AppSearchSchema.LongPropertyConfig.Builder
public
static
final
class
AppSearchSchema.LongPropertyConfig.Builder
extends Object
java.lang.Object | |
↳ | android.app.appsearch.AppSearchSchema.LongPropertyConfig.Builder |
Builder for LongPropertyConfig
.
Summary
Public constructors | |
---|---|
Builder(String propertyName)
Creates a new |
Public methods | |
---|---|
AppSearchSchema.LongPropertyConfig
|
build()
Constructs a new |
AppSearchSchema.LongPropertyConfig.Builder
|
setCardinality(int cardinality)
Sets the cardinality of the property (whether it is optional, required or repeated). |
AppSearchSchema.LongPropertyConfig.Builder
|
setIndexingType(int indexingType)
Configures how a property should be indexed so that it can be retrieved by queries. |
Inherited methods | |
---|---|
Public constructors
Builder
public Builder (String propertyName)
Creates a new LongPropertyConfig.Builder
.
Parameters | |
---|---|
propertyName |
String : This value cannot be null . |
Public methods
build
public AppSearchSchema.LongPropertyConfig build ()
Constructs a new LongPropertyConfig
from the contents of this builder.
Returns | |
---|---|
AppSearchSchema.LongPropertyConfig |
This value cannot be null . |
setCardinality
public AppSearchSchema.LongPropertyConfig.Builder setCardinality (int cardinality)
Sets the cardinality of the property (whether it is optional, required or repeated).
If this method is not called, the default cardinality is AppSearchSchema.PropertyConfig.CARDINALITY_OPTIONAL
.
Parameters | |
---|---|
cardinality |
int : Value is AppSearchSchema.PropertyConfig.CARDINALITY_REPEATED , AppSearchSchema.PropertyConfig.CARDINALITY_OPTIONAL , or AppSearchSchema.PropertyConfig.CARDINALITY_REQUIRED |
Returns | |
---|---|
AppSearchSchema.LongPropertyConfig.Builder |
This value cannot be null . |
setIndexingType
public AppSearchSchema.LongPropertyConfig.Builder setIndexingType (int indexingType)
Configures how a property should be indexed so that it can be retrieved by queries.
If this method is not called, the default indexing type is AppSearchSchema.LongPropertyConfig.INDEXING_TYPE_NONE
, so that it will not be indexed and cannot be
matched by queries.
Parameters | |
---|---|
indexingType |
int : Value is AppSearchSchema.LongPropertyConfig.INDEXING_TYPE_NONE , or AppSearchSchema.LongPropertyConfig.INDEXING_TYPE_RANGE |
Returns | |
---|---|
AppSearchSchema.LongPropertyConfig.Builder |
This value cannot be null . |