Class RandomIdGenerator

java.lang.Object
org.springframework.ai.document.id.RandomIdGenerator
All Implemented Interfaces:
IdGenerator

public class RandomIdGenerator extends Object implements IdGenerator
A random ID generator that returns a UUID.
Author:
Aliakbar Jafarpour, Christian Tzolov
  • Constructor Details

    • RandomIdGenerator

      public RandomIdGenerator()
  • Method Details

    • generateId

      public String generateId(Object... contents)
      Description copied from interface: IdGenerator
      Generate a unique ID for the given content. Note: some generator, such as the the random generator might not dependant on or use the content parameters.
      Specified by:
      generateId in interface IdGenerator
      Parameters:
      contents - the content to generate an ID for.
      Returns:
      the generated ID.