コード例 #1
0
 /// <summary>
 /// Convert the given HibernateException to an appropriate exception from the
 /// <code>org.springframework.dao</code> hierarchy. Will automatically detect
 /// wrapped ADO.NET Exceptions and convert them accordingly.
 /// </summary>
 /// <param name="ex">HibernateException that occured.</param>
 /// <returns>
 /// The corresponding DataAccessException instance
 /// </returns>
 /// <remarks>
 /// The default implementation delegates to SessionFactoryUtils
 /// and convertAdoAccessException. Can be overridden in subclasses.
 /// </remarks>
 protected DataAccessException ConvertHibernateAccessException(HibernateException ex)
 {
     return(hibernateTemplate.ConvertHibernateAccessException(ex));
 }