Hibernate Framework



Introduction

  • Hibernate was started in 2001 by Gavin King with colleagues from Cirrus Technologies as an alternative to using EJB2-style entity beans. Its original goal was to offer better persistence capabilities than offered by EJB2 by simplifying the complexities and supplementing missing features.

  • In early 2003, the Hibernate development team began Hibernate2 releases, which offered many significant improvements over the first release.

  • JBoss, Inc. (now part of Red Hat) later hired the lead Hibernate developers in order to further its development.

  • In 2005, Hibernate version 3.0 was released. Key features included a new Interceptor/Callback architecture, user defined filters, and JDK 5.0 Annotations (Java's metadatafeature). As of 2010, Hibernate 3 (version 3.5.0 and up) was a certified implementation of the Java Persistence API 2.0 specification via a wrapper for the Core module which provides conformity with the JSR 317 standard.

  • In Dec 2011, Hibernate Core 4.0.0 Final was released. This includes new features such as multi-tenancy support, introduction of ServiceRegistry (a major change in how Hibernate builds and manages "services"), better Session opening from SessionFactory, improved integration via org.hibernate.integrator.spi.Integrator and auto discovery,internationalization support and message codes in logging, and a clearer split between API, SPI and implementation classes.

Futures of Hibernate

  1. It will provide Portable Object Relationship(associations , Inheritance)
  2. Caching support(session level ,Session Factory level)
  3. HQL support, hibernate Query Language (database independent queries developer can write ,at runtime it will fire queries on underlying Database )
  4. Criteria support (we can pass conditional query’s in very easy manner )
  5. Named parameters support (run time values we can pass to query’s)
  6. No need of compile time Exception handling here they refitted to run time exceptions
  7. Auto DDL support (table creation , updating and deletion)
  8. Auto primary key incrimination
  9. No Application Server dependency

Advantages of Hibernate

  1. Hibernate supports inheritance, associations (relationship),collections.
    • Hibernate when you saved derived class object, then automatically the base class data also inserted in db. It means in hibernate we got inheritance support.
    • Hibernate support relation ships like one to many, many-to-one,one-to-one and many-to-many
    • Hibernate support the collections like list, set and map
  2. Hibernate support the automatic generation of primary keys.
  3. Hibernate support the automatic generation of primary keys.
  4. In Hibernate, we got it’s own Query language , called HQL (Hibernate Query Language) so we can develop db independent persistence logic
  5. If the database Scheme does not exit then only it will insert th data otherwise throws an exception (lable (or) View does not exit)
  6. Hibernate support annotations.
  7. Hibernate has provided dialect classes. So w no ned write SQL Queries in hibernate. Instead, we apply methods provided by Hibernate API.

Comments

Popular posts from this blog

Java Class declaration interview Questions

Multithreading Interview Question for Fresher and Experienced

Collections Framework Interview Questions for Fresher and Experienced