001    /*
002     * Sonar, open source software quality management tool.
003     * Copyright (C) 2008-2012 SonarSource
004     * mailto:contact AT sonarsource DOT com
005     *
006     * Sonar is free software; you can redistribute it and/or
007     * modify it under the terms of the GNU Lesser General Public
008     * License as published by the Free Software Foundation; either
009     * version 3 of the License, or (at your option) any later version.
010     *
011     * Sonar is distributed in the hope that it will be useful,
012     * but WITHOUT ANY WARRANTY; without even the implied warranty of
013     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014     * Lesser General Public License for more details.
015     *
016     * You should have received a copy of the GNU Lesser General Public
017     * License along with Sonar; if not, write to the Free Software
018     * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
019     */
020    package org.sonar.core.purge;
021    
022    import java.util.List;
023    
024    public interface PurgeMapper {
025    
026      List<Long> selectSnapshotIds(PurgeSnapshotQuery query);
027    
028      List<Long> selectProjectIdsByRootId(long rootResourceId);
029    
030      void deleteSnapshot(long snapshotId);
031    
032      void deleteSnapshotDependencies(long snapshotId);
033    
034      void deleteSnapshotDuplications(long snapshotId);
035    
036      void deleteSnapshotEvents(long snapshotId);
037    
038      void deleteSnapshotMeasures(long snapshotId);
039    
040      void deleteSnapshotMeasureData(long snapshotId);
041    
042      void deleteSnapshotSource(long snapshotId);
043    
044      void deleteSnapshotViolations(long snapshotId);
045    
046      void deleteSnapshotWastedMeasures(long snapshotId);
047    
048      void deleteSnapshotMeasuresOnQualityModelRequirements(long snapshotId);
049    
050      void updatePurgeStatusToOne(long snapshotId);
051    
052      void disableResource(long resourceId);
053    
054      void deleteResourceIndex(long resourceId);
055    
056      void deleteEvent(long eventId);
057    
058      void setSnapshotIsLastToFalse(long resourceId);
059    
060      void deleteResourceLinks(long resourceId);
061    
062      void deleteResourceProperties(long resourceId);
063    
064      void deleteResource(long resourceId);
065    
066      void deleteResourceGroupRoles(long resourceId);
067    
068      void deleteResourceUserRoles(long resourceId);
069    
070      void deleteResourceManualMeasures(long resourceId);
071    
072      void deleteResourceReviews(long resourceId);
073    
074      void deleteResourceEvents(long resourceId);
075    
076      void deleteResourceActionPlans(long resourceId);
077    
078      void closeResourceReviews(long resourceId);
079    
080      List<PurgeableSnapshotDto> selectPurgeableSnapshotsWithEvents(long resourceId);
081    
082      List<PurgeableSnapshotDto> selectPurgeableSnapshotsWithoutEvents(long resourceId);
083    
084      List<Long> selectResourceIdsByRootId(long rootProjectId);
085      
086      List<Long> selectResourceIdsToDisable(long projectId);
087    }