generateId

protected fun generateId(name: String, lang: String, versionId: Int): Long(source)

Generates a unique ID for the source based on the provided name, lang and versionId. It will use the first 16 characters (64 bits) of the MD5 of the string "${name.lowercase()}/$lang/$versionId".

Note: the generated ID sets the sign bit to 0.

Can be used to generate outdated IDs, such as when the source name or language needs to be changed but migrations can be avoided.

Since

extensions-lib 14

Return

a unique ID for the source

Parameters

name

String the name of the source

lang

String the language of the source

versionId

Int the version ID of the source