Entity Centre DSL: provide support for automatic identification of selection criteria types
Description
Existing Entity Centre DSL requires specification of a property selection criterion type after adding a property. The original intent of this was to make the decision of choosing a property editor explicit (i.e., more conscious) and to support a path for customisation, such as specify single- or multi-valued autocompletion, value matcher, etc.
Using Entity Centre DSL for some time now with different software engineers on a variety of projects suggests that stronger validation and automation is required.
-
[ ] 1. Stronger validation: unlike Entity Master DLS, Entity Centre DSL has stronger validation already. Need to review the current validation rules and make sure that they are up to date and complete. Adjust any rules that are lacking.
-
[ ] 2. Automation: In the vast majority of cases it is possible to avoid the need to specify selection criteria types, because they can be determined automatically based on the property type.
For example, call
.addCrit(ReWorkOrder_).asMulti().autocompleter(WorkOrder.class).also()can be easily substituted with.addCrit(ReWorkOrder_). It should still be possible to specify selection criteria explicitly to support customisations as currently and not to break existing codebases.Needless to say, that a property type is not only the type of the field, but also various annotations. For example, a property of type
Dateand annotation@TimeOnlyrepresents a "time type" andasTimePicker()is implied. Similar for@DateOnly. And@CritOnlyannotations define whether criteria are single- or multi-valued.
Expected outcome
More reliable and simple to use Entity Centre DSL.