Java
  Home arrow Java arrow Hibernate: HQL in Depth
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

Hibernate: HQL in Depth
By: A.P.Rajshekhar
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 49
    2006-01-10

    Table of Contents:
  • Hibernate: HQL in Depth
  • HQL: Understanding Queries
  • HQL in the Real World
  • Points to Remember

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Hibernate: HQL in Depth


    (Page 1 of 4 )

    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.

    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.

    More Java Articles
    More By A.P.Rajshekhar


       · HiIn this article I have discussed about HQL. If you have any doubts or ideas...
       · "Even the most complex queries in SQL can be mapped to HQL. " is totally a wrong...
       · I am not able to do the join in my tablesAm done with HQL query as u...
       · Have you provided sql scripts for the tables used ?
     

    JAVA ARTICLES

    - 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 ...
    - Generics and Limitations in Java
    - Getting Started with Java Web Development in...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT