Class SearchAttributeKey<T>

  • All Implemented Interfaces:
    java.lang.Comparable<SearchAttributeKey<T>>

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

      • forText

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

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

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

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

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

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

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

        public static SearchAttributeKey<io.temporal.api.common.v1.Payload> forUntyped​(java.lang.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 java.lang.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 java.lang.Class<? super T> getValueClass()
        Get the class that the search attribute value will be.
      • getValueReflectType

        public java.lang.reflect.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​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

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