HibernateHelper.delete(this);
Set       deletes = new LinkedHashSet(); deletes.add(this);   Iterator  iterIs  = this.toMember().getImmediateGroups().iterator(); while (iterIs.hasNext()) { Group g = (Group) iterIs.next(); deletes.addAll( this._membershipsToDelete( g, this.toSubject(), Group.getDefaultList() ) ); }  Iterator  iterHas = this.getImmediateMembers().iterator(); while (iterHas.hasNext()) { Member m = (Member) iterHas.next(); deletes.addAll( this._membershipsToDelete( this, m.getSubject(), Group.getDefaultList() ) ); }   HibernateHelper.delete(deletes);
  public void delete()     throws GroupDeleteException, InsufficientPrivilegeException  {    try {      HibernateHelper.delete(this);    }    catch (HibernateException e) {      throw new GroupDeleteException(        "Unable to delete group: " + e.getMessage()      );    }  }