Hibernate Tools

Reference Guide

3.2.0.beta9


Table of Contents

Preface
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
3.7.1.1. Class Diagram
3.7.2. Prototyping Queries
3.7.2.1. 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>)
4.3.1.1. Example
4.3.2. Annotation based Configuration (<annotationconfiguration>)
4.3.3. JPA based configuration (<jpaconfiguration>)
4.3.4. JDBC Configuration for reverse engineering (<jdbcconfiguration>)
4.3.4.1. Example
4.4. Exporters
4.4.1. Database schema exporter (<hbm2ddl>)
4.4.1.1. Example
4.4.2. POJO java code exporter (<hbm2java>)
4.4.2.1. Example
4.4.3. Hibernate Mapping files exporter (<hbm2hbmxml>)
4.4.3.1. Example
4.4.4. Hibernate Configuration file exporter (<hbm2cfgxml>)
4.4.5. Documentation exporter (<hbm2doc>)
4.4.6. Query exporter (<query>)
4.4.6.1. Examples
4.4.7. Generic Hibernate metamodel exporter (<hbmtemplate>)
4.4.7.1. 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
4.5.2.1. Example
5. Controlling reverse engineering
5.1. Default reverse engineering strategy
5.2. hibernate.reveng.xml file
5.2.1. Schema Selection (<schema-selection>)
5.2.1.1. Examples
5.2.2. Type mappings (<type-mapping>)
5.2.2.1. Example
5.2.3. Table filters (<table-filter>)
5.2.4. Specific table configuration (<table>)
5.2.4.1. <primary-key>
5.2.4.2. <column>
5.2.4.3. <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
6.1.1.1. Dangers of a class level use-in-string and use-in-equals meta attributes when having bi-directional associations
6.1.1.2. Be aware of putting at class scope level <meta> attribute use-in-equals
6.1.2. Advanced <meta> attribute examples
6.1.2.1. Generate pre/post-conditions for methods