Hibernate Tools

Reference Guide


Table of Contents

1. Download and install Hibernate Tools
1.1. JBoss Eclipse IDE
1.2. Eclipse IDE
1.2.1. Usage of Eclipse WTP
1.3. Ant
2. Code generation architecture
2.1. Hibernate Meta Model
2.2. Exporters
3. Eclipse Plugins
3.1. Introduction
3.2. Creating a Hibernate configuration file
3.3. Creating a Hibernate Console configuration
3.4. Reverse engineering and code generation
3.4.1. Code Generation Launcher
3.4.2. Exporters
3.5. Hibernate Mapping and Configuration File Editor
3.5.1. Java property/class completion
3.5.2. Table/Column completion
3.5.3. Configuration property completion
3.6. Reveng.xml editor
3.7. Hibernate Console perspective
3.7.1. Viewing the entity structure Class Diagram
3.7.2. Prototyping Queries Dynamic Query Translator
3.7.3. Properties view
3.8. Enable debug logging in the plugins
4. Ant Tools
4.1. Introduction
4.2. The <hibernatetool> ant Task
4.2.1. Basic examples
4.3. Hibernate Configurations
4.3.1. Standard Hibernate Configuration (<configuration>) Example
4.3.2. Annotation based Configuration (<annotationconfiguration>)
4.3.3. JPA based configuration (<jpaconfiguration>)
4.3.4. JDBC Configuration for reverse engineering (<jdbcconfiguration>) Example
4.4. Exporters
4.4.1. Database schema exporter (<hbm2ddl>) Example
4.4.2. POJO java code exporter (<hbm2java>) Example
4.4.3. Hibernate Mapping files exporter (<hbm2hbmxml>) Example
4.4.4. Hibernate Configuration file exporter (<hbm2cfgxml>)
4.4.5. Documentation exporter (<hbm2doc>)
4.4.6. Query exporter (<query>) Examples
4.4.7. Generic Hibernate metamodel exporter (<hbmtemplate>) Seam Exporter via <hbmtemplate>
4.5. Using properties to configure Exporters
4.5.1. <property> and <propertyset>
4.5.2. Getting access to user specific classes Example
5. Controlling reverse engineering
5.1. Default reverse engineering strategy
5.2. hibernate.reveng.xml file
5.2.1. Schema Selection (<schema-selection>) Examples
5.2.2. Type mappings (<type-mapping>) Example
5.2.3. Table filters (<table-filter>)
5.2.4. Specific table configuration (<table>) <primary-key> <column> <foreign-key>
5.3. Custom strategy
5.4. Custom Database Metadata
6. Controlling POJO code generation
6.1. The <meta> attribute
6.1.1. Recomendations Dangers of a class level use-in-string and use-in-equals meta attributes when having bi-directional associations Be aware of putting at class scope level <meta> attribute use-in-equals
6.1.2. Advanced <meta> attribute examples Generate pre/post-conditions for methods