/**
  * @param string                                           $class
  * @param \Sonata\AdminBundle\Datagrid\ProxyQueryInterface $queryProxy
  */
 public function batchDelete($class, ProxyQueryInterface $queryProxy)
 {
     if (count($queryProxy->getQuery()->getMap()) == 0) {
         $queryProxy->deleteAll();
     } else {
         $queryProxy->delete();
     }
 }