Skip to content

PrefixedIdGenerator generator

Generate an ID composed of a prefix and a regex-defined body.

Why: Use PrefixedIdGenerator for deterministic identifiers with a fixed business prefix and patterned body.

Category: core.

Output: str.

1
<key name="value" generator="PrefixedIdGenerator(prefix='ORD', body_pattern='[A-Z0-9]{8}')"/>

Parameters

  • prefix: str; Default required — Fixed business prefix placed before the generated body.
  • body_pattern: str; Default required — Regular-expression pattern defining the identifier body.
  • separator: str; Default - — Constant text inserted between prefix and body.