Advanced Database Persistence for Java

Examples & Reference Manual

 

Example 21 - Facets

Facets allow the developer to perform partial regeneration the DAOs source code.

This can be useful when the database is large and/or slow to respond. It usually happens you add a single column into a table and would prefer to regenerate that specific table only instead of the whole database.

How to Run this example

The Example 21 is included in the download package. To run this example please refer to the section How to Run the Examples above, but with a variation from the standard instructions:

Instead of running the hotrod Ant task, run the hotrod-visits-dev Ant task. HotRod will run much faster since it will only regenerate the VISIT table and the DailyOperations DAO.

Notice it doesn't matter where the facets are defined in relation to the fragment files. All parts of the facets are combined when the configuration file (and fragments) are read.