]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8377 Remove issue filters dao
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 9 Nov 2016 18:16:12 +0000 (19:16 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 10 Nov 2016 08:57:51 +0000 (09:57 +0100)
30 files changed:
server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
sonar-db/src/main/java/org/sonar/db/DaoModule.java
sonar-db/src/main/java/org/sonar/db/DbClient.java
sonar-db/src/main/java/org/sonar/db/MyBatis.java
sonar-db/src/main/java/org/sonar/db/issue/IssueFilterDao.java [deleted file]
sonar-db/src/main/java/org/sonar/db/issue/IssueFilterDto.java [deleted file]
sonar-db/src/main/java/org/sonar/db/issue/IssueFilterFavouriteDao.java [deleted file]
sonar-db/src/main/java/org/sonar/db/issue/IssueFilterFavouriteDto.java [deleted file]
sonar-db/src/main/java/org/sonar/db/issue/IssueFilterFavouriteMapper.java [deleted file]
sonar-db/src/main/java/org/sonar/db/issue/IssueFilterMapper.java [deleted file]
sonar-db/src/main/java/org/sonar/db/user/UserDao.java
sonar-db/src/main/java/org/sonar/db/user/UserMapper.java
sonar-db/src/main/resources/org/sonar/db/issue/IssueFilterFavouriteMapper.xml [deleted file]
sonar-db/src/main/resources/org/sonar/db/issue/IssueFilterMapper.xml [deleted file]
sonar-db/src/main/resources/org/sonar/db/user/UserMapper.xml
sonar-db/src/test/java/org/sonar/db/DaoModuleTest.java
sonar-db/src/test/java/org/sonar/db/issue/IssueFilterDaoTest.java [deleted file]
sonar-db/src/test/java/org/sonar/db/issue/IssueFilterFavouriteDaoTest.java [deleted file]
sonar-db/src/test/java/org/sonar/db/user/UserDaoTest.java
sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/shared.xml [deleted file]
sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_delete-result.xml [deleted file]
sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_insert-result.xml [deleted file]
sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_select_by_user.xml [deleted file]
sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_select_by_user_with_only_favorite_filters.xml [deleted file]
sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_select_provided_by_name.xml [deleted file]
sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_update-result.xml [deleted file]
sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterFavouriteDaoTest/shared.xml [deleted file]
sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterFavouriteDaoTest/should_delete-result.xml [deleted file]
sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterFavouriteDaoTest/should_delete_by_issue_filter_id-result.xml [deleted file]
sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterFavouriteDaoTest/should_insert-result.xml [deleted file]

index b9d1c12bfefc94441dac31b14553edaa3db17ee8..b9b59c7dc48235b94b1579a35507e7a88c25ae62 100644 (file)
@@ -108,7 +108,7 @@ public class ComputeEngineContainerImplTest {
         + 25 // level 1
         + 46 // content of DaoModule
         + 2 // content of EsSearchModule
-        + 64 // content of CorePropertyDefinitions
+        + 62 // content of CorePropertyDefinitions
         + 1 // content of CePropertyDefinitions
     );
     assertThat(picoContainer.getParent().getParent().getParent().getParent()).isNull();
index 822aab896171acf019534122ee2cc14bb5ff901f..76ac3cb5f181a92a06fd5d343b99de165be0cc25 100644 (file)
@@ -36,8 +36,6 @@ import org.sonar.db.duplication.DuplicationDao;
 import org.sonar.db.event.EventDao;
 import org.sonar.db.issue.IssueChangeDao;
 import org.sonar.db.issue.IssueDao;
-import org.sonar.db.issue.IssueFilterDao;
-import org.sonar.db.issue.IssueFilterFavouriteDao;
 import org.sonar.db.loadedtemplate.LoadedTemplateDao;
 import org.sonar.db.measure.MeasureDao;
 import org.sonar.db.measure.custom.CustomMeasureDao;
@@ -87,8 +85,6 @@ public class DaoModule extends Module {
     InternalPropertiesDao.class,
     IssueDao.class,
     IssueChangeDao.class,
-    IssueFilterDao.class,
-    IssueFilterFavouriteDao.class,
     LoadedTemplateDao.class,
     MeasureDao.class,
     MetricDao.class,
index 1c3b438ee2c03b02fbaf5105c555d74885a010b9..1db3feefa4880ecc7206b2dd116f24d21e196850 100644 (file)
@@ -36,8 +36,6 @@ import org.sonar.db.duplication.DuplicationDao;
 import org.sonar.db.event.EventDao;
 import org.sonar.db.issue.IssueChangeDao;
 import org.sonar.db.issue.IssueDao;
-import org.sonar.db.issue.IssueFilterDao;
-import org.sonar.db.issue.IssueFilterFavouriteDao;
 import org.sonar.db.loadedtemplate.LoadedTemplateDao;
 import org.sonar.db.measure.MeasureDao;
 import org.sonar.db.measure.custom.CustomMeasureDao;
@@ -93,8 +91,6 @@ public class DbClient {
   private final PermissionTemplateDao permissionTemplateDao;
   private final PermissionTemplateCharacteristicDao permissionTemplateCharacteristicDao;
   private final IssueDao issueDao;
-  private final IssueFilterDao issueFilterDao;
-  private final IssueFilterFavouriteDao issueFilterFavouriteDao;
   private final IssueChangeDao issueChangeDao;
   private final CeActivityDao ceActivityDao;
   private final CeQueueDao ceQueueDao;
@@ -148,8 +144,6 @@ public class DbClient {
     permissionTemplateDao = getDao(map, PermissionTemplateDao.class);
     permissionTemplateCharacteristicDao = getDao(map, PermissionTemplateCharacteristicDao.class);
     issueDao = getDao(map, IssueDao.class);
-    issueFilterDao = getDao(map, IssueFilterDao.class);
-    issueFilterFavouriteDao = getDao(map, IssueFilterFavouriteDao.class);
     issueChangeDao = getDao(map, IssueChangeDao.class);
     ceActivityDao = getDao(map, CeActivityDao.class);
     ceQueueDao = getDao(map, CeQueueDao.class);
@@ -200,14 +194,6 @@ public class DbClient {
     return issueDao;
   }
 
-  public IssueFilterDao issueFilterDao() {
-    return issueFilterDao;
-  }
-
-  public IssueFilterFavouriteDao issueFilterFavouriteDao() {
-    return issueFilterFavouriteDao;
-  }
-
   public IssueChangeDao issueChangeDao() {
     return issueChangeDao;
   }
index 349ee78df1087396b741dffae82903f632ed16e5..cc9b6a98df9dbe1e73acbbe73dc78208a534b51b 100644 (file)
@@ -56,10 +56,6 @@ import org.sonar.db.event.EventMapper;
 import org.sonar.db.issue.IssueChangeDto;
 import org.sonar.db.issue.IssueChangeMapper;
 import org.sonar.db.issue.IssueDto;
-import org.sonar.db.issue.IssueFilterDto;
-import org.sonar.db.issue.IssueFilterFavouriteDto;
-import org.sonar.db.issue.IssueFilterFavouriteMapper;
-import org.sonar.db.issue.IssueFilterMapper;
 import org.sonar.db.issue.IssueMapper;
 import org.sonar.db.loadedtemplate.LoadedTemplateDto;
 import org.sonar.db.loadedtemplate.LoadedTemplateMapper;
@@ -170,8 +166,6 @@ public class MyBatis {
     confBuilder.loadAlias("IdUuidPair", IdUuidPair.class);
     confBuilder.loadAlias("InternalProperty", InternalPropertyDto.class);
     confBuilder.loadAlias("IssueChange", IssueChangeDto.class);
-    confBuilder.loadAlias("IssueFilterFavourite", IssueFilterFavouriteDto.class);
-    confBuilder.loadAlias("IssueFilter", IssueFilterDto.class);
     confBuilder.loadAlias("Issue", IssueDto.class);
     confBuilder.loadAlias("LoadedTemplate", LoadedTemplateDto.class);
     confBuilder.loadAlias("Measure", MeasureDto.class);
@@ -227,8 +221,6 @@ public class MyBatis {
       InternalPropertiesMapper.class,
       IsAliveMapper.class,
       IssueChangeMapper.class,
-      IssueFilterFavouriteMapper.class,
-      IssueFilterMapper.class,
       IssueMapper.class,
       LoadedTemplateMapper.class,
       MeasureMapper.class,
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/IssueFilterDao.java b/sonar-db/src/main/java/org/sonar/db/issue/IssueFilterDao.java
deleted file mode 100644 (file)
index bff0a55..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.db.issue;
-
-import java.util.List;
-import javax.annotation.CheckForNull;
-import org.apache.ibatis.session.SqlSession;
-import org.sonar.db.Dao;
-import org.sonar.db.DbSession;
-import org.sonar.db.MyBatis;
-
-public class IssueFilterDao implements Dao {
-
-  private final MyBatis mybatis;
-
-  public IssueFilterDao(MyBatis mybatis) {
-    this.mybatis = mybatis;
-  }
-
-  @CheckForNull
-  public IssueFilterDto selectById(DbSession session, long id) {
-    return mapper(session).selectById(id);
-  }
-
-  @CheckForNull
-  public IssueFilterDto selectById(long id) {
-    DbSession session = mybatis.openSession(false);
-    try {
-      return selectById(session, id);
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
-  /**
-   * @deprecated since 5.2 use {@link #selectByUser(DbSession, String)}
-   */
-  @Deprecated
-  public List<IssueFilterDto> selectByUser(String user) {
-    DbSession session = mybatis.openSession(false);
-    try {
-      return selectByUser(session, user);
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
-  public List<IssueFilterDto> selectByUser(DbSession session, String user) {
-    return mapper(session).selectByUser(user);
-  }
-
-  public List<IssueFilterDto> selectFavoriteFiltersByUser(String user) {
-    SqlSession session = mybatis.openSession(false);
-    try {
-      return mapper(session).selectFavoriteFiltersByUser(user);
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
-  public IssueFilterDto selectProvidedFilterByName(String name) {
-    SqlSession session = mybatis.openSession(false);
-    try {
-      return mapper(session).selectProvidedFilterByName(name);
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
-  /**
-   * @deprecated since 5.2 use {@link #selectSharedFilters(DbSession)}
-   */
-  @Deprecated
-  public List<IssueFilterDto> selectSharedFilters() {
-    DbSession session = mybatis.openSession(false);
-    try {
-      return selectSharedFilters(session);
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
-  public List<IssueFilterDto> selectSharedFilters(DbSession session) {
-    return mapper(session).selectSharedFilters();
-  }
-
-  /**
-   * @deprecated since 5.2 use {@link #insert(DbSession, IssueFilterDto)}
-   */
-  @Deprecated
-  public void insert(IssueFilterDto filter) {
-    DbSession session = mybatis.openSession(false);
-    try {
-      insert(session, filter);
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
-  public IssueFilterDto insert(DbSession session, IssueFilterDto filter) {
-    mapper(session).insert(filter);
-    session.commit();
-
-    return filter;
-  }
-
-  public void update(IssueFilterDto filter) {
-    DbSession session = mybatis.openSession(false);
-    try {
-      mapper(session).update(filter);
-      session.commit();
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
-  public void delete(long id) {
-    DbSession session = mybatis.openSession(false);
-    try {
-      mapper(session).delete(id);
-      session.commit();
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
-  private static IssueFilterMapper mapper(SqlSession session) {
-    return session.getMapper(IssueFilterMapper.class);
-  }
-}
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/IssueFilterDto.java b/sonar-db/src/main/java/org/sonar/db/issue/IssueFilterDto.java
deleted file mode 100644 (file)
index 15e6378..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.db.issue;
-
-import java.util.Date;
-import javax.annotation.Nullable;
-
-/**
- * @since 3.7
- */
-public class IssueFilterDto {
-
-  private Long id;
-  private String name;
-  private String userLogin;
-  private boolean shared;
-  private String description;
-  private String data;
-  private Date createdAt;
-  private Date updatedAt;
-
-  public IssueFilterDto() {
-    Date now = new Date();
-    createdAt = updatedAt = now;
-    shared = false;
-  }
-
-  public Long getId() {
-    return id;
-  }
-
-  public IssueFilterDto setId(Long id) {
-    this.id = id;
-    return this;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public IssueFilterDto setName(String name) {
-    this.name = name;
-    return this;
-  }
-
-  public String getUserLogin() {
-    return userLogin;
-  }
-
-  public IssueFilterDto setUserLogin(String userLogin) {
-    this.userLogin = userLogin;
-    return this;
-  }
-
-  public boolean isShared() {
-    return shared;
-  }
-
-  public IssueFilterDto setShared(boolean shared) {
-    this.shared = shared;
-    return this;
-  }
-
-  public String getDescription() {
-    return description;
-  }
-
-  public IssueFilterDto setDescription(@Nullable String description) {
-    this.description = description;
-    return this;
-  }
-
-  public String getData() {
-    return data;
-  }
-
-  public IssueFilterDto setData(String data) {
-    this.data = data;
-    return this;
-  }
-
-  public Date getCreatedAt() {
-    return createdAt;
-  }
-
-  public IssueFilterDto setCreatedAt(Date createdAt) {
-    this.createdAt = createdAt;
-    return this;
-  }
-
-  public Date getUpdatedAt() {
-    return updatedAt;
-  }
-
-  public IssueFilterDto setUpdatedAt(Date updatedAt) {
-    this.updatedAt = updatedAt;
-    return this;
-  }
-}
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/IssueFilterFavouriteDao.java b/sonar-db/src/main/java/org/sonar/db/issue/IssueFilterFavouriteDao.java
deleted file mode 100644 (file)
index f1b7085..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.db.issue;
-
-import java.util.List;
-import org.apache.ibatis.session.SqlSession;
-import org.sonar.db.Dao;
-import org.sonar.db.DbSession;
-import org.sonar.db.MyBatis;
-
-public class IssueFilterFavouriteDao implements Dao {
-
-  private final MyBatis mybatis;
-
-  public IssueFilterFavouriteDao(MyBatis mybatis) {
-    this.mybatis = mybatis;
-  }
-
-  public IssueFilterFavouriteDto selectById(DbSession session, long id) {
-    return mapper(session).selectById(id);
-  }
-
-  public IssueFilterFavouriteDto selectById(long id) {
-    DbSession session = mybatis.openSession(false);
-    try {
-      return selectById(session, id);
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
-  public List<IssueFilterFavouriteDto> selectByFilterId(long filterId) {
-    SqlSession session = mybatis.openSession(false);
-    try {
-      return mapper(session).selectByFilterId(filterId);
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
-  /**
-   * @deprecated since 5.2 use {@link #insert(DbSession, IssueFilterFavouriteDto)}
-   */
-  @Deprecated
-  public void insert(IssueFilterFavouriteDto filter) {
-    DbSession session = mybatis.openSession(false);
-    try {
-      insert(session, filter);
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
-  public void insert(DbSession session, IssueFilterFavouriteDto filter) {
-    mapper(session).insert(filter);
-    session.commit();
-  }
-
-  public void delete(long id) {
-    SqlSession session = mybatis.openSession(false);
-    try {
-      mapper(session).delete(id);
-      session.commit();
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
-  public void deleteByFilterId(long filterId) {
-    SqlSession session = mybatis.openSession(false);
-    try {
-      mapper(session).deleteByFilterId(filterId);
-      session.commit();
-    } finally {
-      MyBatis.closeQuietly(session);
-    }
-  }
-
-  private static IssueFilterFavouriteMapper mapper(SqlSession session) {
-    return session.getMapper(IssueFilterFavouriteMapper.class);
-  }
-
-  public List<IssueFilterFavouriteDto> selectByUser(DbSession dbSession, String login) {
-    return mapper(dbSession).selectByUser(login);
-  }
-}
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/IssueFilterFavouriteDto.java b/sonar-db/src/main/java/org/sonar/db/issue/IssueFilterFavouriteDto.java
deleted file mode 100644 (file)
index 4800393..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.db.issue;
-
-import java.util.Date;
-
-/**
- * @since 3.7
- */
-public class IssueFilterFavouriteDto {
-
-  private Long id;
-  private String userLogin;
-  private Long issueFilterId;
-  private Date createdAt;
-
-  public Long getId() {
-    return id;
-  }
-
-  public IssueFilterFavouriteDto setId(Long id) {
-    this.id = id;
-    return this;
-  }
-
-  public String getUserLogin() {
-    return userLogin;
-  }
-
-  public IssueFilterFavouriteDto setUserLogin(String userLogin) {
-    this.userLogin = userLogin;
-    return this;
-  }
-
-  public Long getIssueFilterId() {
-    return issueFilterId;
-  }
-
-  public IssueFilterFavouriteDto setIssueFilterId(Long issueFilterId) {
-    this.issueFilterId = issueFilterId;
-    return this;
-  }
-
-  public Date getCreatedAt() {
-    return createdAt;
-  }
-
-  public IssueFilterFavouriteDto setCreatedAt(Date createdAt) {
-    this.createdAt = createdAt;
-    return this;
-  }
-
-}
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/IssueFilterFavouriteMapper.java b/sonar-db/src/main/java/org/sonar/db/issue/IssueFilterFavouriteMapper.java
deleted file mode 100644 (file)
index 8781184..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.db.issue;
-
-import java.util.List;
-import javax.annotation.CheckForNull;
-import org.apache.ibatis.annotations.Param;
-
-/**
- * @since 3.7
- */
-public interface IssueFilterFavouriteMapper {
-
-  @CheckForNull
-  IssueFilterFavouriteDto selectById(long id);
-
-  List<IssueFilterFavouriteDto> selectByFilterId(@Param("filterId") long filterId);
-
-  List<IssueFilterFavouriteDto> selectByUser(String login);
-
-  void insert(IssueFilterFavouriteDto filterFavourite);
-
-  void delete(long id);
-
-  void deleteByFilterId(long filterId);
-}
diff --git a/sonar-db/src/main/java/org/sonar/db/issue/IssueFilterMapper.java b/sonar-db/src/main/java/org/sonar/db/issue/IssueFilterMapper.java
deleted file mode 100644 (file)
index 7f72abd..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.db.issue;
-
-import java.util.List;
-import javax.annotation.CheckForNull;
-
-/**
- * @since 3.7
- */
-public interface IssueFilterMapper {
-
-  @CheckForNull
-  IssueFilterDto selectById(long id);
-
-  List<IssueFilterDto> selectByUser(String user);
-
-  List<IssueFilterDto> selectFavoriteFiltersByUser(String user);
-
-  List<IssueFilterDto> selectSharedFilters();
-
-  IssueFilterDto selectProvidedFilterByName(String name);
-
-  void insert(IssueFilterDto filter);
-
-  void update(IssueFilterDto filter);
-
-  void delete(long id);
-
-}
index 8f92c394f2acc36dd90bf60a4dcd11ce0fd15710..525ffd73385939ed4f862ce45f209c73f248ede2 100644 (file)
@@ -157,8 +157,6 @@ public class UserDao implements Dao {
     }
 
     mapper.removeUserFromGroups(dto.getId());
-    mapper.deleteUnsharedUserIssueFilters(dto.getLogin());
-    mapper.deleteUserIssueFilterFavourites(dto.getLogin());
     mapper.deleteUserProperties(dto.getId());
     mapper.deleteUserRoles(dto.getId());
     mapper.deletePropertiesMatchingLogin(asList(DEFAULT_ISSUE_ASSIGNEE), dto.getLogin());
index a060c21e66bf7cb9bd5c1beb403b639903ded3d3..b4339ee3e59436a34f3db85cc9bb28c4e988880c 100644 (file)
@@ -66,10 +66,6 @@ public interface UserMapper {
 
   void removeUserFromGroups(long userId);
 
-  void deleteUnsharedUserIssueFilters(String login);
-
-  void deleteUserIssueFilterFavourites(String login);
-
   void deleteUserProperties(long userId);
 
   void deleteUserRoles(long userId);
diff --git a/sonar-db/src/main/resources/org/sonar/db/issue/IssueFilterFavouriteMapper.xml b/sonar-db/src/main/resources/org/sonar/db/issue/IssueFilterFavouriteMapper.xml
deleted file mode 100644 (file)
index cdcf51e..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="org.sonar.db.issue.IssueFilterFavouriteMapper">
-
-  <sql id="issueFilterFavouriteColumns">
-    filter_favourites.id as id,
-    filter_favourites.user_login as userLogin,
-    filter_favourites.issue_filter_id as issueFilterId,
-    filter_favourites.created_at as createdAt
-  </sql>
-
-  <select id="selectById" parameterType="long" resultType="issueFilterFavourite">
-    select
-    <include refid="issueFilterFavouriteColumns"/>
-    from issue_filter_favourites filter_favourites
-    where filter_favourites.id=#{id}
-  </select>
-
-  <select id="selectByFilterId" parameterType="long" resultType="issueFilterFavourite">
-    select
-    <include refid="issueFilterFavouriteColumns"/>
-    from issue_filter_favourites filter_favourites
-    where filter_favourites.issue_filter_id=#{filterId}
-  </select>
-
-  <select id="selectByUser" parameterType="string" resultType="issueFilterFavourite">
-    select
-    <include refid="issueFilterFavouriteColumns"/>
-    from issue_filter_favourites filter_favourites
-    where filter_favourites.user_login=#{login}
-  </select>
-
-  <insert id="insert" parameterType="issueFilterFavourite" keyColumn="id" useGeneratedKeys="true" keyProperty="id">
-    INSERT INTO issue_filter_favourites (user_login, issue_filter_id, created_at)
-    VALUES (#{userLogin}, #{issueFilterId}, current_timestamp)
-  </insert>
-
-  <delete id="delete" parameterType="long">
-    delete from issue_filter_favourites where id=#{id}
-  </delete>
-
-  <delete id="deleteByFilterId" parameterType="long">
-    delete from issue_filter_favourites where issue_filter_id=#{issueFilterId}
-  </delete>
-
-</mapper>
diff --git a/sonar-db/src/main/resources/org/sonar/db/issue/IssueFilterMapper.xml b/sonar-db/src/main/resources/org/sonar/db/issue/IssueFilterMapper.xml
deleted file mode 100644 (file)
index aca8dff..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="org.sonar.db.issue.IssueFilterMapper">
-
-  <sql id="issueFilterColumns">
-    filters.id as id,
-    filters.name as name,
-    filters.user_login as userLogin,
-    filters.shared as shared,
-    filters.description as description,
-    filters.data as data,
-    filters.created_at as createdAt,
-    filters.updated_at as updatedAt
-  </sql>
-
-  <select id="selectById" parameterType="long" resultType="IssueFilter">
-    select
-    <include refid="issueFilterColumns"/>
-    from issue_filters filters
-    where filters.id=#{id}
-  </select>
-
-  <select id="selectByUser" parameterType="String" resultType="IssueFilter">
-    select
-    <include refid="issueFilterColumns"/>
-    from issue_filters filters
-    where filters.user_login=#{user}
-  </select>
-
-  <select id="selectFavoriteFiltersByUser" parameterType="String" resultType="IssueFilter">
-    select
-    <include refid="issueFilterColumns"/>
-    from issue_filters filters
-    inner join issue_filter_favourites fav on fav.issue_filter_id = filters.id
-    where fav.user_login=#{user}
-  </select>
-
-  <select id="selectSharedFilters" parameterType="String" resultType="IssueFilter">
-    select
-    <include refid="issueFilterColumns"/>
-    from issue_filters filters
-    where filters.shared=${_true}
-  </select>
-
-  <select id="selectProvidedFilterByName" parameterType="String" resultType="IssueFilter">
-    select
-    <include refid="issueFilterColumns"/>
-    from issue_filters filters
-    where filters.user_login is null
-    and filters.shared=${_true}
-    and filters.name=#{name}
-  </select>
-
-  <insert id="insert" parameterType="IssueFilter" keyColumn="id" useGeneratedKeys="true" keyProperty="id">
-    INSERT INTO issue_filters (name, user_login, shared, description, data, created_at, updated_at)
-    VALUES (#{name}, #{userLogin}, #{shared}, #{description}, #{data}, #{createdAt}, #{updatedAt})
-  </insert>
-
-  <update id="update" parameterType="IssueFilter">
-    update issue_filters set
-    name=#{name},
-    shared=#{shared},
-    description=#{description},
-    data=#{data},
-    user_login=#{userLogin},
-    updated_at=current_timestamp
-    where id=#{id}
-  </update>
-
-  <delete id="delete" parameterType="long">
-    delete from issue_filters where id=#{id}
-  </delete>
-
-</mapper>
index 4a940a2ebe06de563303d68ac7bf6d0614652b0f..cb65570170f4d2961352e188c1bfc232a33c57c7 100644 (file)
     DELETE FROM properties WHERE user_id=#{id}
   </delete>
 
-  <delete id="deleteUnsharedUserIssueFilters" parameterType="String">
-    DELETE FROM issue_filters WHERE user_login=#{id} and shared &lt;&gt; ${_true}
-  </delete>
-
-  <delete id="deleteUserIssueFilterFavourites" parameterType="String">
-    DELETE FROM issue_filter_favourites WHERE user_login=#{id}
-  </delete>
-
   <delete id="deletePropertiesMatchingLogin" parameterType="String">
     DELETE FROM properties
     <where>
index c76d29e2dc1201981cb57e7004524031041f7976..5ccd64f9158dad21eb58d018b700b40a7dfb21cd 100644 (file)
@@ -29,6 +29,6 @@ public class DaoModuleTest {
   public void verify_count_of_added_components() {
     ComponentContainer container = new ComponentContainer();
     new DaoModule().configure(container);
-    assertThat(container.size()).isEqualTo(2 + 46);
+    assertThat(container.size()).isEqualTo(2 + 44);
   }
 }
diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueFilterDaoTest.java b/sonar-db/src/test/java/org/sonar/db/issue/IssueFilterDaoTest.java
deleted file mode 100644 (file)
index e4d9af8..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.db.issue;
-
-import java.util.List;
-import org.junit.Rule;
-import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-
-public class IssueFilterDaoTest {
-
-  @Rule
-  public DbTester dbTester = DbTester.create(System2.INSTANCE);
-
-  IssueFilterDao dao = dbTester.getDbClient().issueFilterDao();
-
-  @Test
-  public void should_select_by_id() {
-    dbTester.prepareDbUnit(getClass(), "shared.xml");
-
-    IssueFilterDto filter = dao.selectById(1L);
-
-    assertThat(filter.getId()).isEqualTo(1L);
-    assertThat(filter.getName()).isEqualTo("Sonar Issues");
-    assertThat(filter.isShared()).isTrue();
-
-    assertThat(dao.selectById(123L)).isNull();
-  }
-
-  @Test
-  public void should_select_by_user() {
-    dbTester.prepareDbUnit(getClass(), "should_select_by_user.xml");
-
-    List<IssueFilterDto> results = dao.selectByUser("michael");
-
-    assertThat(results).hasSize(2);
-  }
-
-  @Test
-  public void should_select_by_user_with_only_favorite_filters() {
-    dbTester.prepareDbUnit(getClass(), "should_select_by_user_with_only_favorite_filters.xml");
-
-    List<IssueFilterDto> results = dao.selectFavoriteFiltersByUser("michael");
-
-    assertThat(results).hasSize(1);
-    IssueFilterDto issueFilterDto = results.get(0);
-    assertThat(issueFilterDto.getId()).isEqualTo(2L);
-  }
-
-  @Test
-  public void should_select_shared() {
-    dbTester.prepareDbUnit(getClass(), "shared.xml");
-
-    assertThat(dao.selectSharedFilters()).hasSize(1);
-  }
-
-  @Test
-  public void should_select_provided_by_name() {
-    dbTester.prepareDbUnit(getClass(), "should_select_provided_by_name.xml");
-
-    assertThat(dao.selectProvidedFilterByName("Unresolved Issues").getName()).isEqualTo("Unresolved Issues");
-    assertThat(dao.selectProvidedFilterByName("My Unresolved Issues").getName()).isEqualTo("My Unresolved Issues");
-    assertThat(dao.selectProvidedFilterByName("Unknown Filter")).isNull();
-  }
-
-  @Test
-  public void should_insert() {
-    dbTester.prepareDbUnit(getClass(), "shared.xml");
-
-    IssueFilterDto filterDto = new IssueFilterDto();
-    filterDto.setName("Sonar Open issues");
-    filterDto.setUserLogin("michael");
-    filterDto.setShared(true);
-    filterDto.setDescription("All open issues on Sonar");
-    filterDto.setData("statuses=OPEN|componentRoots=org.codehaus.sonar");
-
-    dao.insert(filterDto);
-
-    dbTester.assertDbUnit(getClass(), "should_insert-result.xml", new String[]{"created_at", "updated_at"}, "issue_filters");
-  }
-
-  @Test
-  public void should_update() {
-    dbTester.prepareDbUnit(getClass(), "shared.xml");
-
-    IssueFilterDto filterDto = new IssueFilterDto();
-    filterDto.setId(2L);
-    filterDto.setName("Closed issues");
-    filterDto.setShared(false);
-    filterDto.setDescription("All closed issues");
-    filterDto.setData("statuses=CLOSED");
-    filterDto.setUserLogin("bernard");
-
-    dao.update(filterDto);
-
-    dbTester.assertDbUnit(getClass(), "should_update-result.xml", new String[]{"created_at", "updated_at"}, "issue_filters");
-  }
-
-  @Test
-  public void should_delete() {
-    dbTester.prepareDbUnit(getClass(), "shared.xml");
-
-    dao.delete(1l);
-
-    dbTester.assertDbUnit(getClass(), "should_delete-result.xml", new String[] {"created_at", "updated_at"}, "issue_filters");
-  }
-}
diff --git a/sonar-db/src/test/java/org/sonar/db/issue/IssueFilterFavouriteDaoTest.java b/sonar-db/src/test/java/org/sonar/db/issue/IssueFilterFavouriteDaoTest.java
deleted file mode 100644 (file)
index 1450adb..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.db.issue;
-
-import java.util.List;
-import org.junit.Rule;
-import org.junit.Test;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-
-public class IssueFilterFavouriteDaoTest {
-
-  @Rule
-  public DbTester dbTester = DbTester.create(System2.INSTANCE);
-
-  IssueFilterFavouriteDao dao = dbTester.getDbClient().issueFilterFavouriteDao();
-
-  @Test
-  public void should_select_by_id() {
-    dbTester.prepareDbUnit(getClass(), "shared.xml");
-
-    IssueFilterFavouriteDto dto = dao.selectById(1L);
-    assertThat(dto.getId()).isEqualTo(1L);
-    assertThat(dto.getUserLogin()).isEqualTo("stephane");
-    assertThat(dto.getIssueFilterId()).isEqualTo(10L);
-    assertThat(dto.getCreatedAt()).isNotNull();
-
-    assertThat(dao.selectById(999L)).isNull();
-  }
-
-  @Test
-  public void should_select_by_filter_id() {
-    dbTester.prepareDbUnit(getClass(), "shared.xml");
-
-    List<IssueFilterFavouriteDto> dtos = dao.selectByFilterId(11L);
-    assertThat(dtos).hasSize(1);
-    IssueFilterFavouriteDto dto = dtos.get(0);
-    assertThat(dto.getId()).isEqualTo(2L);
-    assertThat(dto.getUserLogin()).isEqualTo("stephane");
-    assertThat(dto.getIssueFilterId()).isEqualTo(11L);
-    assertThat(dto.getCreatedAt()).isNotNull();
-
-    assertThat(dao.selectByFilterId(10L)).hasSize(2);
-    assertThat(dao.selectByFilterId(999L)).isEmpty();
-  }
-
-  @Test
-  public void should_insert() {
-    dbTester.prepareDbUnit(getClass(), "shared.xml");
-
-    IssueFilterFavouriteDto dto = new IssueFilterFavouriteDto();
-    dto.setUserLogin("arthur");
-    dto.setIssueFilterId(11L);
-
-    dao.insert(dto);
-
-    dbTester.assertDbUnit(getClass(), "should_insert-result.xml", new String[]{"created_at"}, "issue_filter_favourites");
-  }
-
-  @Test
-  public void should_delete() {
-    dbTester.prepareDbUnit(getClass(), "shared.xml");
-
-    dao.delete(3l);
-
-    dbTester.assertDbUnit(getClass(), "should_delete-result.xml", new String[]{"created_at"}, "issue_filter_favourites");
-  }
-
-  @Test
-  public void should_delete_by_issue_filter_id() {
-    dbTester.prepareDbUnit(getClass(), "shared.xml");
-
-    dao.deleteByFilterId(10l);
-
-    dbTester.assertDbUnit(getClass(), "should_delete_by_issue_filter_id-result.xml", new String[]{"created_at"}, "issue_filter_favourites");
-  }
-
-}
index 0d94157377deb57f1ba11767531c708e4732a48a..de30995ee5d9727a8fa73cdd6fade24e448e9965 100644 (file)
@@ -33,8 +33,6 @@ import org.sonar.db.DbClient;
 import org.sonar.db.DbSession;
 import org.sonar.db.DbTester;
 import org.sonar.db.RowNotFoundException;
-import org.sonar.db.issue.IssueFilterDto;
-import org.sonar.db.issue.IssueFilterFavouriteDto;
 import org.sonar.db.organization.OrganizationDto;
 import org.sonar.db.property.PropertyDto;
 import org.sonar.db.property.PropertyQuery;
@@ -395,8 +393,6 @@ public class UserDaoTest {
   @Test
   public void deactivate_user() throws Exception {
     UserDto user = newActiveUser();
-    IssueFilterDto issueFilter = insertIssueFilter(user, false);
-    IssueFilterFavouriteDto issueFilterFavourite = insertIssueFilterFavourite(issueFilter, user);
     PropertyDto property = insertProperty(user);
     db.users().insertPermissionOnUser(user, "perm");
     insertUserGroup(user);
@@ -421,29 +417,11 @@ public class UserDaoTest {
 
     assertThat(underTest.selectUserById(session, otherUser.getId())).isNotNull();
 
-    assertThat(dbClient.issueFilterDao().selectById(session, issueFilter.getId())).isNull();
-    assertThat(dbClient.issueFilterFavouriteDao().selectById(session, issueFilterFavourite.getId())).isNull();
     assertThat(dbClient.propertiesDao().selectByQuery(PropertyQuery.builder().setKey(property.getKey()).build(), session)).isEmpty();
     assertThat(dbClient.userPermissionDao().selectGlobalPermissionsOfUser(session, user.getId(), db.getDefaultOrganization().getUuid())).isEmpty();
     assertThat(dbClient.groupMembershipDao().countGroups(session, builder().login(user.getLogin()).membership(IN).build(), user.getId())).isZero();
   }
 
-  @Test
-  public void deactivate_user_does_not_remove_shared_issue_filter() throws Exception {
-    UserDto user = newActiveUser();
-    IssueFilterDto notSharedFilter = insertIssueFilter(user, false);
-    IssueFilterDto sharedFilter = insertIssueFilter(user, true);
-    session.commit();
-
-    boolean deactivated = underTest.deactivateUserByLogin(session, user.getLogin());
-    assertThat(deactivated).isTrue();
-
-    assertThat(dbClient.issueFilterDao().selectById(session, notSharedFilter.getId())).isNull();
-    IssueFilterDto sharedFilterReloaded = dbClient.issueFilterDao().selectById(session, sharedFilter.getId());
-    assertThat(sharedFilterReloaded).isNotNull();
-    assertThat(sharedFilterReloaded.getUserLogin()).isEqualTo(user.getLogin());
-  }
-
   @Test
   public void deactivate_user_also_remove_default_assignee_login_properties() throws Exception {
     UserDto user = newActiveUser();
@@ -743,18 +721,6 @@ public class UserDaoTest {
     return dto;
   }
 
-  private IssueFilterDto insertIssueFilter(UserDto user, boolean shared) {
-    IssueFilterDto dto = new IssueFilterDto().setUserLogin(user.getLogin()).setName(randomAlphanumeric(100)).setShared(shared);
-    dbClient.issueFilterDao().insert(session, dto);
-    return dto;
-  }
-
-  private IssueFilterFavouriteDto insertIssueFilterFavourite(IssueFilterDto filter, UserDto user) {
-    IssueFilterFavouriteDto dto = new IssueFilterFavouriteDto().setUserLogin(user.getLogin()).setIssueFilterId(filter.getId());
-    dbClient.issueFilterFavouriteDao().insert(session, dto);
-    return dto;
-  }
-
   private PropertyDto insertProperty(UserDto user) {
     PropertyDto dto = new PropertyDto().setKey(randomAlphanumeric(100)).setUserId(user.getId());
     dbClient.propertiesDao().saveProperty(session, dto);
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/shared.xml b/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/shared.xml
deleted file mode 100644 (file)
index 68f9cdc..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<dataset>
-
-  <issue_filters
-    id="1"
-    name="Sonar Issues"
-    user_login="stephane"
-    shared="[true]"
-    description="All issues of Sonar"
-    data="componentRoots=org.codehaus.sonar"
-    created_at="2013-06-10"
-    updated_at="2013-06-10"/>
-
-  <issue_filters
-    id="2"
-    name="Open issues"
-    user_login="michael"
-    shared="[false]"
-    description="All open issues"
-    data="statuses=OPEN"
-    created_at="2013-06-10"
-    updated_at="2013-06-10"/>
-
-</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_delete-result.xml b/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_delete-result.xml
deleted file mode 100644 (file)
index 7933167..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<dataset>
-
-  <issue_filters
-    id="2"
-    name="Open issues"
-    user_login="michael"
-    shared="[false]"
-    description="All open issues"
-    data="statuses=OPEN"
-    created_at="2013-06-10"
-    updated_at="2013-06-10"/>
-
-</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_insert-result.xml b/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_insert-result.xml
deleted file mode 100644 (file)
index 869df62..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<dataset>
-
-  <issue_filters
-    id="1"
-    name="Sonar Issues"
-    user_login="stephane"
-    shared="[true]"
-    description="All issues of Sonar"
-    data="componentRoots=org.codehaus.sonar"
-    created_at="2013-06-10"
-    updated_at="2013-06-10"/>
-
-  <issue_filters
-    id="2"
-    name="Open issues"
-    user_login="michael"
-    shared="[false]"
-    description="All open issues"
-    data="statuses=OPEN"
-    created_at="2013-06-10"
-    updated_at="2013-06-10"/>
-
-
-  <issue_filters
-    id="3"
-    name="Sonar Open issues"
-    user_login="michael"
-    shared="[true]"
-    description="All open issues on Sonar"
-    data="statuses=OPEN|componentRoots=org.codehaus.sonar"
-    created_at="2013-06-10"
-    updated_at="2013-06-10"/>
-
-</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_select_by_user.xml b/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_select_by_user.xml
deleted file mode 100644 (file)
index 0f91cec..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<dataset>
-
-  <issue_filters
-    id="1"
-    name="Sonar Issues"
-    user_login="stephane"
-    shared="[true]"
-    description="All issues of Sonar"
-    data="componentRoots=org.codehaus.sonar"
-    created_at="2013-06-10"
-    updated_at="2013-06-10"/>
-
-  <issue_filters
-    id="2"
-    name="Open issues"
-    user_login="michael"
-    shared="[false]"
-    description="All open issues"
-    data="statuses=OPEN"
-    created_at="2013-06-10"
-    updated_at="2013-06-10"/>
-
-  <issue_filters
-    id="3"
-    name="Sonar Open issues"
-    user_login="michael"
-    shared="[true]"
-    description="All open issues on Sonar"
-    data="statuses=OPEN|componentRoots=org.codehaus.sonar"
-    created_at="2013-06-10"
-    updated_at="2013-06-10"/>
-
-</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_select_by_user_with_only_favorite_filters.xml b/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_select_by_user_with_only_favorite_filters.xml
deleted file mode 100644 (file)
index 47d5583..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<dataset>
-
-  <issue_filters
-    id="1"
-    name="Sonar Issues"
-    user_login="stephane"
-    shared="[true]"
-    description="All issues of Sonar"
-    data="componentRoots=org.codehaus.sonar"
-    created_at="2013-06-10"
-    updated_at="2013-06-10"/>
-
-  <issue_filters
-    id="2"
-    name="Open issues"
-    user_login="michael"
-    shared="[false]"
-    description="All open issues"
-    data="statuses=OPEN"
-    created_at="2013-06-10"
-    updated_at="2013-06-10"/>
-
-  <issue_filters
-    id="3"
-    name="Sonar Open issues"
-    user_login="michael"
-    shared="[true]"
-    description="All open issues on Sonar"
-    data="statuses=OPEN|componentRoots=org.codehaus.sonar"
-    created_at="2013-06-10"
-    updated_at="2013-06-10"/>
-
-  <issue_filter_favourites
-    id="10"
-    user_login="michael"
-    issue_filter_id="2"
-    created_at="2013-06-10"/>
-
-</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_select_provided_by_name.xml b/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_select_provided_by_name.xml
deleted file mode 100644 (file)
index 81bf84a..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<dataset>
-
-  <!-- This one must be found -->
-  <issue_filters
-    id="1"
-    name="Unresolved Issues"
-    user_login="[null]"
-    shared="[true]"
-    description="[null]"
-    data="resolved=false"
-    created_at="2011-04-25 01:15:00"
-    updated_at="2011-04-25 01:15:00"/>
-
-  <!-- This one must NOT be found: belongs to admin -->
-  <issue_filters
-    id="2"
-    name="Unresolved Issues"
-    user_login="admin"
-    shared="[true]"
-    description="[null]"
-    data="resolved=false"
-    created_at="2011-04-25 01:15:00"
-    updated_at="2011-04-25 01:15:00"/>
-
-  <!-- This one must NOT be found: not shared -->
-  <issue_filters
-    id="3"
-    name="Unresolved Issues"
-    user_login="[null]"
-    shared="[false]"
-    description="[null]"
-    data="resolved=false"
-    created_at="2011-04-25 01:15:00"
-    updated_at="2011-04-25 01:15:00"/>
-
-  <!-- This one must be found -->
-  <issue_filters
-    id="4"
-    name="My Unresolved Issues"
-    user_login="[null]"
-    shared="[true]"
-    description="[null]"
-    data="resolved=false|assignees=__me__"
-    created_at="2011-04-25 01:15:00"
-    updated_at="2011-04-25 01:15:00"/>
-
-  <!-- This one must NOT be found: not shared -->
-  <issue_filters
-    id="5"
-    name="Unknown Filter"
-    user_login="[null]"
-    shared="[false]"
-    description="[null]"
-    data="resolved=false"
-    created_at="2011-04-25 01:15:00"
-    updated_at="2011-04-25 01:15:00"/>
-
-</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_update-result.xml b/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterDaoTest/should_update-result.xml
deleted file mode 100644 (file)
index 0916ece..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<dataset>
-
-  <issue_filters
-    id="1"
-    name="Sonar Issues"
-    user_login="stephane"
-    shared="[true]"
-    description="All issues of Sonar"
-    data="componentRoots=org.codehaus.sonar"
-    created_at="2013-06-10"
-    updated_at="2013-06-10"/>
-
-  <issue_filters
-    id="2"
-    name="Closed issues"
-    user_login="bernard"
-    shared="[false]"
-    description="All closed issues"
-    data="statuses=CLOSED"
-    created_at="2013-06-10"
-    updated_at="2013-06-11"/>
-
-</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterFavouriteDaoTest/shared.xml b/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterFavouriteDaoTest/shared.xml
deleted file mode 100644 (file)
index 07d23d9..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<dataset>
-
-  <issue_filter_favourites
-    id="1"
-    user_login="stephane"
-    issue_filter_id="10"
-    created_at="2013-06-10"/>
-
-  <issue_filter_favourites
-    id="2"
-    user_login="stephane"
-    issue_filter_id="11"
-    created_at="2013-06-10"/>
-
-  <issue_filter_favourites
-    id="3"
-    user_login="arthur"
-    issue_filter_id="10"
-    created_at="2013-06-10"/>
-
-</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterFavouriteDaoTest/should_delete-result.xml b/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterFavouriteDaoTest/should_delete-result.xml
deleted file mode 100644 (file)
index b3f03e6..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<dataset>
-
-  <issue_filter_favourites
-    id="1"
-    user_login="stephane"
-    issue_filter_id="10"
-    created_at="2013-06-10"/>
-
-  <issue_filter_favourites
-    id="2"
-    user_login="stephane"
-    issue_filter_id="11"
-    created_at="2013-06-10"/>
-
-</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterFavouriteDaoTest/should_delete_by_issue_filter_id-result.xml b/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterFavouriteDaoTest/should_delete_by_issue_filter_id-result.xml
deleted file mode 100644 (file)
index c2a7f43..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<dataset>
-
-  <issue_filter_favourites
-    id="2"
-    user_login="stephane"
-    issue_filter_id="11"
-    created_at="2013-06-10"/>
-
-</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterFavouriteDaoTest/should_insert-result.xml b/sonar-db/src/test/resources/org/sonar/db/issue/IssueFilterFavouriteDaoTest/should_insert-result.xml
deleted file mode 100644 (file)
index f9b8e27..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<dataset>
-
-  <issue_filter_favourites
-    id="1"
-    user_login="stephane"
-    issue_filter_id="10"
-    created_at="2013-06-10"/>
-
-  <issue_filter_favourites
-    id="2"
-    user_login="stephane"
-    issue_filter_id="11"
-    created_at="2013-06-10"/>
-
-  <issue_filter_favourites
-    id="3"
-    user_login="arthur"
-    issue_filter_id="10"
-    created_at="2013-06-10"/>
-
-  <issue_filter_favourites
-    id="4"
-    user_login="arthur"
-    issue_filter_id="11"
-    created_at="2013-06-18"/>
-
-</dataset>