title: How to get the number of rows inserted and deleted by Hibernate
body: <p>I'm writing a test driver that inserts a bunch of rows, runs some tests then deletes the rows that were inserted.  The rows in question form a tree of parent-child records.  For example the root of the tree is a document object that has a List attribute.  Each paragraph has a List attribute and so on for five levels of parent-child.</p>
  
  <p>I'm inserting with Hibernate.  I build the document tree then pass the root object, a document, to Hibernate and the root and all children are inserted.</p>
  
  <p>To remove the records I pass the root object to Hibernate.delete.</p>
  
  <p>Is it possible to have Hibernate return the number of records inserted and deleted?</p>