HasPropertyNode


@ExperimentalAppSearchApi
public final class HasPropertyNode implements FunctionNode


FunctionNode representing the `hasProperty` query function.

The `hasProperty` query function will return all documents that contain the given property and have values in the given property.

Summary

Public constructors

Constructor for a HasPropertyNode representing the query function `hasProperty`.

Public methods

@NonNull String

Returns the name of the function represented by HasPropertyNode, stored in the enum FUNCTION_NAME_HAS_PROPERTY.

@NonNull PropertyPath

Gets the PropertyPath representing the property being checked for some value in the document.

void

Sets the PropertyPath representing the property being checked for some value in the document.

Inherited Constants

From androidx.appsearch.ast.FunctionNode
static final String
FUNCTION_NAME_GET_SEARCH_STRING_PARAMETER = "getSearchStringParameter"

Name of the query function represented by androidx.appsearch.ast.query.GetSearchStringParameterNode.

static final String

Name of the query function represented by androidx.appsearch.ast.query.HasPropertyNode.

static final String
FUNCTION_NAME_PROPERTY_DEFINED = "propertyDefined"

Name of the query function represented by androidx.appsearch.ast.query.PropertyDefinedNode.

Inherited methods

From androidx.appsearch.ast.Node
@NonNull List<Node>

Get a list of the node's child Nodes.

Public constructors

HasPropertyNode

Added in 1.1.0-alpha06
public HasPropertyNode(@NonNull PropertyPath property)

Constructor for a HasPropertyNode representing the query function `hasProperty`.

Parameters
@NonNull PropertyPath property

A PropertyPath representing the property to check whether or not it contains a value in the document.

Public methods

getFunctionName

Added in 1.1.0-alpha06
public @NonNull String getFunctionName()

Returns the name of the function represented by HasPropertyNode, stored in the enum FUNCTION_NAME_HAS_PROPERTY.

getProperty

Added in 1.1.0-alpha06
public @NonNull PropertyPath getProperty()

Gets the PropertyPath representing the property being checked for some value in the document.

setProperty

Added in 1.1.0-alpha06
public void setProperty(@NonNull PropertyPath property)

Sets the PropertyPath representing the property being checked for some value in the document.