HQL Editor/Translator One Pager

This document outlines the features for HQL Editor functionality planned for Hibernate Support in 6.5 version of NetBeans IDE.


Main features

  1. Support HQL Query execution. (M1)
  2. On the fly translation of HQL to SQL. (M2)
  3. Assistance in the form of code completion for database tables, table column names and Java classes (POJOs). (M2)

Use cases

  1. Developer selects a Hibernate configuration file from 'Project/File' window, right clicks on it and selects 'Run HQL Query' to bring up the HQL editor. (M1)
  2. Developer now types in the HQL query on the HQL editor window. Developer can also switch the selected configuration any time before the query execution using the drop down box on the editor toolbar. (M1)
  3. Query can include joins and clauses (such as like, where). (M1)
  4. Developer gets assistance (like code completion (M2) and syntax highlighting (M1)) while writing HQL query.
  5. Once complete, developer clicks on 'Run HQL query' button on the editor toolbar to begin the query execution.(M1)
  6. Once the query execution is complete, developer will be presented with results on the output table below the editor. (M1)
  7. If there are any errors during the query execution, those will be shown instead of the result table in the same place. (M1)
  8. Developer can also switch to 'SQL' view to see the equivalent SQL query for the HQL query typed in the editor. (M2)

Known issues

  1. All POJOs need to be pre-compiled and mapping files need to be copied to the build location. This can be done easily by just building the project. (#137205)
  2. AnnotationConfiguration is not yet supported. This means annotated classes cannot be part of the query. (#136996)

HQL Editor enhancements (targeted for 7.0)

  1. Performance
    1. Be able to execute queries that involve more processing and fetch lots of data.
    2. Back end query execution enhancements to handle threading issues.
  2. Editor enhancements (#140463) (#148262)
    1. Error handling and error notification improvements.
    2. Rewrite existing implementation with GSF (Parser API) to provide CC (for keywords, POJOs and DB tables and constructs), syntax highlighting and indentation.
    3. Result display per object basis. (Splitting the results per object, developer can see results for a particular result object)
    4. Equivalent SQL query improvements (variable names need to be human friendly, subjected to Hibernate API support)
    5. Investigate paging for result display (as its done in SQL Editor).
  3. Other (time permitting)
    1. HQL named queries (#149876)
    2. In-place HQL Query editor. (In Java sources and mapping files)
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo