Hibernate is an object/relational mapping (ORM) tool that also provides data querying and retrieval functions in a Java environment. Whether you are using simple objects or collections, Hibernate reduces your development time by handling most of the common data persistence tasks. This code-intensive text will take you through Hibernate's major components and show you exactly how to use it to enhance your current development practices and toolsets.
You will learn how to install Hibernate, build the development environment, and configure Hibernate for a variety of databases, including DB2®, HypersonicSQL, MySQL®, Oracle®, and PostgreSQL. Then you'll learn the details of connecting to databases using Hibernate, creating persistent classes and objects, working with SQL and HQL (the Hibernate Query Language), and managing transactions. Finally, you will take that basic knowledge into your real-world applications, learning to use Hibernate with other tools such as Eclipse, Tomcat, Maven, Struts, and Xdoclet.
What you will learn from this book
- How Hibernate maps objects to a relational database
- How to build a development environment for using Hibernate in a standalone context or in coordination with Tomcat
- Methods of creating persistent objects
- Query techniques using both traditional SQL and Hibernate Query Language
- The DAO design pattern and how to use DAO with Hibernate
- The application of Hibernate within a Maven project management system
- How to incorporate Aspect J and Hibernate for complete control
- How to use advanced caching techniques to improve Hibernate's performance
- How to use XDoclet with Hibernate to reduce your development time
- The procedure for using Velocity and Struts with Hibernate
Who this book is for
This book is for professional Java developers who already know how to build sophisticated applications and have at least a general familiarity with databases, Java application development, and Web development. No prior experience with Hibernate is required.
Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.