All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.db.purge.PurgeMapper Maven / Gradle / Ivy

The newest version!
/*
 * SonarQube
 * Copyright (C) 2009-2018 SonarSource SA
 * mailto:info 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.purge;

import java.util.List;
import javax.annotation.Nullable;
import org.apache.ibatis.annotations.Param;

public interface PurgeMapper {

  List selectAnalysisIdsAndUuids(PurgeSnapshotQuery query);

  /**
   * Returns the list of modules/subviews and the application/view/project for the specified project_uuid.
   */
  List selectRootAndModulesOrSubviewsByProjectUuid(@Param("rootUuid") String rootUuid);

  void deleteAnalyses(@Param("analysisUuids") List analysisUuids);

  void deleteAnalysisProperties(@Param("analysisUuids") List analysisUuids);

  void deleteAnalysisDuplications(@Param("analysisUuids") List analysisUuids);

  void deleteAnalysisEvents(@Param("analysisUuids") List analysisUuids);

  void deleteAnalysisMeasures(@Param("analysisUuids") List analysisUuids);

  void fullDeleteComponentMeasures(@Param("componentUuids") List componentUuids);

  void deleteComponentMeasures(@Param("analysisUuids") List analysisUuids, @Param("componentUuids") List componentUuids);

  List selectMetricIdsWithoutHistoricalData();

  void deleteAnalysisWastedMeasures(@Param("analysisUuids") List analysisUuids, @Param("metricIds") List metricIds);

  void updatePurgeStatusToOne(@Param("analysisUuids") List analysisUuid);

  void resolveComponentIssuesNotAlreadyResolved(@Param("componentUuids") List componentUuids, @Param("dateAsLong") Long dateAsLong);

  void deleteProjectLinksByProjectUuid(@Param("rootUuid") String rootUuid);

  void deletePropertiesByComponentIds(@Param("componentIds") List componentIds);

  void deleteComponentsByProjectUuid(@Param("rootUuid") String rootUuid);

  void deleteComponentsByUuids(@Param("componentUuids") List componentUuids);

  void deleteGroupRolesByComponentId(@Param("rootId") long rootId);

  void deleteUserRolesByComponentId(@Param("rootId") long rootId);

  void deleteManualMeasuresByComponentUuids(@Param("componentUuids") List componentUuids);

  void deleteEventsByComponentUuid(@Param("componentUuid") String componentUuid);

  List selectPurgeableAnalysesWithEvents(@Param("componentUuid") String componentUuid);

  List selectPurgeableAnalysesWithoutEvents(@Param("componentUuid") String componentUuid);

  void deleteIssueChangesByProjectUuid(@Param("projectUuid") String projectUuid);

  void deleteIssuesByProjectUuid(@Param("projectUuid") String projectUuid);

  List selectOldClosedIssueKeys(@Param("projectUuid") String projectUuid, @Nullable @Param("toDate") Long toDate);

  List selectStaleShortLivingBranchesAndPullRequests(@Param("mainBranchProjectUuid") String mainBranchProjectUuid, @Param("toDate") Long toDate);

  void deleteIssuesFromKeys(@Param("keys") List keys);

  void deleteIssueChangesFromIssueKeys(@Param("issueKeys") List issueKeys);

  void deleteFileSourcesByProjectUuid(String rootProjectUuid);

  void deleteFileSourcesByFileUuid(@Param("fileUuids") List fileUuids);

  void deleteCeTaskCharacteristicsOfCeActivityByProjectUuid(@Param("projectUuid") String projectUuid);

  void deleteCeTaskInputOfCeActivityByProjectUuid(@Param("projectUuid") String projectUuid);

  void deleteCeScannerContextOfCeActivityByProjectUuid(@Param("projectUuid") String projectUuid);

  void deleteCeActivityByProjectUuid(@Param("projectUuid") String projectUuid);

  void deleteCeScannerContextOfCeQueueByProjectUuid(@Param("projectUuid") String projectUuid);

  void deleteCeTaskCharacteristicsOfCeQueueByProjectUuid(@Param("projectUuid") String projectUuid);

  void deleteCeTaskInputOfCeQueueByProjectUuid(@Param("projectUuid") String projectUuid);

  void deleteCeQueueByProjectUuid(@Param("projectUuid") String projectUuid);

  void deleteWebhookDeliveriesByProjectUuid(@Param("projectUuid") String projectUuid);

  void deleteProjectMappingsByProjectUuid(@Param("projectUuid") String projectUuid);

  void deleteBranchByUuid(@Param("uuid") String uuid);

  void deleteLiveMeasuresByProjectUuid(@Param("projectUuid") String projectUuid);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy