Skip to content

Entity Type Enhancement

homedirectory edited this page Aug 7, 2024 · 5 revisions

Entity Type Enhancement

In TG extensive use is made of dynamic entity type enhancements - generated Java classes that enhance entity types they are based on in various ways.

For example:

  • Instrumented entity types - enhanced with interception of property setters, which enables property validators and definers.
  • Criteria entity types - enhanced with crit-only properites; core component of entity centres.

Entity type enhancements can be categorised into 2 groups:

  1. Structural enhancement - the structure of an enhanced type differs from that of its base type. E.g., new properties are added.
    • Criteria entity types
    • Entity types with custom calculated properties
  2. Non-structural enhancement - the opposite of structural enhancements.
    • Instrumented entity types
    • Proxied entity types

This categorisation is especially useful in application to computations that operate on the structure of an entity type and use caching: non-structurally enhanced entity types can be treated as their base types.

Clone this wiki locally