Example & Tutorial understanding programming in easy ways.

Explain about HibernateTemplate?

When we want to access code then we can use the HibernateTemplate is a helper class to used this. With the help this we can get support of automatically converts HibernateExceptions which is checked exception into DataAccessException which is an unchecked exception. 


            HibernateTemplate is typically used to implement data access or business logic services. In this we use the central method is execute(), that has supports the hibernate code that implements HibernateCallback Interface.It provides Hibernate Session handling such that neither the HibernateCallback implementation nor the calling code needs to explicitly care about retrieving/closing Hibernate Sessions, or handling Session lifecycle .


             exceptions.org.springframework.orm.hibernate.HibernateTemplate is that class help to provide the different methods for querying/retrieving data from the database. With the help of this we can also convert checked Hibernateexceptions into unchecked DataAccessExceptions.Uses the same SQLExceptionTranslator mechanism as JdbcTemplate. 

Read More →
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!