Book Image

Java Hibernate Cookbook

By : Yogesh Prajapati, Vishal Ranapariya
Book Image

Java Hibernate Cookbook

By: Yogesh Prajapati, Vishal Ranapariya

Overview of this book

This book will provide a useful hands-on guide to Hibernate to accomplish the development of a real-time Hibernate application. We will start with the basics of Hibernate, which include setting up Hibernate – the pre-requisites and multiple ways of configuring Hibernate using Java. We will then dive deep into the fundamentals of Hibernate such as SessionFactory, session, criteria, working with objects and criteria. This will help a developer have a better understanding of how Hibernate works and what needs to be done to run a Hibernate application. Moving on, we will learn how to work with annotations, associations and collections. In the final chapters, we will see explore querying, advanced Hibernate concepts and integration with other frameworks.
Table of Contents (15 chapters)
Java Hibernate Cookbook
About the Authors
About the Reviewers


Before we proceed, it's necessary to learn about the fundamentals of hibernate: the classes and interfaces required.

In this chapter, we will cover the fundamentals of hibernate, such as SessionFactory, Session, and Criteria. We will discuss the importance of SessionFactory in the hibernate application. Criteria is used to do the actual transaction or the CRUD (Create, Read, Update, Delete) operation. Apart from this, we will cover some basic and useful functionalities, such as the sorting of results, limiting the number of rows, transforming a result, and the basics of projections.