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

boolean
@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.

int
void

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

@NonNull String

Get the string representation of HasPropertyNode.

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.

static final String

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

static final String

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

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-beta01
public HasPropertyNode(@NonNull PropertyPath propertyPath)

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

Parameters
@NonNull PropertyPath propertyPath

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

Public methods

equals

public boolean equals(Object o)

getFunctionName

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

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

getPropertyPath

Added in 1.1.0-beta01
public @NonNull PropertyPath getPropertyPath()

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

hashCode

public int hashCode()

setPropertyPath

Added in 1.1.0-beta01
public void setPropertyPath(@NonNull PropertyPath property)

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

toString

public @NonNull String toString()

Get the string representation of HasPropertyNode.

The string representation of HasPropertyNode is the function name followed by the property path in quotes.