/**
   * Removes the entry with status 'D' associated to this server
   *
   * @return the number of the removed entries
   * @throws com.funambol.pushlistener.service.registry.dao.DataAccessException if an error occurs
   */
  public int removeAllDeletedRegistryEntry() throws DataAccessException {

    Connection con = null;
    PreparedStatement ps = null;
    int rowsDeleted = 0;

    try {

      con = getConnection();

      ps = con.prepareStatement(queryDesc.getDeleteEntriesQuery());
      rowsDeleted = ps.executeUpdate();
      return rowsDeleted;

    } catch (Exception e) {

      throw new DataAccessException(e);

    } finally {
      DBTools.close(con, ps, null);
    }
  }