HasPropertyNode


@ExperimentalAppSearchApi
class HasPropertyNode : 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 functions

Boolean
equals(o: Any!)
String

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

PropertyPath

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

Int
Unit

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

String

Get the string representation of HasPropertyNode.

Inherited Constants

From androidx.appsearch.ast.FunctionNode
const String!
FUNCTION_NAME_GET_SEARCH_STRING_PARAMETER = "getSearchStringParameter"

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

const String!

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

const String!
FUNCTION_NAME_PROPERTY_DEFINED = "propertyDefined"

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

const String!

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

const String!

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

Inherited functions

From androidx.appsearch.ast.Node
(Mutable)List<Node!>

Get a list of the node's child Nodes.

Public constructors

HasPropertyNode

Added in 1.1.0-alpha07
HasPropertyNode(property: PropertyPath)

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

Parameters
property: PropertyPath

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

Public functions

equals

fun equals(o: Any!): Boolean

getFunctionName

Added in 1.1.0-alpha07
fun getFunctionName(): String

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

getProperty

Added in 1.1.0-alpha07
fun getProperty(): PropertyPath

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

hashCode

fun hashCode(): Int

setProperty

Added in 1.1.0-alpha07
fun setProperty(property: PropertyPath): Unit

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

toString

fun toString(): String

Get the string representation of HasPropertyNode.

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