Persistence Layer

Tammi's persistence layer has been adopted from the persistence broker API of the Object/Relational Bridge (OJB). This approach makes objects independent on the persistence layer allowing development of large-scale, mission critical applications. In addition to OJB, the persistence layer provides limited support for Castor XML Binding Framework.

Persistence Broker

A persistence broker implementing the Persister interface provides methods for retrieval, storage and deletion of objects. The implementation of the broker supporting the desired persistence framework can be retrieved from Factory.

By configuring RepositoryFilter to your application pipe, you enable the $dbase tool through which to access a request specific instance of the persistance broker from within templates. The configuration of RepositoryFilter defines the default database connection, the persistence broker implementation to instantiate, and authentication details of the applied connection.

Dynamic Mapping

Configuration of the mapping between the object model and the database schema depends on the persistence framework to apply. OJB maintains a class descriptor repository that can be configured either directly or via XML files. The configuration may take place both at startup and during run-time. The mapping is defined between named application classes and relational database tables. In addition to a static mapping between the classes and tables, Tammi supports Variables, which can dynamically adapt to hold any number of new attributes of specified types. The classes corresponding to a particular set of attributes may also be created at run-time. By applying Variables during run-time configuration makes it possible to develop extremely dynamic persistence solutions.