PropertyDefinedNode


@ExperimentalAppSearchApi
public final class PropertyDefinedNode implements FunctionNode


FunctionNode representing the `propertyDefined` query function.

The `propertyDefined` query function will return all documents of types that define the given property. This will include documents that do not have the property itself, so long as that property is a part of the document's schema.

If you need to restrict to documents that have >=1 value(s) populated for that property, see HasPropertyNode.

Summary

Public constructors

Constructor for a PropertyDefinedNode representing the query function `propertyDefined` that takes in a PropertyPath.

Public methods

boolean
@NonNull String

Returns the name of the function represented by PropertyDefinedNode.

@NonNull PropertyPath

Returns the PropertyDefinedNode representing the property being checked for in the document.

int
void

Sets the property being checked for in the document, as represented by PropertyDefinedNode.

@NonNull String

Get the string representation of PropertyDefinedNode.

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

PropertyDefinedNode

Added in 1.1.0-alpha07
public PropertyDefinedNode(@NonNull PropertyPath property)

Constructor for a PropertyDefinedNode representing the query function `propertyDefined` that takes in a PropertyPath.

Public methods

equals

public boolean equals(Object o)

getFunctionName

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

Returns the name of the function represented by PropertyDefinedNode.

getProperty

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

Returns the PropertyDefinedNode representing the property being checked for in the document.

hashCode

public int hashCode()

setProperty

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

Sets the property being checked for in the document, as represented by PropertyDefinedNode.

toString

public @NonNull String toString()

Get the string representation of PropertyDefinedNode.

The string representation of PropertyDefinedNode is the function name followed by the property path in quotes surrounded by parentheses.