public class

SearchEventTemplate

extends Object
java.lang.Object
   ↳ com.urbanairship.analytics.SearchEventTemplate

Class Overview

A class that represents a custom search event template for the application.

Summary

Public Methods
CustomEvent createEvent()
Creates the custom search event.
static SearchEventTemplate newSearchTemplate()
SearchEventTemplate setCategory(String category)
Set the category.
SearchEventTemplate setId(String id)
Set the ID.
SearchEventTemplate setQuery(String query)
Set the query.
SearchEventTemplate setTotalResults(long totalResults)
Set the total results.
SearchEventTemplate setType(String type)
Set the type.
SearchEventTemplate setValue(int value)
Sets the event value.
SearchEventTemplate setValue(double value)
Sets the event value.
SearchEventTemplate setValue(String value)
Sets the event value.
SearchEventTemplate setValue(BigDecimal value)
Sets the event value.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public CustomEvent createEvent ()

Creates the custom search event.

Returns
  • The custom search event.

public static SearchEventTemplate newSearchTemplate ()

public SearchEventTemplate setCategory (String category)

Set the category.

Parameters
category The category as a string.
Returns
  • An SearchEventTemplate.

public SearchEventTemplate setId (String id)

Set the ID.

Parameters
id The ID as a string.
Returns
  • An SearchEventTemplate.

public SearchEventTemplate setQuery (String query)

Set the query.

Parameters
query The query as a string.
Returns
  • An SearchEventTemplate.

public SearchEventTemplate setTotalResults (long totalResults)

Set the total results.

Parameters
totalResults The total results as a string.
Returns
  • An SearchEventTemplate.

public SearchEventTemplate setType (String type)

Set the type.

Parameters
type The type as a string.
Returns
  • An SearchEventTemplate.

public SearchEventTemplate setValue (int value)

Sets the event value.

The event's value will be accurate 6 digits after the decimal. The number must fall in the range [-2^31, 2^31-1]. Any value outside that range will cause the event to be invalid.

Parameters
value The event's value as an int.
Returns
  • An SearchEventTemplate.

public SearchEventTemplate setValue (double value)

Sets the event value.

The event's value will be accurate 6 digits after the decimal. The number must fall in the range [-2^31, 2^31-1]. Any value outside that range will cause the event to be invalid.

Parameters
value The event's value as a double. Must be a number.
Returns
  • An SearchEventTemplate.
Throws
NumberFormatException if the value is infinity or not a number.

public SearchEventTemplate setValue (String value)

Sets the event value.

The event's value will be accurate 6 digits after the decimal. The number must fall in the range [-2^31, 2^31-1]. Any value outside that range will cause the event to be invalid.

Parameters
value The event's value as a string. Must contain valid string representation of a big decimal.
Returns
  • An SearchEventTemplate.
Throws
NumberFormatException if the event value does not contain a valid string representation of a big decimal.

public SearchEventTemplate setValue (BigDecimal value)

Sets the event value.

The event's value will be accurate 6 digits after the decimal. The number must fall in the range [-2^31, 2^31-1]. Any value outside that range will cause the event to be invalid.

Parameters
value The event's value as a BigDecimal.
Returns
  • An SearchEventTemplate.