Class UserId

    • Method Detail

      • of

        public static UserId of​(@NotEmpty
                                @NotEmpty String userId)
        Creates an identifier from a string.
        Parameters:
        userId - the identifier string
        Returns:
        the user identifier
        Throws:
        NullPointerException - if userId is null
        Since:
        8.6.0
      • superUser

        public static UserId superUser()
        Returns a user identifier for the super user.
        Returns:
        the super user identifier
        Since:
        8.6.0
      • anonymous

        public static UserId anonymous()
        Returns a user identifier for an anonymous user.
        Returns:
        the anonymous user identifier
        Since:
        8.6.0
      • getValue

        public String getValue()
        The string representation of this identifier.
        Since:
        8.6.0
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object