Hibero logoHibero

Product Discontinued

Hibero was discontinued on 1 January 2008. Existing customers with an active support contract will continue to receive technical support.

Visit documentation.

Read license.

Mapping Features

Brings IntelliJ IDEA's industry-leading coding and refactoring capabilities to Hibernate XML Configuration/Mapping Files, Hibernate Annotations and EJB3 Persistence:

HQL Features

Convenient access to HQL capabilities for Java string literals and named HQL queries:

Quickly prototype of HQL queries using the HQL Scratch Pad Editor (File | Open HQL Scratch Pad) which doesn't require a physical file.

Hibernate XML Configuration and Mapping File Templates

For your convenience Hibero provides templates to quickly create Hibernate XML Configuration and Mapping files accesible from the New contextual menu.

New Hibernate XML Files

Hibernate Configuration Profiles and Log Console

Many of the Hibero features requires a Hibernate runtime environment. The configuration of this Hibernate environment may come from a Hibernate XML configuration file, a Spring XML beans file or an existing Persistence Unit (JPA) of your project.

The user has the ability to set up as many different Hibernate configurations as needed (e.g., development, testing, production, database connections, etc.). In Hibero terminology these configurations are known as Hibernate Configuration Profiles. To learn how to manage profiles please see the Settings section.

The current Hibernate Configuration Profile may also be selected quickly from the top-left combo box at the Hibero tool window.

The Hibero tool window also contains a Log Console to watch the activity of the Hibernate runtime environment. Message categories and log levels are customizable by the user.

Auto-completion

Semantic completion for all Hibernate/EJB3 Persistence related concepts: classes, fields, properties, access, types, generators, filters, etc., and also for schemas, catalogs, tables and columns if a database connection is provided.

Also for XML configuration files: packages, classes, properties and mapping files.

Class Completion
Class Completion Example

Property Completion
Property Completion Example

Access Completion
Access Completion Example

Type Completion
Type Completion Example

Generator Completion
Generator Completion Example

Table Completion
Table Completion Example

Mapping Resource Completion
Mapping Resource Completion Example

Syntax and Error Highlighting

Highlighted unresolved references to Java packages, classes, fields, getters and setters; references to properties, types and filters in the same mapping file; and invalid attribute values.

Unresolved Class Example

Unresolved Symbol Example

Unresolved Mapping File Example

Go To Declaration

Navigate from Hibernate mapping files or annotations to the declaration of Java packages, classes, fields, getters and setters; and references to properties, types and filters in the same mapping file.

Go To Declaration Hibernate Mapping File Example

Go To Declaration Hibernate Annotations Example

Find Usages

Find usages of Java packages, classes, fields, getters and setters; properties, types and filters referenced in the same mapping file; from Hibernate mapping files or annotations.

Find Usages Example

Rename, Move and Safe Delete Refactorings

No more painful updates of Hibernate mapping files or annotations to keep them synchronized with Java source code. Apply Rename, Move and Safe Delete refactorings, as you see it fits, and let Hibero update all the references.

Rename Refactoring Example

Code Inspections and Quick Fixes

Over 60 code inspections and quick fixes, please go to the documentation section Inspections for a detailed description of each inspection.

HQL Editor with Syntax Highlighting and Braces Matcher

Hibero defines a new HQL file type for files with .hql extension to seamless integrate the edition of HQL queries within IDEA.

The HQL Editor provides a full range of coding assistance features for HQL queries:

  • Syntax Highlighting customizable by the user (File | Settings | Colors & Fonts | HQL) and braces matcher.
  • Auto-Completion

    HQL Completion

    HQL Completion

    HQL Completion

  • Code Navigation: Go To Declaration of packages, classes, properties and HQL variables.
  • Find Usages

    HQL Find Usages

  • Rename/Move/Safe Delete Refactorings

    HQL Rename

  • Code Formatting: reformat HQL queries according to user defined styles (File | Settings | Hibero | HQL Style Schemes). See Settings section for details.
  • Surround With

    HQL Surround With

  • Code Folding

    HQL Folding

  • Error Highlighting

    HQL Unresolved var

    HQL expression expected

HQL Query Execution

At any moment the user may decide to run (Run | Run HQL Query) the HQL query being edited and the returned results, if any, will be shown in the embedded Query Results panel at the botton of the HQL Editor.
Each HQL Editor has its own Query Results panel, and both DDL and DML queries are supported.

HQL Query Execution Results

The results table is sortable and the column resize strategy is user customizable, as well as whether to use an scrollable result set (JDBC driver and HQL query permitting) or a fixed list size. See the Settings section of the documentation for details.

HQL Query Translation

The HQL Editor also provides a Query Translator panel which holds the translation of the HQL query to SQL as it is generated by Hibernate.

The translation to SQL can be set up to be done dynamically as the HQL query is edited or on demand (Edit | Translate HQL Query).

HQL Query Translator

Parameters Auto-Discovery

The Parameters panel of the HQL Editor shows a table with all the parameters of the HQL query. This table displays the parameter position or name (for positional-style or EJBQL-style respectively), parameter type, and the value currently assigned to the parameter.

The same as with the HQL Query Translation, the discovery of parameters can be set up to be done dynamically as the query is edited or on demand (Edit | Discover HQL Parameters).

Positional HQL Parameters

Named HQL Parameters

The number of parameters, their position/name, and type is automatically discovered by Hibero, and the user only needs to assign the values (only for Hibernate 3.1.x or above, if Hibernate 3.0.x or 2.x is used then the type needs to be specified manually by the user).

Unknown HQL Parameters Type

Inline Parameter Editor

The HQL Editor also features a convenient inline parameter editor to quickly assign a value to a parameter. To use this feature position the caret at the desired parameter and press Alt + Insert (or click the mouse over the light bulb) and select 'Set parameter value' intention.

Inline HQL Parameter Editor Intention

Inline HQL Parameter Editor

Show Parameter Info

Another convenient feature of the HQL Editor is the ability to show all the relevant information about a parameter (position/name, type and value) with the help of the View | Parameter Info action.

To use this feature, either move the caret to the desired parameter and press Ctrl + P, or hover the mouse over any discovered parameter.

Show HQL Parameter Info

Autoscroll from/to Parameter

Autoscroll from/to Parameter helps the user to visually map the parameters between the query code and the parameters table.

If Autoscroll from Parameter is selected then moving the caret to any parameter in the HQL code will select that parameter in the table.

If Autoscroll to Parameter is selected then selecting a parameter in the table will highlight that parameter in the HQL code.

Autoscroll from/to HQL Parameter

Quick HQL Query Edition

For those cases that you don't want to create a separate HQL file to edit a query Hibero provides a handy quick editor (View | Quick HQL Query Edition) available for Java string literals and named queries (i.e., HQL queries defined at XML mapping files or @javax.persitence.NamedQuery annotations).

Quick HQL Edition

This quick editor has exactly the same features as the standard HQL Editor, plus the option to cancel (Esc) any changes made to the query or to apply (Ctrl + Shift + X) such changes to the original query text.

Quick HQL Query Translation

If you just want to quickly see the translated SQL code for any given HQL query expressed in a Java string literal or named query then use the View | Quick HQL Query Translation action.

Quick HQL Translation

Quick HQL Query Execution

Java string literals and named queries can even be executed on-the-fly with the help of the View | Quick HQL Query Execution action.

Quick HQL Execution

Create HQL File Intention

Create a new HQL file out of a Java string literal or named query.

Create HQL File Intention