Interface EntityAttributes
public interface EntityAttributes
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringIf set, contains the control name that should be used for form elements.static final StringIf set, this attribute should contain theEntityPropertySelectorto be used for selecting the members of aFieldsetFormElement.static final StringCan be set on eitherEntityViewFactoryorEntityPropertyDescriptor.static final StringHoldstrueif a property (or a targetEntityConfigurationrepresents an embedded object instead of a related object.static final StringRepresents the target property that theEntityPropertyRegistry.LABELproxies.static final StringCan be set on eitherEntityViewFactoryorEntityConfiguration.static final StringIf set, indicates that the property descriptor represents a native property on a class.static final StringIf set, should contain a collection of the allowed values.static final StringIf set, should contain anOptionFormElementBuilderconsumer.static final StringIf set, contains the EQL statement orEntityQuerythat should be used to fetch the selectable options.static final StringIf set, determines if a control for this property should be marked as required or not.static final StringIn case of a nestedEntityPropertyDescriptor, this attribute can hold the original targetEntityPropertyDescriptorthat was used, in combination with the parent descriptor, to build the nested property descriptor.static final StringIf set, holds the name of thePlatformTransactionManagerbean that the repositories of this entity use. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcontrolName(EntityPropertyDescriptor descriptor) Deprecated.static booleanisRequired(EntityPropertyDescriptor descriptor) Check if the descriptor has thePROPERTY_REQUIREDattribute with atruevalue, marking the control as required.
-
Field Details
-
TRANSACTION_MANAGER_NAME
If set, holds the name of thePlatformTransactionManagerbean that the repositories of this entity use. -
CONTROL_NAME
If set, contains the control name that should be used for form elements. -
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 examplePropertyorPropertyDescriptor. -
PROPERTY_REQUIRED
If set, determines if a control for this property should be marked as required or not. The actual value should be eithertrueorfalse. -
FIELDSET_PROPERTY_SELECTOR
If set, this attribute should contain theEntityPropertySelectorto be used for selecting the members of aFieldsetFormElement.- See Also:
-
OPTIONS_ENTITY_QUERY
If set, contains the EQL statement orEntityQuerythat 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 noOptionGeneratororOptionIterableBuilderattribute set. -
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 anEnumSet. -
OPTIONS_ENHANCER
If set, should contain anOptionFormElementBuilderconsumer. Used to apply changes to anOptionFormElementBuilder. -
TARGET_DESCRIPTOR
In case of a nestedEntityPropertyDescriptor, this attribute can hold the original targetEntityPropertyDescriptorthat was used, in combination with the parent descriptor, to build the nested property descriptor. -
FORM_ENCTYPE
Can be set on eitherEntityViewFactoryorEntityPropertyDescriptor. Holds the suggested form enctype to submit a form holding a control for that property. -
LINK_TO_DETAIL_VIEW
Can be set on eitherEntityViewFactoryorEntityConfiguration. Holds whether views should link to theEntityView.DETAIL_VIEW_NAMEby default or not. The actual value should betrueorfalse -
IS_EMBEDDED_OBJECT
Holdstrueif a property (or a targetEntityConfigurationrepresents an embedded object instead of a related object. This will impact the control types being generated for this property. An attribute value set on theEntityPropertyDescriptorwill take precedence over the value on anEntityConfiguration. If not explicitly set, a strategy will be used to determine if a property should behave as an embedded object. -
LABEL_TARGET_PROPERTY
Represents the target property that theEntityPropertyRegistry.LABELproxies. Only set in case a target property was used.- See Also:
-
-
Method Details
-
controlName
Deprecated.Retrieve the control name to use for aEntityPropertyDescriptor. If an attributeCONTROL_NAMEis present, it will be used, else the regular name will be used.- Parameters:
descriptor- of the property- Returns:
- control name to use
-
isRequired
Check if the descriptor has thePROPERTY_REQUIREDattribute with atruevalue, marking the control as required.- Parameters:
descriptor- of the property- Returns:
- true if it is required
-