Pages

Monday, October 17, 2011

Hibernate Tutorial [Java Brains]

Hibernate is a popular open source object relational mapping tool for Java platform. It provides powerful, ultra-high performance object/relational persistence and query service for Java. Hibernate lets you develop persistent classes following common Java idiom - including association, inheritance, polymorphism, composition and the Java collections framework. The Hibernate Query Language, designed as a "minimal" object-oriented extension to SQL, provides an elegant bridge between the object and relational worlds.

Introduction To Hibernate  
In this tutorial, we'll understand the mismatch between object and relational models and what ORM is.
Setting Up Hibernate  
In this tutorial, we'll download Hibernate and set it up in our development environment by configuring it in Eclipse.
Part 1- Writing a Hibernate Application  
In this first of a three part video on writing a simple Hibernate application from the scratch, we'll learn how to write the Hibernate configuration XML file, hibernate.cfg.xml.
Part 2- Writing the Model Class with Annotations  
We'll now create a Model class and configure it as an Entity using Annotations.
Part 3- Saving Objects using Hibernate APIs  
We'll learn how to instantiate Entity objects and save them to the database using Hibernate APIs.
hbm2ddl Configuration and Name Annotations  
In this tutorial, we'll look at the schema generation options in Hibernate. We'll also learn some annotations to change the default name generated by Hibernate for entities.
More Annotations  
We'll try out a few more annotations to configure our entity class.
Retrieving Objects using session.get  
We'll look at one of the several ways we can fetch data from the database using Hibernate: the session.get method.
Primary Keys  
Here we'll learn how to configure the primary key in our entity class using the @Id annotation.
Value Types and Embedding Objects  
We'll learn the difference between Entity type objects and Value type objects. We'll use the @Embeddable annotations to embed a value type object into our Entity class.
AttributeOverrides and Embedded Object Keys  
In this video, we'll learn how to override configuration inside embedded objects, and we'll also explore object keys.
Saving Collections  
We'll now learn how to save value types that are collection objects.
Configuring Collections and Adding Keys  
More configuration options for collections, including configuring primary keys.
Proxy Objects and Eager and Lazy Fetch Types  
Hibernate manages data fetching and optimizations using proxy objects. In this tutorial, we'll learn what they are and how lazy initialization works.
One To One Mapping  
One to one mapping of entities.
One To Many Mapping  
One To Many mapping of entities.
mappedBy and Many To Many Mapping  
Many to Many mapping of entities.
CascadeTypes and Other Things  
In this tutorial, we'll look at some concepts like CascadeType which can be configured for entity relationships.
Implementing Inheritance  
We'll understand how to configure entity classes that have an inheritance hierarchy.
Implementing Inheritance - Single Table Strategy  
Single table inheritance strategy.
Implementing Inheritance With Table Per Class Strategy  
Table per class inheritance strategy.
Implementing Inheritance With Joined Strategy  
Joined inheritance strategy.
CRUD Operations  
Writing code to Create, Read, Update and Delete entities in the database.
Transient, Persistent and Detached Objects  
This tutorial discusses three important entity object states in Hibernate: Transient, Persistent and Detached.
Understanding State Changes  
We'll understand some of the different ways in which entity objects change from one state to another.
Persisting Detached Objects  
This tutorial explores a special case of object state change: from detached to persistent.
Introducing HQL and the Query Object  
Introducing HQL and using HQL to run queries on the database.
Select and Pagination in HQL  
In this tutorial we'll learn Hibernate's support for pagination. We'll also learn how to write select queries to retrieve only certain columns.
Understanding Parameter Binding and SQL Injection  
We'll understand how appending parameters to SQL queries causes SQL injection, and will learn how to use the Parameter Binding feature in Hibernate.
Named Queries  
We'll learn about named queries and how to write and access named queries. We'll also write and execute a NamedNativeQuery.
Introduction to Criteria API  
This tutorial is an introduction to the Criteria API. Yet another way to work with data in Hibernate.
Understanding Restrictions  
Understanding how to apply restrictions to our queries when using Criteria.
Projections and Query By Example  
In this tutorial, we'll learn how to use Projections to fine tune the results of the Criteria API. We'll also use Query By Example (QBE) to easily specify multiple where clauses in a single example object.
Cacheing in Hibernate  
In this tutorial, we'll learn about Hibernate's cache support: both first level (Session) and second level cache.
Configuring Second Level Cache  
We'll configure EHCache as our second level cache, and then put it to work. We'll fetch an object across two sessions, and we'll see how
Hibernate's second level cache comes into play to save a database query.
Using Query Cache  
In this tutorial, we'll learn how to cache results that are fetched from the Query object.

1 comment:

  1. Howdy, I figure your blog might be having web program similarity issues. At the point when I investigate your site in Safari, it looks fine notwithstanding, when opening in IE, it has some covering issues. I simply needed to give you a brisk heads up! Beside that, superb site!
    live

    ReplyDelete