title: Delete() and Deleteall() in Hibernate
body: <p>Consider the below two methods to delete a Set of Employees with the name "John" .</p>
  
  <pre><code>List&lt;Employee&gt; list = new ArrayList&lt;Employee&gt;();
  String query=   " from Employee emp where emp.name = 'John'";
  list=getHibernateTemplate().find(query);
  </code></pre>
  
  <p>First Method:</p>
  
  <pre><code> getHibernateTemplate().deleteAll(list);
  </code></pre>
  
  <p>Second Method:</p>
  
  <pre><code>Iterator&lt;BulkChangeRequest&gt; itList = list.iterator();
      while(itList.hasNext()) {
          Employee emp = itList.next();
          getHibernateTemplate().delete(emp);
      }
  </code></pre>
  
  <p>Do they differ significantly in terms of performance? Are both of them essentially the same i.e. does the deleteAll method delete row one by one?</p>
  
  <p>Also wouldn't it be better to do it in SQL using the following query?</p>
  
  <pre><code>" delete from Employee where name = 'John'"
  </code></pre>