The enum approach plays well with other (much smaller) enums, gives us
version control, compile time checks & type safe access inside of
Groovy, Groovy logic (e.g. fallback values), Intellisense, and makes the
data easily editable inside IntelliJ (including commenting), so it imho
handily beats all more conventional alternative approaches :-)
PS: We do write many of our enums into our different DB schemas
eventually, were they get historized by our standard mechanism, but that
is for sharing it with consumers of our service, not as the editable
source of truth.
On 25/02/2023 16:48, Milles, Eric (TR Technology) via dev wrote:
Another thought would be to convert this code-based design to a data-driven
approach. Would an in memory database or a JSON/XML resource file be a better
place to represent and store the 1200+ entities?