Wednesday, 11 January 2017

Significance of using Spring’s Hibernate Template

Spring's Hibernate Template (i.e. org.springframework.orm.hibernate.HibernateTemplate) is a helper class which provides utility methods for querying/retrieving data from the database. It also converts checked HibernateExceptions into unchecked DataAccessExceptions.

Benefits of HibernateTemplate:
  • HibernateTemplate, a Spring Template class simplifies interactions with Hibernate Session.
  •  Common functions are simplified to single method calls.
  •  Sessions are automatically closed.
  •  Exceptions are automatically caught and converted to runtime exceptions.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...