• Post Reply Bookmark Topic Watch Topic
  • New Topic

RecordNotFoundException thrown by getHibernateTemplate().delete(person)  RSS feed

Mat Anthony
Ranch Hand
Posts: 263
  • 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)

Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!