Class Id


public class Id extends Native
The Id class represents a unique identifier that can be either a long value or a string.
  • Method Details

    • from

      public static Id from(long id)
    • from

      public static Id from(String id)
    • from

      public static Id from(UUID id)
    • from

      public static Id from(Object... elements)
      Creates an Id whose key is an array of Java values (composite key). See Array.of(java.lang.Object...) for the supported element types.

      To build a single-element [null] key, cast the argument: Id.from((java.lang.Object) null). A bare Id.from(null) is a null varargs array and will throw NullPointerException.

    • fromList

      public static Id fromList(List<?> elements)
      List-based counterpart to from(java.lang.Object...). Named distinctly from from(...) to avoid a null-call overload ambiguity.
    • isLong

      public final boolean isLong()
    • getLong

      public final long getLong()
    • isString

      public final boolean isString()
    • getString

      public final String getString()
    • isUuid

      public final boolean isUuid()
    • getUuid

      public final UUID getUuid()
    • isArray

      public final boolean isArray()
    • getArray

      public final Array getArray()
    • isObject

      public final boolean isObject()
    • getObject

      public final Object getObject()