Annotation Interface AdminPresentationMapField


@Retention(RUNTIME) @Target(FIELD) public @interface AdminPresentationMapField
This annotation is used to describe a member of a Map structure that should be displayed as a regular field in the admin tool.
Author:
Jeff Fischer
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Represents the field name for this field.
    Represents the metadata for this field.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Optional - if the value is not primitive and contains a bi-directional reference back to the entity containing this map structure, you can declare the field name in the value class for this reference.
    Optional - if the Map structure is using generics, then the system can usually infer the concrete type for the Map value.
  • Element Details

    • fieldName

      String fieldName

      Represents the field name for this field.

      Returns:
      the name for this field
    • fieldPresentation

      AdminPresentation fieldPresentation

      Represents the metadata for this field. The AdminPresentation properties will be used by the system to determine how this field should be treated in the admin tool (e.g. date fields get a date picker in the UI)

      Returns:
      the descriptive metadata for this field
    • targetClass

      Class<?> targetClass

      Optional - if the Map structure is using generics, then the system can usually infer the concrete type for the Map value. However, if not using generics for the Map, or if the value cannot be clearly inferred, you can explicitly set the Map structure value type here. Map fields can only understand maps whose values are basic types (String, Long, Date, etc...). Complex types require additional support. Support is provided out-of-the-box for complex types ValueAssignable, and SimpleRule.

      Returns:
      the concrete type for the Map structure value
      Default:
      java.lang.Void.class
    • manyToField

      String manyToField

      Optional - if the value is not primitive and contains a bi-directional reference back to the entity containing this map structure, you can declare the field name in the value class for this reference. Note, if the map uses the JPA mappedBy property, the system will try to infer the manyToField value so you don't have to set it here.

      Returns:
      the parent entity referring field name
      Default:
      ""