Annotation Interface KeyPrefix


Sets a static prefix for a composite key component.

When present on a class, the value() is prepended to the computed key value for the named component() at runtime, separated by a # character.

This annotation is Repeatable, allowing multiple prefixes for different key components on the same entity class.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Container annotation for repeatable @KeyPrefix.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    @NonNull String
    The key component name to which this prefix applies.
    @NonNull String
    The static prefix string prepended to the computed key value.
  • Element Details

    • component

      @NonNull String component
      The key component name to which this prefix applies.
      Returns:
      the component name
    • value

      @NonNull String value
      The static prefix string prepended to the computed key value.
      Returns:
      the prefix value