Class SearchAttributeKey<T>

java.lang.Object
io.temporal.common.SearchAttributeKey<T>
All Implemented Interfaces:
Comparable<SearchAttributeKey<T>>

public class SearchAttributeKey<T> extends Object implements Comparable<SearchAttributeKey<T>>
Representation of a typed search attribute key.
  • Method Details

    • forText

      public static SearchAttributeKey<String> forText(String name)
      Create a search attribute key for a text attribute type.
    • forKeyword

      public static SearchAttributeKey<String> forKeyword(String name)
      Create a search attribute key for a keyword attribute type.
    • forLong

      public static SearchAttributeKey<Long> forLong(String name)
      Create a search attribute key for an int attribute type.
    • forDouble

      public static SearchAttributeKey<Double> forDouble(String name)
      Create a search attribute key for a double attribute type.
    • forBoolean

      public static SearchAttributeKey<Boolean> forBoolean(String name)
      Create a search attribute key for a boolean attribute type.
    • forOffsetDateTime

      public static SearchAttributeKey<OffsetDateTime> forOffsetDateTime(String name)
      Create a search attribute key for a datetime attribute type.
    • forKeywordList

      public static SearchAttributeKey<List<String>> forKeywordList(String name)
      Create a search attribute key for a keyword list attribute type.
    • forUntyped

      public static SearchAttributeKey<io.temporal.api.common.v1.Payload> forUntyped(String name)
      Create a search attribute key for an untyped attribute type.

      This should only be used when the server can return untyped search attributes, for example, when describing a schedule workflow action.

    • getName

      public String getName()
      Get the name of the search attribute.
    • getValueType

      public io.temporal.api.enums.v1.IndexedValueType getValueType()
      Get the search attribute value type.
    • getValueClass

      public Class<? super T> getValueClass()
      Get the class that the search attribute value will be.
    • getValueReflectType

      public Type getValueReflectType()
      Get the reflect type that the search attribute will be. For all key types except keyword list, this is the same as getValueType().
    • valueSet

      public SearchAttributeUpdate<T> valueSet(@Nonnull T value)
      Create an update that sets a value for this key.
    • valueUnset

      public SearchAttributeUpdate<T> valueUnset()
      Create an update that unsets a value for this key.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(SearchAttributeKey<T> o)
      Specified by:
      compareTo in interface Comparable<T>