Home arrow Java arrow Hibernate: HQL in Depth

Hibernate: HQL in Depth

SQL can be combined with an object-oriented approach. What we end up with is Hibernate Query Language, or HQL. This article discusses how HQL works, and shows how to use it in the real world.

Author Info:
By: A.P.Rajshekhar
Rating: 4 stars4 stars4 stars4 stars4 stars / 86
January 10, 2006
  1. · Hibernate: HQL in Depth
  2. · HQL: Understanding Queries
  3. · HQL in the Real World
  4. · Points to Remember

print this article

Hibernate: HQL in Depth
(Page 1 of 4 )

Amateurs study generics and professionals study specifics. Until now, I have been discussing the generics of Hibernate. Now, it's time to understand the specifics. Unless each aspect of Hibernate is understood,  it will become really difficult to unleash its full power.

In itself, SQL is very powerful. So when the  power of SQL is combined with the flexibility of the object oriented approach, what we get is Hibernate Query Language, or HQL for short. Just like SQL, HQL also provides Projection queries, Aggregation functions, Grouping and Restrictions. Even the most complex queries in SQL can be mapped to HQL.

The first section of this article will detail the usage of HQL on simple queries without any participating relationships. The complexity comes into play when associations occur. In the second section, I will be discussing how to work with HQL in the context of associations. The example in the third section will implement a report using a complex query with a participating relationship. So let's begin.

blog comments powered by Disqus

- Java Too Insecure, Says Microsoft Researcher
- Google Beats Oracle in Java Ruling
- Deploying Multiple Java Applets as One
- Deploying Java Applets
- Understanding Deployment Frameworks
- Database Programming in Java Using JDBC
- Extension Interfaces and SAX
- Entities, Handlers and SAX
- Advanced SAX
- Conversions and Java Print Streams
- Formatters and Java Print Streams
- Java Print Streams
- Wildcards, Arrays, and Generics in Java
- Wildcards and Generic Methods in Java
- Finishing the Project: Java Web Development ...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials