www.bullraider.com

You are here: Home Java Hibernate 3.6

Hibernate 3.6 Tutorial

Hibernate Basics

AddThis Social Bookmark Button

We will explore  the basics of hibernate before we jump on to further exploration

Read more:

Steps for Writng First Hibernate Application

AddThis Social Bookmark Button

Objective: Suppose we have a class Employee having properties eno,ename,sal,job,deptno. We want to persists this class/object to databse table employee1000.

Read more:

CRUD In Hibernate

AddThis Social Bookmark Button

A CRUD operation deals with creating , retriving , updating and deleting from the table, in this tutorial we will see how it is done.,

Read more:

Joined Subclass

AddThis Social Bookmark Button

Hibernate provides advanced features, which can let your classes map even if they are in relationship like  composition and inheritance. We discussed composition last tutorial. Joined-subclass is one of the way for achieving inheritance.

Read more:

Component Mapping

AddThis Social Bookmark Button

A component mapping deals with entities involved in has - a relationship.

Read more:

Composite Key Mapping

AddThis Social Bookmark Button

In Real world applications it is natural to  have composite keys  to identify a row, which is combination of key  columns.

Read more:

One to One Mapping

AddThis Social Bookmark Button

This example tells about how to map one-to-one relationship using Hibernate.

Read more:

Many to One Mapping

AddThis Social Bookmark Button

Many-to-One is another relationship. Here we are describing this relationship through Employee and Dept table.

Read more:

One to Many Mapping

AddThis Social Bookmark Button

In this example we are describing one-to-many relation. There are two table one is Faculty and other is Subject.

Read more:

Many to Many Mapping

AddThis Social Bookmark Button

This mapping tells about many-to-many mapping. There are two tables, one is "Customer" and other is "Policy".

Read more:

Calling Store Procdure

AddThis Social Bookmark Button

Hibernate supports query via store procedure and functions. We can use store procedure in various ways.

Read more:

HQL In Hibernate

AddThis Social Bookmark Button

Hql is just like sql but it is fully object oriented. Insteade of table name we have to write class neme here. And main difference is inheritance,polymerphism all object oriented properties we can define here.

Read more:

Named Query in Hibernane

AddThis Social Bookmark Button

Named querey is a concept which separate the query from coding section to hbm file with a specific   name. Which we can use by calling its name. It can be reusable.  can be native sql or hql.

Read more:

Criteria Mapping

AddThis Social Bookmark Button

Criteria query allows us to create and execute object-oriented query. Generally it is alternative to hql. Basically those people , whose don't have sql knowledge, they can write Criteria query.

Read more:

Criteria Expression

AddThis Social Bookmark Button

Here we are using some expression in criteria. Like ename should start with 'Ra' and salary between minsal and maxsal i.e(1000,3000)

Read more:

Criteria Logical Exepression

AddThis Social Bookmark Button

We can add logical expression in Criteria like

Expression.eq,  Expression.isNotNull,Expression.between,Expression.like etc. In this example we have expressed this thing

Read more:

Group by in Criteria

AddThis Social Bookmark Button

In section we'll show how to use Group by clause in criteria.

Read more:

Left Outer join in hibernate

AddThis Social Bookmark Button

Here we are defining left-outer join between customer and policy tables based on customer_id.

Read more: