Interface EntityAttributes


public interface EntityAttributes
See Also:
  • Field Details

    • TRANSACTION_MANAGER_NAME

      static final String TRANSACTION_MANAGER_NAME
      If set, holds the name of the PlatformTransactionManager bean that the repositories of this entity use.
    • CONTROL_NAME

      static final String CONTROL_NAME
      If set, contains the control name that should be used for form elements.
    • NATIVE_PROPERTY_DESCRIPTOR

      static final String NATIVE_PROPERTY_DESCRIPTOR
      If set, indicates that the property descriptor represents a native property on a class. The class is usually the entity this property belongs to.

      The actual value can differ, for example Property or PropertyDescriptor.

    • PROPERTY_REQUIRED

      static final String PROPERTY_REQUIRED
      If set, determines if a control for this property should be marked as required or not. The actual value should be either true or false.
    • FIELDSET_PROPERTY_SELECTOR

      static final String FIELDSET_PROPERTY_SELECTOR
      If set, this attribute should contain the EntityPropertySelector to be used for selecting the members of a FieldsetFormElement.
      See Also:
    • OPTIONS_ENTITY_QUERY

      static final String OPTIONS_ENTITY_QUERY
      If set, contains the EQL statement or EntityQuery that should be used to fetch the selectable options. Can be used to for example filter out deleted items.

      Will only be used if there is no OptionGenerator or OptionIterableBuilder attribute set.

    • OPTIONS_ALLOWED_VALUES

      static final String OPTIONS_ALLOWED_VALUES
      If set, should contain a collection of the allowed values. Usually used in combination with an enum option, in which case the value is expected to be an EnumSet.
    • OPTIONS_ENHANCER

      static final String OPTIONS_ENHANCER
      If set, should contain an OptionFormElementBuilder consumer. Used to apply changes to an OptionFormElementBuilder.
    • TARGET_DESCRIPTOR

      static final String TARGET_DESCRIPTOR
      In case of a nested EntityPropertyDescriptor, this attribute can hold the original target EntityPropertyDescriptor that was used, in combination with the parent descriptor, to build the nested property descriptor.
    • FORM_ENCTYPE

      static final String FORM_ENCTYPE
      Can be set on either EntityViewFactory or EntityPropertyDescriptor. Holds the suggested form enctype to submit a form holding a control for that property.
      See Also:
    • IS_EMBEDDED_OBJECT

      static final String IS_EMBEDDED_OBJECT
      Holds true if a property (or a target EntityConfiguration represents an embedded object instead of a related object. This will impact the control types being generated for this property. An attribute value set on the EntityPropertyDescriptor will take precedence over the value on an EntityConfiguration.

      If not explicitly set, a strategy will be used to determine if a property should behave as an embedded object.

    • LABEL_TARGET_PROPERTY

      static final String LABEL_TARGET_PROPERTY
      Represents the target property that the EntityPropertyRegistry.LABEL proxies. Only set in case a target property was used.
      See Also:
  • Method Details

    • controlName

      @Deprecated static String controlName(EntityPropertyDescriptor descriptor)
      Deprecated.
      Retrieve the control name to use for a EntityPropertyDescriptor. If an attribute CONTROL_NAME is present, it will be used, else the regular name will be used.
      Parameters:
      descriptor - of the property
      Returns:
      control name to use
    • isRequired

      static boolean isRequired(EntityPropertyDescriptor descriptor)
      Check if the descriptor has the PROPERTY_REQUIRED attribute with a true value, marking the control as required.
      Parameters:
      descriptor - of the property
      Returns:
      true if it is required