kmongo / org.litote.kmongo.id / IdGenerator

IdGenerator

interface IdGenerator (source)

A generator of Ids.

Properties

idClass

The class of the id.

abstract val idClass: KClass<out Id<*>>

wrappedIdClass

The class of the wrapped id.

abstract val wrappedIdClass: KClass<out Any>

Functions

create

Create a new id from its String representation.

open fun create(s: String): Id<*>

generateNewId

Generate a new id.

abstract fun <T> generateNewId(): Id<T>

Companion Object Properties

defaultGenerator

var defaultGenerator: IdGenerator

Inheritors

ObjectIdGenerator

ObjectId generator.

object ObjectIdGenerator : IdGenerator

ObjectIdToStringGenerator

ObjectId based String generator.

object ObjectIdToStringGenerator : IdGenerator

UUIDStringIdGenerator

Generator of StringId based on UUID.

object UUIDStringIdGenerator : IdGenerator