Annotation Interface PermazenSetField


@Retention(RUNTIME) @Target({ANNOTATION_TYPE,METHOD}) @Documented public @interface PermazenSetField
Java annotation for the getter methods of Java bean properties reflecting Permazen Set fields.

The annotated method's return type must be either Set<E>, SortedSet<E>, or NavigableSet<E>, where E is a supported simple type.

Note that both primitive types and their corresponding wrapper types are supported as elements. A set whose elements have primitive type will throw an exception on an attempt to add a null value. To specify a primitive element type, specify the primitive type name (e.g., "int") as the PermazenField.encoding() in the element().

Meta-Annotations

This annotation may be configured indirectly as a Spring meta-annotation when spring-core is on the classpath.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Configuration for the field's elements.
    The name of this field.
    int
    Storage ID for this field.
  • Element Details

    • name

      String name
      The name of this field.

      If empty string (default value), the name is inferred from the name of the annotated Java bean getter method.

      Returns:
      the set field name
      Default:
      ""
    • storageId

      int storageId
      Storage ID for this field.

      Normally this value is left as zero, in which case a value will be automatically assigned.

      Otherwise, the value should be positive and unique within the contained class.

      Returns:
      the field's storage ID, or zero for automatic assignment
      Default:
      0
    • element

      PermazenField element
      Configuration for the field's elements.

      Normally this property only needs to be set to index the sub-field. If set, the name property must be left unset.

      Returns:
      configuration for the set element sub-field
      Default:
      @io.permazen.annotation.PermazenField