Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RecordNotFoundException thrown by getHibernateTemplate().delete(person)

 
Mat Anthony
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Sorry about asking this question.

Does getHibernateTemplate().delete(person) throw some type of RecordNotFoundException.

I have java program that is required to do one of the following:-
a) If some how the person record has been deleted from the db before the above call
then we need to be able to detect some type of RecordNotFoundException thrown by calling getHibernateTemplate().delete(person)
b) If the person record has not been deleted from the db, but calling getHibernateTemplate().delete(person) has a problem
deleting the record, then RuntimeException is thrown.

I'm not sure to how to detect a RecordNotFoundException if I call getHibernateTemplate().delete(person)

Mat
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic