Annotation Type KeyComponent


  • @Target(TYPE_PARAMETER)
    @Retention(SOURCE)
    public @interface KeyComponent
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String constant
      Used to define a key component that should never vary (such as an entity type).
      java.lang.String name
      The name of the key component, used to generate the method name for the corresponding step in the KeyBuilder.
      java.lang.Class<?> type
      The type of the key component, used as the method parameter for the corresponding step in the KeyBuilder.
    • Element Detail

      • name

        java.lang.String name
        The name of the key component, used to generate the method name for the corresponding step in the KeyBuilder. Must be defined if constant() is not set. Ignored when constant() is set.
        Returns:
        The key component name
        Default:
        ""
      • type

        java.lang.Class<?> type
        The type of the key component, used as the method parameter for the corresponding step in the KeyBuilder. Ignored when constant() is set.
        Returns:
        The key component type
        Default:
        java.lang.String.class
      • constant

        java.lang.String constant
        Used to define a key component that should never vary (such as an entity type). Must be defined if name() is not set. When defined, then name() and type() are ignored.
        Returns:
        A constant that should be used in the position of this key component
        Default:
        ""