The Hibernate support.

Content - Hibernate support

Benefit

The UJO object can improve the performance of the Hibernate query language mainly the SELECT statement. I have measured 43% time saving on my performance test (see the SourceForge for a source code). The test was running on the Hibernate 3.3.1.GA with an EhCacheProvider and SpeedUjo object implementation.

Samples

There is possible to change a default Hibernate Accessor in HBM file by the next sample:
<hibernate-mapping
  package="performance.test"
  default-access="org.ujoframework.hibernateSupport.UjoPropertyAccessor"
  >
  <class name="Order" table="MY_ORDER" >
     ...

Notice

Due to an error in Hibernate, it is necessary to specify the UJO object getters by the related property name (not the variable name). See the example:
  public static final Property<Order,Long> ID = newProperty("id", Long.class);
  public static final Property<Order,Date> DATE = newProperty("myDate", Date.class);

  public Long getId() {
      return ID.of(this);
  }
  public Date getMyDate() {
      return DATE.of(this);
  }