Interface EntityAttributes
public interface EntityAttributes
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
If set, contains the control name that should be used for form elements.static final String
If set, this attribute should contain theEntityPropertySelector
to be used for selecting the members of aFieldsetFormElement
.static final String
Can be set on eitherEntityViewFactory
orEntityPropertyDescriptor
.static final String
Holdstrue
if a property (or a targetEntityConfiguration
represents an embedded object instead of a related object.static final String
Represents the target property that theEntityPropertyRegistry.LABEL
proxies.static final String
Can be set on eitherEntityViewFactory
orEntityConfiguration
.static final String
If set, indicates that the property descriptor represents a native property on a class.static final String
If set, should contain a collection of the allowed values.static final String
If set, should contain anOptionFormElementBuilder
consumer.static final String
If set, contains the EQL statement orEntityQuery
that should be used to fetch the selectable options.static final String
If set, determines if a control for this property should be marked as required or not.static final String
In case of a nestedEntityPropertyDescriptor
, this attribute can hold the original targetEntityPropertyDescriptor
that was used, in combination with the parent descriptor, to build the nested property descriptor.static final String
If set, holds the name of thePlatformTransactionManager
bean that the repositories of this entity use. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
controlName
(EntityPropertyDescriptor descriptor) Deprecated.static boolean
isRequired
(EntityPropertyDescriptor descriptor) Check if the descriptor has thePROPERTY_REQUIRED
attribute with atrue
value, marking the control as required.
-
Field Details
-
TRANSACTION_MANAGER_NAME
If set, holds the name of thePlatformTransactionManager
bean 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 exampleProperty
orPropertyDescriptor
. -
PROPERTY_REQUIRED
If set, determines if a control for this property should be marked as required or not. The actual value should be eithertrue
orfalse
. -
FIELDSET_PROPERTY_SELECTOR
If set, this attribute should contain theEntityPropertySelector
to be used for selecting the members of aFieldsetFormElement
.- See Also:
-
OPTIONS_ENTITY_QUERY
If set, contains the EQL statement orEntityQuery
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 noOptionGenerator
orOptionIterableBuilder
attribute 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 anOptionFormElementBuilder
consumer. Used to apply changes to anOptionFormElementBuilder
. -
TARGET_DESCRIPTOR
In case of a nestedEntityPropertyDescriptor
, this attribute can hold the original targetEntityPropertyDescriptor
that was used, in combination with the parent descriptor, to build the nested property descriptor. -
FORM_ENCTYPE
Can be set on eitherEntityViewFactory
orEntityPropertyDescriptor
. Holds the suggested form enctype to submit a form holding a control for that property. -
LINK_TO_DETAIL_VIEW
Can be set on eitherEntityViewFactory
orEntityConfiguration
. Holds whether views should link to theEntityView.DETAIL_VIEW_NAME
by default or not. The actual value should betrue
orfalse
-
IS_EMBEDDED_OBJECT
Holdstrue
if a property (or a targetEntityConfiguration
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 theEntityPropertyDescriptor
will 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.LABEL
proxies. 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_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
Check if the descriptor has thePROPERTY_REQUIRED
attribute with atrue
value, marking the control as required.- Parameters:
descriptor
- of the property- Returns:
- true if it is required
-