Data centric applications can benefit heavily from model-based data access abstraction. This fosters understanding, maintainability, as well as independence from persistency mechanisms. Utilizing metadata from the domain data model allows to write generic, reusable software modules. However, for a business logic application part, direct, type-safe manipulation of persistent object attributes is more typical. Thus, both are important programmatic use cases and coexist in data centric applications.
In this paper, we describe the concept of a dynamic and model-based object cache, the Entity Container (EC), and discuss the needs, design and implementation of a type-safe access layer upon the EC, called TSEC. Therefore, providing both access mechanisms to an EC in parallel, dynamic data and metadata access as well as static type-safe access, allows to develop flexible and reusable software modules at different abstraction levels, even independent of particular domain models.