Advanced Database Persistence for Java Examples & Reference Manual |
This example shows how the HotRod configuration file can be divided into separate files.
There are varied reasons why to separate the HotRod configuration file into smaller chunks:
Whichever the reason, the configuration file can be separated into fragments. The main one has a slightly different format since it includes the main configuration options for the generator. The fragments include database objects only.
Tables, views, selects, and custom DAOs, can grouped in any order between these fragments.
Fragment can include another sub-fragments, as long as there aren't any circular references.
All the examples include a HotRod configuration separated in three files:
hotrod.xml
(main configuration file)hotrod-sales.xml
(fragment)hotrod-accounting.xml
(fragment)This example is not runnable. Actually, all the examples use behind the scenes this configuration so you've been running it all the time in the previous examples.