]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7693 support removal of ID columns in SNAPSHOTS
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 9 Jun 2016 15:09:20 +0000 (17:09 +0200)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 14 Jun 2016 14:12:01 +0000 (16:12 +0200)
131 files changed:
it/it-tests/src/test/java/it/dbCleaner/PurgeTest.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/ShowAction.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/ShowData.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/TreeAction.java
server/sonar-server/src/main/java/org/sonar/server/computation/component/ProjectViewAttributes.java
server/sonar-server/src/main/java/org/sonar/server/computation/dbcleaner/ProjectCleaner.java
server/sonar-server/src/main/java/org/sonar/server/computation/step/IndexComponentsStep.java
server/sonar-server/src/main/java/org/sonar/server/computation/step/LoadPeriodsStep.java
server/sonar-server/src/main/java/org/sonar/server/computation/step/PeriodResolver.java
server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistSnapshotsStep.java
server/sonar-server/src/main/java/org/sonar/server/computation/step/SwitchSnapshotStep.java
server/sonar-server/src/main/java/org/sonar/server/computation/step/ValidateProjectStep.java
server/sonar-server/src/main/java/org/sonar/server/issue/IssueQueryService.java
server/sonar-server/src/main/java/org/sonar/server/measure/MeasureFilterSql.java
server/sonar-server/src/main/java/org/sonar/server/measure/custom/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentAction.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeDataLoader.java
server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/ProjectStatusAction.java
server/sonar-server/src/main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java
server/sonar-server/src/test/java/org/sonar/server/computation/dbcleaner/ProjectCleanerTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/measure/MeasureToMeasureDtoTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/step/IndexComponentsStepTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/step/ReportPersistSnapshotsStepTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/step/ViewsPersistComponentsStepTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/step/ViewsPersistSnapshotsStepTest.java
server/sonar-server/src/test/java/org/sonar/server/ui/ws/ComponentNavigationActionTest.java
server/sonar-server/src/test/resources/org/sonar/server/computation/measure/MeasureRepositoryImplTest/shared.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/LoadPeriodsStepTest/no_previous_version.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/LoadPeriodsStepTest/previous_version_deleted.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/LoadPeriodsStepTest/previous_version_is_last_one.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/LoadPeriodsStepTest/shared.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/LoadPeriodsStepTest/unprocessed_snapshots.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/SwitchSnapshotStepTest/snapshots-result.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/SwitchSnapshotStepTest/snapshots.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/ServerIssueStorageTest/load_component_id_from_db.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/ServerIssueStorageTest/load_project_id_from_db.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/ServerIssueStorageTest/should_insert_new_issues.xml
server/sonar-server/src/test/resources/org/sonar/server/issue/ServerIssueStorageTest/should_update_issues.xml
server/sonar-server/src/test/resources/org/sonar/server/measure/MeasureFilterExecutorTest/escape_percent_and_underscore_when_filter_by_component_name_or_key.xml
server/sonar-server/src/test/resources/org/sonar/server/measure/MeasureFilterExecutorTest/ignore_person_measures.xml
server/sonar-server/src/test/resources/org/sonar/server/measure/MeasureFilterExecutorTest/ignore_quality_model_measures.xml
server/sonar-server/src/test/resources/org/sonar/server/measure/MeasureFilterExecutorTest/shared.xml
server/sonar-server/src/test/resources/org/sonar/server/measure/MeasureFilterExecutorTest/sort_by_alert.xml
server/sonar-server/src/test/resources/org/sonar/server/platform/BackendCleanupMediumTest/shared.xml
server/sonar-server/src/test/resources/org/sonar/server/view/index/ViewIndexerTest/index.xml
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/events_controller.rb
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/projects_controller.rb
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
server/sonar-web/src/main/webapp/WEB-INF/app/models/event.rb
server/sonar-web/src/main/webapp/WEB-INF/app/models/measure_filter.rb
server/sonar-web/src/main/webapp/WEB-INF/app/models/project.rb
server/sonar-web/src/main/webapp/WEB-INF/app/models/snapshot.rb
server/sonar-web/src/main/webapp/WEB-INF/app/models/trends_chart.rb
sonar-db/src/main/java/org/sonar/db/component/ResourceIndexDao.java
sonar-db/src/main/java/org/sonar/db/component/ResourceIndexQuery.java
sonar-db/src/main/java/org/sonar/db/component/ResourceMapper.java
sonar-db/src/main/java/org/sonar/db/component/SnapshotDao.java
sonar-db/src/main/java/org/sonar/db/component/SnapshotDto.java
sonar-db/src/main/java/org/sonar/db/component/SnapshotDtoFunctions.java
sonar-db/src/main/java/org/sonar/db/component/SnapshotMapper.java
sonar-db/src/main/java/org/sonar/db/component/SnapshotQuery.java
sonar-db/src/main/java/org/sonar/db/purge/PurgeCommands.java
sonar-db/src/main/java/org/sonar/db/purge/PurgeDao.java
sonar-db/src/main/java/org/sonar/db/purge/PurgeMapper.java
sonar-db/src/main/java/org/sonar/db/purge/PurgeSnapshotQuery.java
sonar-db/src/main/java/org/sonar/db/purge/period/DefaultPeriodCleaner.java
sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml
sonar-db/src/main/resources/org/sonar/db/component/ResourceIndexMapper.xml
sonar-db/src/main/resources/org/sonar/db/component/ResourceMapper.xml
sonar-db/src/main/resources/org/sonar/db/component/SnapshotMapper.xml
sonar-db/src/main/resources/org/sonar/db/duplication/DuplicationMapper.xml
sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml
sonar-db/src/main/resources/org/sonar/db/purge/PurgeMapper.xml
sonar-db/src/test/java/org/sonar/db/component/ComponentDbTester.java
sonar-db/src/test/java/org/sonar/db/component/ResourceIndexDaoTest.java
sonar-db/src/test/java/org/sonar/db/component/SnapshotDaoTest.java
sonar-db/src/test/java/org/sonar/db/component/SnapshotDtoTest.java
sonar-db/src/test/java/org/sonar/db/component/SnapshotQueryTest.java
sonar-db/src/test/java/org/sonar/db/component/SnapshotTesting.java
sonar-db/src/test/java/org/sonar/db/measure/MeasureDaoTest.java
sonar-db/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java
sonar-db/src/test/java/org/sonar/db/purge/PurgeDaoTest.java
sonar-db/src/test/java/org/sonar/db/purge/period/DefaultPeriodCleanerTest.java
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/multi-modules.xml
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_ghost_projects.xml
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/select_provisioned_projects.xml
sonar-db/src/test/resources/org/sonar/db/component/ComponentDaoTest/shared.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/fixture-including-ghost-projects-and-technical-project.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/fixture.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldIndexMultiModulesProject.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldNotIndexPackages.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexNewTwoLettersLongResource.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReIndexTwoLettersLongResource.xml
sonar-db/src/test/resources/org/sonar/db/component/ResourceIndexDaoTest/shouldReindexProjectAfterRenaming.xml
sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/has_last_snapshot_by_component_uuid.xml
sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/insert-result.xml
sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_previous_version_snapshots.xml
sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/select_snapshots_by_query.xml
sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/shared.xml
sonar-db/src/test/resources/org/sonar/db/component/SnapshotDaoTest/snapshots.xml
sonar-db/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/insert.xml
sonar-db/src/test/resources/org/sonar/db/duplication/DuplicationDaoTest/select_candidates.xml
sonar-db/src/test/resources/org/sonar/db/issue/IssueDaoTest/shared.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures_with_person_id.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/select_by_snapshot_and_metric_keys.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/shared.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/with_some_measures_for_developer.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteResource.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingSnapshot.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeSnapshot-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeSnapshot.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/delete_file_sources_of_disabled_resources.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/disable_resources_without_last_snapshot-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/disable_resources_without_last_snapshot.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteAbortedBuilds.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteProject.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteSnapshots-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldDeleteSnapshots.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldPurgeProject.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/shouldSelectPurgeableSnapshots.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_all_closed_issues.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeDaoTest/should_delete_old_closed_issues.xml

index be1a983e7dcfdf6a4b351f30ffb911f945b1a0a9..bd7683fb5a85e51cc2e5163846e9d45dfc1e2341 100644 (file)
@@ -146,7 +146,7 @@ public class PurgeTest {
     // analyse twice
     scan(PROJECT_SAMPLE_PATH);
     // and check we have 2 snapshots
-    assertThat(count("snapshots s where s.project_id=(select p.id from projects p where p.kee='com.sonarsource.it.samples:multi-modules-sample')")).isEqualTo(2);
+    assertThat(count("snapshots s where s.component_uuid=(select p.uuid from projects p where p.kee='com.sonarsource.it.samples:multi-modules-sample')")).isEqualTo(2);
   }
 
   /**
@@ -290,12 +290,12 @@ public class PurgeTest {
   }
 
   private void assertDeleted(String key) {
-    assertThat(count("snapshots s where s.project_id=(select p.id from projects p where p.kee='" + key + "')")).isZero();
+    assertThat(count("snapshots s where s.component_uuid=(select p.uuid from projects p where p.kee='" + key + "')")).isZero();
     assertThat(count("resource_index ri where ri.component_uuid=(select p.uuid from projects p where p.kee='" + key + "')")).isZero();
   }
 
   private void assertSingleSnapshot(String key) {
-    assertThat(count("snapshots s where s.project_id=(select p.id from projects p where p.kee='" + key + "')")).isEqualTo(1);
+    assertThat(count("snapshots s where s.component_uuid=(select p.uuid from projects p where p.kee='" + key + "')")).isEqualTo(1);
     assertThat(count("resource_index ri where ri.component_uuid=(select p.uuid from projects p where p.kee='" + key + "')")).isGreaterThan(1);
   }
 
index df6dbdd5010a125755477c520a23b7921a39e701..6e8c9c09506dece00baee1772ab8d038168b377f 100644 (file)
@@ -96,13 +96,13 @@ public class ShowAction implements ComponentsWsAction {
     DbSession dbSession = dbClient.openSession(false);
     try {
       ComponentDto component = getComponentByUuidOrKey(dbSession, request);
-      SnapshotDto lastSnapshot = dbClient.snapshotDao().selectLastSnapshotByComponentId(dbSession, component.getId());
+      SnapshotDto lastSnapshot = dbClient.snapshotDao().selectLastSnapshotByComponentUuid(dbSession, component.uuid());
       List<ComponentDto> orderedAncestors = emptyList();
       if (lastSnapshot != null) {
         ShowData.Builder showDataBuilder = ShowData.builder(lastSnapshot);
         List<SnapshotDto> ancestorsSnapshots = dbClient.snapshotDao().selectByIds(dbSession, showDataBuilder.getOrderedSnapshotIds());
         showDataBuilder.withAncestorsSnapshots(ancestorsSnapshots);
-        List<ComponentDto> ancestorComponents = dbClient.componentDao().selectByIds(dbSession, showDataBuilder.getOrderedComponentIds());
+        List<ComponentDto> ancestorComponents = dbClient.componentDao().selectByUuids(dbSession, showDataBuilder.getOrderedComponentUuids());
         ShowData showData = showDataBuilder.andAncestorComponents(ancestorComponents);
         orderedAncestors = showData.getComponents();
       }
index e5f3d22f0820dbb7dfaa7faa464b6a374bf33749..9b090941d4a30da22f96e6017d88371aee1b8940 100644 (file)
@@ -52,7 +52,7 @@ class ShowData {
   static class Builder {
     private Ordering<SnapshotDto> snapshotOrdering;
     private List<Long> orderedSnapshotIds;
-    private List<Long> orderedComponentIds;
+    private List<String> orderedComponentUuids;
 
     private Builder(SnapshotDto snapshot) {
       List<String> orderedSnapshotIdsAsString = snapshot.getPath() == null ? Collections.<String>emptyList() : Splitter.on(".").omitEmptyStrings().splitToList(snapshot.getPath());
@@ -67,20 +67,20 @@ class ShowData {
       checkNotNull(snapshotOrdering, "Snapshot must be set before the ancestors");
       checkState(orderedSnapshotIds.size() == ancestorsSnapshots.size(), "Missing ancestor");
 
-      orderedComponentIds = Lists.transform(
+      orderedComponentUuids = Lists.transform(
         snapshotOrdering.immutableSortedCopy(ancestorsSnapshots),
-        SnapshotDtoFunctions.toComponentId());
+        SnapshotDtoFunctions.toComponentUuid());
 
       return this;
     }
 
     ShowData andAncestorComponents(List<ComponentDto> ancestorComponents) {
-      checkNotNull(orderedComponentIds, "Snapshot ancestors must be set before the component ancestors");
-      checkState(orderedComponentIds.size() == ancestorComponents.size(), "Missing ancestor");
+      checkNotNull(orderedComponentUuids, "Snapshot ancestors must be set before the component ancestors");
+      checkState(orderedComponentUuids.size() == ancestorComponents.size(), "Missing ancestor");
 
       return new ShowData(Ordering
-        .explicit(orderedComponentIds)
-        .onResultOf(ComponentDtoFunctions.toId())
+        .explicit(orderedComponentUuids)
+        .onResultOf(ComponentDtoFunctions.toUuid())
         .immutableSortedCopy(ancestorComponents));
     }
 
@@ -88,8 +88,8 @@ class ShowData {
       return orderedSnapshotIds;
     }
 
-    List<Long> getOrderedComponentIds() {
-      return orderedComponentIds;
+    List<String> getOrderedComponentUuids() {
+      return orderedComponentUuids;
     }
   }
 
index 6c318f50ce1e1d18f7b8e966d8ae39076383dc85..3ba6e4d9c969529ff66df709e2716a877bc80002 100644 (file)
@@ -158,7 +158,7 @@ public class TreeAction implements ComponentsWsAction {
     try {
       ComponentDto baseComponent = componentFinder.getByUuidOrKey(dbSession, treeWsRequest.getBaseComponentId(), treeWsRequest.getBaseComponentKey(), BASE_COMPONENT_ID_AND_KEY);
       checkPermissions(baseComponent);
-      SnapshotDto baseSnapshot = dbClient.snapshotDao().selectLastSnapshotByComponentId(dbSession, baseComponent.getId());
+      SnapshotDto baseSnapshot = dbClient.snapshotDao().selectLastSnapshotByComponentUuid(dbSession, baseComponent.uuid());
       if (baseSnapshot == null) {
         return emptyResponse(baseComponent, treeWsRequest);
       }
index 0f704cf499ce1b45ce0bbdb05d2aa96390595bbf..2b1b0cb2c873ed4e1369243c1500b2415c35a3b6 100644 (file)
@@ -21,22 +21,31 @@ package org.sonar.server.computation.component;
 
 import javax.annotation.concurrent.Immutable;
 
+import static java.util.Objects.requireNonNull;
+
 @Immutable
 public class ProjectViewAttributes {
   private final long projectId;
+  private final String projectUuid;
 
-  public ProjectViewAttributes(long projectId) {
+  public ProjectViewAttributes(long projectId, String projectUuid) {
     this.projectId = projectId;
+    this.projectUuid = requireNonNull(projectUuid, "projectUuid can't be null");
   }
 
   public long getProjectId() {
     return projectId;
   }
 
+  public String getProjectUuid() {
+    return projectUuid;
+  }
+
   @Override
   public String toString() {
     return "ProjectViewAttributes{" +
         "projectId=" + projectId +
+        ", projectUuid='" + projectUuid + '\'' +
         '}';
   }
 }
index 140bb6ea872f62b6a7e9ee265bbfc715193fb557..2e9e064007f7b7c69a07bb32fda78b28f9269fbd 100644 (file)
@@ -59,7 +59,7 @@ public class ProjectCleaner {
 
     PurgeConfiguration configuration = newDefaultPurgeConfiguration(projectSettings, idUuidPair);
 
-    cleanHistoricalData(session, configuration.rootProjectIdUuid().getId(), projectSettings);
+    cleanHistoricalData(session, configuration.rootProjectIdUuid().getUuid(), projectSettings);
     doPurge(session, configuration);
 
     session.commit();
@@ -76,12 +76,12 @@ public class ProjectCleaner {
     }
   }
 
-  private void cleanHistoricalData(DbSession session, long resourceId, Settings settings) {
+  private void cleanHistoricalData(DbSession session, String componentUuid, Settings settings) {
     try {
-      periodCleaner.clean(session, resourceId, settings);
+      periodCleaner.clean(session, componentUuid, settings);
     } catch (Exception e) {
       // purge errors must no fail the batch
-      LOG.error("Fail to clean historical data [id=" + resourceId + "]", e);
+      LOG.error("Fail to clean historical data [uuid=" + componentUuid + "]", e);
     }
   }
 
index dd155cf157123c32a0836a15fc5f8ab09ea9996c..b2ce880112938e93f9c504058925d7d84ab31b12 100644 (file)
@@ -20,7 +20,6 @@
 package org.sonar.server.computation.step;
 
 import org.sonar.db.component.ResourceIndexDao;
-import org.sonar.server.computation.component.DbIdsRepository;
 import org.sonar.server.computation.component.TreeRootHolder;
 
 /**
@@ -29,18 +28,16 @@ import org.sonar.server.computation.component.TreeRootHolder;
 public class IndexComponentsStep implements ComputationStep {
 
   private final ResourceIndexDao resourceIndexDao;
-  private final DbIdsRepository dbIdsRepository;
   private final TreeRootHolder treeRootHolder;
 
-  public IndexComponentsStep(ResourceIndexDao resourceIndexDao, DbIdsRepository dbIdsRepository, TreeRootHolder treeRootHolder) {
+  public IndexComponentsStep(ResourceIndexDao resourceIndexDao, TreeRootHolder treeRootHolder) {
     this.resourceIndexDao = resourceIndexDao;
-    this.dbIdsRepository = dbIdsRepository;
     this.treeRootHolder = treeRootHolder;
   }
 
   @Override
   public void execute() {
-    resourceIndexDao.indexProject(dbIdsRepository.getComponentId(treeRootHolder.getRoot()));
+    resourceIndexDao.indexProject(treeRootHolder.getRoot().getUuid());
   }
 
   @Override
index 9a0ef5c9aa50611964745f4ed4a220142d2194e1..138895e63d96c072e1fd4b7edd37c06247b1258a 100644 (file)
@@ -102,7 +102,7 @@ public class LoadPeriodsStep implements ComputationStep {
     }
 
     boolean isReportType = projectOrView.getType().isReportType();
-    PeriodResolver periodResolver = new PeriodResolver(dbClient, session, projectDto.get().getId(), analysisMetadataHolder.getAnalysisDate(),
+    PeriodResolver periodResolver = new PeriodResolver(dbClient, session, projectDto.get().uuid(), analysisMetadataHolder.getAnalysisDate(),
       isReportType ? projectOrView.getReportAttributes().getVersion() : null,
       isReportType ? Qualifiers.PROJECT : Qualifiers.VIEW);
 
index 7f58aa9946a148d26a9c4afdccfd825bf558ae28..2991cf3140f0f2237ef48b373eeafabefb02c373 100644 (file)
@@ -52,16 +52,16 @@ public class PeriodResolver {
 
   private final DbClient dbClient;
   private final DbSession session;
-  private final long projectId;
+  private final String projectUuid;
   private final long analysisDate;
   @CheckForNull
   private final String currentVersion;
   private final String qualifier;
 
-  public PeriodResolver(DbClient dbClient, DbSession session, long projectId, long analysisDate, @Nullable String currentVersion, String qualifier) {
+  public PeriodResolver(DbClient dbClient, DbSession session, String projectUuid, long analysisDate, @Nullable String currentVersion, String qualifier) {
     this.dbClient = dbClient;
     this.session = session;
-    this.projectId = projectId;
+    this.projectUuid = projectUuid;
     this.analysisDate = analysisDate;
     this.currentVersion = currentVersion;
     this.qualifier = qualifier;
@@ -100,7 +100,7 @@ public class PeriodResolver {
   }
 
   private Period findByDate(int index, Date date) {
-    SnapshotDto snapshot = findFirstSnapshot(session, createCommonQuery(projectId).setCreatedAfter(date.getTime()).setSort(BY_DATE, ASC));
+    SnapshotDto snapshot = findFirstSnapshot(session, createCommonQuery(projectUuid).setCreatedAfter(date.getTime()).setSort(BY_DATE, ASC));
     if (snapshot == null) {
       return null;
     }
@@ -110,7 +110,7 @@ public class PeriodResolver {
 
   @CheckForNull
   private Period findByDays(int index, int days) {
-    List<SnapshotDto> snapshots = dbClient.snapshotDao().selectSnapshotsByQuery(session, createCommonQuery(projectId).setCreatedBefore(analysisDate).setSort(BY_DATE, ASC));
+    List<SnapshotDto> snapshots = dbClient.snapshotDao().selectSnapshotsByQuery(session, createCommonQuery(projectUuid).setCreatedBefore(analysisDate).setSort(BY_DATE, ASC));
     long targetDate = DateUtils.addDays(new Date(analysisDate), -days).getTime();
     SnapshotDto snapshot = findNearestSnapshotToTargetDate(snapshots, targetDate);
     if (snapshot == null) {
@@ -122,7 +122,7 @@ public class PeriodResolver {
 
   @CheckForNull
   private Period findByPreviousAnalysis(int index) {
-    SnapshotDto snapshot = findFirstSnapshot(session, createCommonQuery(projectId).setCreatedBefore(analysisDate).setIsLast(true).setSort(BY_DATE, DESC));
+    SnapshotDto snapshot = findFirstSnapshot(session, createCommonQuery(projectUuid).setCreatedBefore(analysisDate).setIsLast(true).setSort(BY_DATE, DESC));
     if (snapshot == null) {
       return null;
     }
@@ -135,7 +135,7 @@ public class PeriodResolver {
     if (currentVersion == null) {
       return null;
     }
-    List<SnapshotDto> snapshotDtos = dbClient.snapshotDao().selectPreviousVersionSnapshots(session, projectId, currentVersion);
+    List<SnapshotDto> snapshotDtos = dbClient.snapshotDao().selectPreviousVersionSnapshots(session, projectUuid, currentVersion);
     if (snapshotDtos.isEmpty()) {
       // If no previous version is found, the first analysis is returned
       return findByFirstAnalysis(index);
@@ -147,7 +147,7 @@ public class PeriodResolver {
 
   @CheckForNull
   private Period findByFirstAnalysis(int index) {
-    SnapshotDto snapshotDto = dbClient.snapshotDao().selectOldestSnapshot(session, projectId);
+    SnapshotDto snapshotDto = dbClient.snapshotDao().selectOldestSnapshot(session, projectUuid);
     if (snapshotDto == null) {
       return null;
     }
@@ -157,7 +157,7 @@ public class PeriodResolver {
 
   @CheckForNull
   private Period findByVersion(int index, String version) {
-    SnapshotDto snapshot = findFirstSnapshot(session, createCommonQuery(projectId).setVersion(version).setSort(BY_DATE, DESC));
+    SnapshotDto snapshot = findFirstSnapshot(session, createCommonQuery(projectUuid).setVersion(version).setSort(BY_DATE, DESC));
     if (snapshot == null) {
       return null;
     }
@@ -198,8 +198,8 @@ public class PeriodResolver {
     return nearest;
   }
 
-  private static SnapshotQuery createCommonQuery(Long projectId) {
-    return new SnapshotQuery().setComponentId(projectId).setStatus(STATUS_PROCESSED);
+  private static SnapshotQuery createCommonQuery(String projectUuid) {
+    return new SnapshotQuery().setComponentUuid(projectUuid).setStatus(STATUS_PROCESSED);
   }
 
   private static String formatDate(long date) {
index 98ed3a10794c865c90ca01130fa1f743cd420c75..3e2deea6419e4268654337ee67af3c1e06117a84 100644 (file)
@@ -67,7 +67,7 @@ public class PersistSnapshotsStep implements ComputationStep {
     try {
       new PathAwareCrawler<>(
         new PersistSnapshotsPathAwareVisitor(session, analysisMetadataHolder.getAnalysisDate(), dbIdsRepository))
-        .visit(treeRootHolder.getRoot());
+          .visit(treeRootHolder.getRoot());
       session.commit();
     } finally {
       dbClient.closeSession(session);
@@ -80,7 +80,7 @@ public class PersistSnapshotsStep implements ComputationStep {
     private final long analysisDate;
     private final MutableDbIdsRepository dbIdsRepository;
 
-    private long rootId;
+    private String rootUuid;
 
     public PersistSnapshotsPathAwareVisitor(DbSession dbSession, long analysisDate, MutableDbIdsRepository dbIdsRepository) {
       super(CrawlerDepthLimit.LEAVES, Order.PRE_ORDER, SnapshotDtoHolderFactory.INSTANCE);
@@ -91,7 +91,7 @@ public class PersistSnapshotsStep implements ComputationStep {
 
     @Override
     public void visitProject(Component project, Path<SnapshotDtoHolder> path) {
-      this.rootId = dbIdsRepository.getComponentId(project);
+      this.rootUuid = project.getUuid();
       SnapshotDto snapshot = createSnapshot(project, path, Qualifiers.PROJECT, Scopes.PROJECT, true);
       updateSnapshotPeriods(snapshot);
       commonForAnyVisit(project, path, snapshot);
@@ -118,7 +118,7 @@ public class PersistSnapshotsStep implements ComputationStep {
 
     @Override
     public void visitView(Component view, Path<SnapshotDtoHolder> path) {
-      this.rootId = dbIdsRepository.getComponentId(view);
+      this.rootUuid = view.getUuid();
       SnapshotDto snapshot = createSnapshot(view, path, Qualifiers.VIEW, Scopes.PROJECT, false);
       updateSnapshotPeriods(snapshot);
       commonForAnyVisit(view, path, snapshot);
@@ -157,11 +157,11 @@ public class PersistSnapshotsStep implements ComputationStep {
 
     private SnapshotDto createSnapshot(Component component, Path<SnapshotDtoHolder> path,
       String qualifier, String scope, boolean setVersion) {
-      long componentId = dbIdsRepository.getComponentId(component);
+      String componentUuid = component.getUuid();
       SnapshotDto snapshotDto = new SnapshotDto()
-        .setRootProjectId(rootId)
+        .setRootComponentUuid(rootUuid)
         .setVersion(setVersion ? component.getReportAttributes().getVersion() : null)
-        .setComponentId(componentId)
+        .setComponentUuid(componentUuid)
         .setQualifier(qualifier)
         .setScope(scope)
         .setLast(false)
index 55dd22033c914b6c8da1b4ecef31149da91f3ace..5f2706d816de57ac22e979f88532628a3a52407a 100644 (file)
@@ -64,7 +64,7 @@ public class SwitchSnapshotStep implements ComputationStep {
   private void disablePreviousSnapshot(DbSession session, long reportSnapshotId) {
     List<SnapshotDto> snapshots = dbClient.snapshotDao().selectSnapshotAndChildrenOfProjectScope(session, reportSnapshotId);
     for (SnapshotDto snapshot : snapshots) {
-      SnapshotDto previousLastSnapshot = dbClient.snapshotDao().selectLastSnapshotByComponentId(session, snapshot.getComponentId());
+      SnapshotDto previousLastSnapshot = dbClient.snapshotDao().selectLastSnapshotByComponentUuid(session, snapshot.getComponentUuid());
       if (previousLastSnapshot != null) {
         dbClient.snapshotDao().updateSnapshotAndChildrenLastFlag(session, previousLastSnapshot, false);
         session.commit();
@@ -75,7 +75,7 @@ public class SwitchSnapshotStep implements ComputationStep {
   private void enableCurrentSnapshot(DbSession session, long reportSnapshotId) {
     SnapshotDao dao = dbClient.snapshotDao();
     SnapshotDto snapshot = dao.selectOrFailById(session, reportSnapshotId);
-    SnapshotDto previousLastSnapshot = dao.selectLastSnapshotByComponentId(session, snapshot.getComponentId());
+    SnapshotDto previousLastSnapshot = dao.selectLastSnapshotByComponentUuid(session, snapshot.getComponentUuid());
 
     boolean isLast = isLast(snapshot, previousLastSnapshot);
     dao.updateSnapshotAndChildrenLastFlagAndStatus(session, snapshot, isLast, SnapshotDto.STATUS_PROCESSED);
index 7c5e805808ef126724fee8f99b953607dfca3539..32d9329bba7854697d9a9605cbb69e759c2a3c85 100644 (file)
@@ -147,7 +147,7 @@ public class ValidateProjectStep implements ComputationStep {
 
     private void validateAnalysisDate(Optional<ComponentDto> baseProject) {
       if (baseProject.isPresent()) {
-        SnapshotDto snapshotDto = dbClient.snapshotDao().selectLastSnapshotByComponentId(session, baseProject.get().getId());
+        SnapshotDto snapshotDto = dbClient.snapshotDao().selectLastSnapshotByComponentUuid(session, baseProject.get().uuid());
         long currentAnalysisDate = analysisMetadataHolder.getAnalysisDate();
         Long lastAnalysisDate = snapshotDto != null ? snapshotDto.getCreatedAt() : null;
         if (lastAnalysisDate != null && currentAnalysisDate <= snapshotDto.getCreatedAt()) {
index fa98d0fc3f29c27a4bb9763a9484997d62b46cec..5fa880c1cf7b2519d42012dbc2d8d8066f7208b8 100644 (file)
@@ -250,7 +250,7 @@ public class IssueQueryService {
   @CheckForNull
   private Date findCreatedAfterFromComponentUuid(DbSession dbSession, String uuid) {
     ComponentDto component = checkFoundWithOptional(componentService.getByUuid(uuid), "Component with id '%s' not found", uuid);
-    SnapshotDto snapshot = dbClient.snapshotDao().selectLastSnapshotByComponentId(dbSession, component.getId());
+    SnapshotDto snapshot = dbClient.snapshotDao().selectLastSnapshotByComponentUuid(dbSession, component.uuid());
     Long projectSnapshotId = snapshot == null ? null : snapshot.getRootId();
     SnapshotDto projectSnapshot = projectSnapshotId == null ? snapshot : dbClient.snapshotDao().selectById(dbSession, projectSnapshotId);
     return projectSnapshot == null ? null : longToDate(projectSnapshot.getPeriodDate(1));
index e93c253bce59f5553d52319701402f0dad8cb0c8..125fe79428e52e80694aa8c966146d5ec72709b5 100644 (file)
@@ -96,9 +96,11 @@ class MeasureFilterSql {
 
   private String generateSql() {
     StringBuilder sb = new StringBuilder(1000);
-    sb.append("SELECT s.id, s.project_id, s.root_project_id, ");
+    sb.append("SELECT s.id, p.id, root.id, ");
     sb.append(filter.sort().column());
-    sb.append(" FROM snapshots s INNER JOIN projects p ON s.project_id=p.id ");
+    sb.append(" FROM snapshots s");
+    sb.append(" INNER JOIN projects p ON s.component_uuid=p.uuid ");
+    sb.append(" INNER JOIN projects root ON s.root_component_uuid=root.uuid ");
 
     for (int index = 0; index < filter.getMeasureConditions().size(); index++) {
       MeasureFilterCondition condition = filter.getMeasureConditions().get(index);
@@ -108,7 +110,7 @@ class MeasureFilterSql {
     }
 
     if (filter.isOnFavourites()) {
-      sb.append(" INNER JOIN properties props ON props.resource_id=s.project_id ");
+      sb.append(" INNER JOIN properties props ON props.resource_id=p.id ");
     }
 
     if (filter.sort().isOnMeasure()) {
index 16ed05c32e8676446739b558bc88c65b627ac6c2..6efe11a28d9d148b801592af29973483a8a51e90 100644 (file)
@@ -115,7 +115,7 @@ public class SearchAction implements CustomMeasuresWsAction {
 
   @CheckForNull
   private Long searchLastSnapshot(DbSession dbSession, ComponentDto project) {
-    SnapshotDto lastSnapshot = dbClient.snapshotDao().selectLastSnapshotByComponentId(dbSession, project.getId());
+    SnapshotDto lastSnapshot = dbClient.snapshotDao().selectLastSnapshotByComponentUuid(dbSession, project.uuid());
 
     return lastSnapshot == null ? null : lastSnapshot.getBuildDate();
   }
index 72bb2c58e7c860ef21b43bbb80f0bc8689862b55..5a8f2b7e18e50d786a13671c1d608178d2e5b127 100644 (file)
@@ -135,7 +135,7 @@ public class ComponentAction implements MeasuresWsAction {
       Long developerId = searchDeveloperId(dbSession, request);
       Optional<ComponentDto> refComponent = getReferenceComponent(dbSession, component);
       checkPermissions(component);
-      SnapshotDto lastSnapshot = dbClient.snapshotDao().selectLastSnapshotByComponentId(dbSession, component.getId());
+      SnapshotDto lastSnapshot = dbClient.snapshotDao().selectLastSnapshotByComponentUuid(dbSession, component.uuid());
       List<MetricDto> metrics = searchMetrics(dbSession, request);
       List<WsMeasures.Period> periods = snapshotToWsPeriods(lastSnapshot);
       List<MeasureDto> measures = searchMeasures(dbSession, component, lastSnapshot, metrics, periods, developerId);
index d386def59a3fa644f568b7746801fce3d2181809..3b29e1c58a46aa6fbbb7d0ff0d350d73b96dc52c 100644 (file)
@@ -101,7 +101,7 @@ public class ComponentTreeDataLoader {
     try {
       ComponentDto baseComponent = componentFinder.getByUuidOrKey(dbSession, wsRequest.getBaseComponentId(), wsRequest.getBaseComponentKey(), BASE_COMPONENT_ID_AND_KEY);
       checkPermissions(baseComponent);
-      SnapshotDto baseSnapshot = dbClient.snapshotDao().selectLastSnapshotByComponentId(dbSession, baseComponent.getId());
+      SnapshotDto baseSnapshot = dbClient.snapshotDao().selectLastSnapshotByComponentUuid(dbSession, baseComponent.uuid());
       if (baseSnapshot == null) {
         return ComponentTreeData.builder()
           .setBaseComponent(baseComponent)
index 0201259bef8c591a9d4f73194d3ba36694ecfef0..252a6b3d19c42ed49cf2db76930aed76f72a403e 100644 (file)
@@ -144,13 +144,13 @@ public class ProjectStatusAction implements QGateWsAction {
 
   private ProjectAndSnapshot getProjectThenSnapshot(DbSession dbSession, ProjectStatusWsRequest request) {
     ComponentDto projectDto = componentFinder.getByUuidOrKey(dbSession, request.getProjectId(), request.getProjectKey(), ParamNames.PROJECT_ID_AND_KEY);
-    SnapshotDto snapshotDto = dbClient.snapshotDao().selectLastSnapshotByComponentId(dbSession, projectDto.getId());
+    SnapshotDto snapshotDto = dbClient.snapshotDao().selectLastSnapshotByComponentUuid(dbSession, projectDto.uuid());
     return new ProjectAndSnapshot(projectDto, snapshotDto);
   }
 
   private ProjectAndSnapshot getSnapshotThenProject(DbSession dbSession, String snapshotId) {
     SnapshotDto snapshotDto = getSnapshot(dbSession, snapshotId);
-    ComponentDto projectDto = dbClient.componentDao().selectOrFailById(dbSession, snapshotDto.getComponentId());
+    ComponentDto projectDto = dbClient.componentDao().selectOrFailByUuid(dbSession, snapshotDto.getComponentUuid());
     return new ProjectAndSnapshot(projectDto, snapshotDto);
   }
 
index 3d64e852f3e833198d6d80f4f655ce8c47a05da1..f8f1995df0fd7846c2a53dd92bd4aab96c867f24 100644 (file)
@@ -115,7 +115,7 @@ public class ComponentNavigationAction implements NavigationWsAction {
 
       userSession.checkComponentUuidPermission(UserRole.USER, component.projectUuid());
 
-      SnapshotDto snapshot = dbClient.snapshotDao().selectLastSnapshotByComponentId(session, component.getId());
+      SnapshotDto snapshot = dbClient.snapshotDao().selectLastSnapshotByComponentUuid(session, component.uuid());
 
       JsonWriter json = response.newJsonWriter();
       json.beginObject();
@@ -267,7 +267,7 @@ public class ComponentNavigationAction implements NavigationWsAction {
       SnapshotDto currentSnapshot = snapshot;
       while (currentSnapshot.getParentId() != null) {
         currentSnapshot = dbClient.snapshotDao().selectOrFailById(session, currentSnapshot.getParentId());
-        componentPath.add(0, dbClient.componentDao().selectOrFailById(session, currentSnapshot.getComponentId()));
+        componentPath.add(0, dbClient.componentDao().selectOrFailByUuid(session, currentSnapshot.getComponentUuid()));
       }
     }
 
index 28e08a37eb1eaf291f5889ac36147c23e9798e29..7886adb6c0c0056777f9a1b853d1f47c30ff2f14 100644 (file)
@@ -33,6 +33,7 @@ import org.sonar.db.purge.PurgeListener;
 import org.sonar.db.purge.PurgeProfiler;
 import org.sonar.db.purge.period.DefaultPeriodCleaner;
 
+import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.anyLong;
 import static org.mockito.Mockito.doThrow;
@@ -78,7 +79,7 @@ public class ProjectCleanerTest {
 
     underTest.purge(mock(DbSession.class), mock(IdUuidPair.class), settings);
 
-    verify(periodCleaner).clean(any(DbSession.class), any(Long.class), any(Settings.class));
+    verify(periodCleaner).clean(any(DbSession.class), anyString(), any(Settings.class));
     verify(dao).purge(any(DbSession.class), any(PurgeConfiguration.class), any(PurgeListener.class), any(PurgeProfiler.class));
   }
 
@@ -93,10 +94,10 @@ public class ProjectCleanerTest {
 
   @Test
   public void if_profiler_cleaning_fails_it_should_not_interrupt_program_execution() {
-    doThrow(RuntimeException.class).when(periodCleaner).clean(any(DbSession.class), anyLong(), any(Settings.class));
+    doThrow(RuntimeException.class).when(periodCleaner).clean(any(DbSession.class), anyString(), any(Settings.class));
 
     underTest.purge(mock(DbSession.class), mock(IdUuidPair.class), settings);
 
-    verify(periodCleaner).clean(any(DbSession.class), anyLong(), any(Settings.class));
+    verify(periodCleaner).clean(any(DbSession.class), anyString(), any(Settings.class));
   }
 }
index e139a3c11379a30f0314497f989a426a599fe4b5..6269fa2e6598e965d503cc96ff9a12509c0e54ad 100644 (file)
@@ -52,7 +52,7 @@ public class MeasureToMeasureDtoTest {
   private static final MetricImpl SOME_STRING_METRIC = new MetricImpl(5, "5", "5", Metric.MetricType.STRING);
   private static final MetricImpl SOME_LEVEL_METRIC = new MetricImpl(6, "6", "6", Metric.MetricType.LEVEL);
 
-  static final Component SOME_COMPONENT = ReportComponent.builder(Component.Type.PROJECT, 1).build();
+  static final Component SOME_COMPONENT = ReportComponent.builder(Component.Type.PROJECT, 1).setUuid("uuid_1").build();
 
   @Rule
   public MutableDbIdsRepositoryRule dbIdsRepository = MutableDbIdsRepositoryRule.create(SOME_COMPONENT);
index e07aa3fb05439dccd750b18b2d897f5dc136ce85..e39e8a2e71bfb6ab17701652229471fe55b62708 100644 (file)
@@ -25,7 +25,6 @@ import org.sonar.db.component.ResourceIndexDao;
 import org.sonar.server.computation.batch.BatchReportReaderRule;
 import org.sonar.server.computation.batch.TreeRootHolderRule;
 import org.sonar.server.computation.component.Component;
-import org.sonar.server.computation.component.MutableDbIdsRepositoryRule;
 import org.sonar.server.computation.component.ReportComponent;
 import org.sonar.server.computation.component.ViewsComponent;
 
@@ -37,37 +36,34 @@ import static org.sonar.server.computation.component.Component.Type.VIEW;
 public class IndexComponentsStepTest extends BaseStepTest {
 
   private static final String PROJECT_KEY = "PROJECT_KEY";
+  private static final String PROJECT_UUID = "PROJECT_UUID";
 
   @Rule
   public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule();
   @Rule
   public BatchReportReaderRule reportReader = new BatchReportReaderRule();
-  @Rule
-  public MutableDbIdsRepositoryRule dbIdsRepository = MutableDbIdsRepositoryRule.create(treeRootHolder);
 
   ResourceIndexDao resourceIndexDao = mock(ResourceIndexDao.class);
-  IndexComponentsStep underTest = new IndexComponentsStep(resourceIndexDao, dbIdsRepository, treeRootHolder);
+  IndexComponentsStep underTest = new IndexComponentsStep(resourceIndexDao, treeRootHolder);
 
   @Test
   public void call_indexProject_of_dao_for_project() {
-    Component project = ReportComponent.builder(PROJECT, 1).setUuid("PROJECT_UUID").setKey(PROJECT_KEY).build();
-    dbIdsRepository.setComponentId(project, 123L);
+    Component project = ReportComponent.builder(PROJECT, 1).setUuid(PROJECT_UUID).setKey(PROJECT_KEY).build();
     treeRootHolder.setRoot(project);
 
     underTest.execute();
 
-    verify(resourceIndexDao).indexProject(123L);
+    verify(resourceIndexDao).indexProject(PROJECT_UUID);
   }
 
   @Test
   public void call_indexProject_of_dao_for_view() {
-    Component view = ViewsComponent.builder(VIEW, PROJECT_KEY).setUuid("PROJECT_UUID").build();
-    dbIdsRepository.setComponentId(view, 123L);
+    Component view = ViewsComponent.builder(VIEW, PROJECT_KEY).setUuid(PROJECT_UUID).build();
     treeRootHolder.setRoot(view);
 
     underTest.execute();
 
-    verify(resourceIndexDao).indexProject(123L);
+    verify(resourceIndexDao).indexProject(PROJECT_UUID);
   }
 
   @Override
index 930595e9cf3d7353713ea7ebcba6f11a14ba95a8..9517ebb13904507c77d6001e46507890c66270b9 100644 (file)
@@ -54,13 +54,10 @@ public class ReportPersistSnapshotsStepTest extends BaseStepTest {
 
   @Rule
   public DbTester dbTester = DbTester.create(System2.INSTANCE);
-
   @Rule
   public TreeRootHolderRule treeRootHolder = new TreeRootHolderRule();
-
   @Rule
   public AnalysisMetadataHolderRule analysisMetadataHolder = new AnalysisMetadataHolderRule();
-
   @Rule
   public PeriodsHolderRule periodsHolder = new PeriodsHolderRule();
 
@@ -124,9 +121,9 @@ public class ReportPersistSnapshotsStepTest extends BaseStepTest {
 
     assertThat(dbTester.countRowsOfTable("snapshots")).isEqualTo(4);
 
-    SnapshotDto projectSnapshot = getUnprocessedSnapshot(projectDto.getId());
-    assertThat(projectSnapshot.getComponentId()).isEqualTo(projectDto.getId());
-    assertThat(projectSnapshot.getRootProjectId()).isEqualTo(projectDto.getId());
+    SnapshotDto projectSnapshot = getUnprocessedSnapshot(projectDto.uuid());
+    assertThat(projectSnapshot.getComponentUuid()).isEqualTo(project.getUuid());
+    assertThat(projectSnapshot.getRootComponentUuid()).isEqualTo(project.getUuid());
     assertThat(projectSnapshot.getRootId()).isNull();
     assertThat(projectSnapshot.getParentId()).isNull();
     assertThat(projectSnapshot.getDepth()).isEqualTo(0);
@@ -139,9 +136,9 @@ public class ReportPersistSnapshotsStepTest extends BaseStepTest {
     assertThat(projectSnapshot.getCreatedAt()).isEqualTo(analysisDate);
     assertThat(projectSnapshot.getBuildDate()).isEqualTo(now);
 
-    SnapshotDto moduleSnapshot = getUnprocessedSnapshot(moduleDto.getId());
-    assertThat(moduleSnapshot.getComponentId()).isEqualTo(moduleDto.getId());
-    assertThat(moduleSnapshot.getRootProjectId()).isEqualTo(projectDto.getId());
+    SnapshotDto moduleSnapshot = getUnprocessedSnapshot(moduleDto.uuid());
+    assertThat(moduleSnapshot.getComponentUuid()).isEqualTo(module.getUuid());
+    assertThat(moduleSnapshot.getRootComponentUuid()).isEqualTo(project.getUuid());
     assertThat(moduleSnapshot.getRootId()).isEqualTo(projectSnapshot.getId());
     assertThat(moduleSnapshot.getParentId()).isEqualTo(projectSnapshot.getId());
     assertThat(moduleSnapshot.getDepth()).isEqualTo(1);
@@ -154,9 +151,9 @@ public class ReportPersistSnapshotsStepTest extends BaseStepTest {
     assertThat(moduleSnapshot.getCreatedAt()).isEqualTo(analysisDate);
     assertThat(moduleSnapshot.getBuildDate()).isEqualTo(now);
 
-    SnapshotDto directorySnapshot = getUnprocessedSnapshot(directoryDto.getId());
-    assertThat(directorySnapshot.getComponentId()).isEqualTo(directoryDto.getId());
-    assertThat(directorySnapshot.getRootProjectId()).isEqualTo(projectDto.getId());
+    SnapshotDto directorySnapshot = getUnprocessedSnapshot(directoryDto.uuid());
+    assertThat(directorySnapshot.getComponentUuid()).isEqualTo(directory.getUuid());
+    assertThat(directorySnapshot.getRootComponentUuid()).isEqualTo(project.getUuid());
     assertThat(directorySnapshot.getRootId()).isEqualTo(projectSnapshot.getId());
     assertThat(directorySnapshot.getParentId()).isEqualTo(moduleSnapshot.getId());
     assertThat(directorySnapshot.getDepth()).isEqualTo(2);
@@ -169,9 +166,9 @@ public class ReportPersistSnapshotsStepTest extends BaseStepTest {
     assertThat(directorySnapshot.getCreatedAt()).isEqualTo(analysisDate);
     assertThat(directorySnapshot.getBuildDate()).isEqualTo(now);
 
-    SnapshotDto fileSnapshot = getUnprocessedSnapshot(fileDto.getId());
-    assertThat(fileSnapshot.getComponentId()).isEqualTo(fileDto.getId());
-    assertThat(fileSnapshot.getRootProjectId()).isEqualTo(projectDto.getId());
+    SnapshotDto fileSnapshot = getUnprocessedSnapshot(fileDto.uuid());
+    assertThat(fileSnapshot.getComponentUuid()).isEqualTo(file.getUuid());
+    assertThat(fileSnapshot.getRootComponentUuid()).isEqualTo(project.getUuid());
     assertThat(fileSnapshot.getRootId()).isEqualTo(projectSnapshot.getId());
     assertThat(fileSnapshot.getParentId()).isEqualTo(directorySnapshot.getId());
     assertThat(fileSnapshot.getDepth()).isEqualTo(3);
@@ -214,7 +211,7 @@ public class ReportPersistSnapshotsStepTest extends BaseStepTest {
 
     underTest.execute();
 
-    SnapshotDto fileSnapshot = getUnprocessedSnapshot(fileDto.getId());
+    SnapshotDto fileSnapshot = getUnprocessedSnapshot(fileDto.uuid());
     assertThat(fileSnapshot.getQualifier()).isEqualTo("UTS");
     assertThat(fileSnapshot.getScope()).isEqualTo("FIL");
   }
@@ -246,29 +243,29 @@ public class ReportPersistSnapshotsStepTest extends BaseStepTest {
 
     assertThat(dbTester.countRowsOfTable("snapshots")).isEqualTo(4);
 
-    SnapshotDto projectSnapshot = getUnprocessedSnapshot(projectDto.getId());
-    assertThat(projectSnapshot.getRootProjectId()).isEqualTo(projectDto.getId());
+    SnapshotDto projectSnapshot = getUnprocessedSnapshot(projectDto.uuid());
+    assertThat(projectSnapshot.getRootComponentUuid()).isEqualTo(project.getUuid());
     assertThat(projectSnapshot.getRootId()).isNull();
     assertThat(projectSnapshot.getParentId()).isNull();
     assertThat(projectSnapshot.getDepth()).isEqualTo(0);
     assertThat(projectSnapshot.getPath()).isNullOrEmpty();
 
-    SnapshotDto moduleASnapshot = getUnprocessedSnapshot(moduleADto.getId());
-    assertThat(moduleASnapshot.getRootProjectId()).isEqualTo(projectDto.getId());
+    SnapshotDto moduleASnapshot = getUnprocessedSnapshot(moduleADto.uuid());
+    assertThat(moduleASnapshot.getRootComponentUuid()).isEqualTo(project.getUuid());
     assertThat(moduleASnapshot.getRootId()).isEqualTo(projectSnapshot.getId());
     assertThat(moduleASnapshot.getParentId()).isEqualTo(projectSnapshot.getId());
     assertThat(moduleASnapshot.getDepth()).isEqualTo(1);
     assertThat(moduleASnapshot.getPath()).isEqualTo(projectSnapshot.getId() + ".");
 
-    SnapshotDto subModuleASnapshot = getUnprocessedSnapshot(subModuleADto.getId());
-    assertThat(subModuleASnapshot.getRootProjectId()).isEqualTo(projectDto.getId());
+    SnapshotDto subModuleASnapshot = getUnprocessedSnapshot(subModuleADto.uuid());
+    assertThat(subModuleASnapshot.getRootComponentUuid()).isEqualTo(project.getUuid());
     assertThat(subModuleASnapshot.getRootId()).isEqualTo(projectSnapshot.getId());
     assertThat(subModuleASnapshot.getParentId()).isEqualTo(moduleASnapshot.getId());
     assertThat(subModuleASnapshot.getDepth()).isEqualTo(2);
     assertThat(subModuleASnapshot.getPath()).isEqualTo(projectSnapshot.getId() + "." + moduleASnapshot.getId() + ".");
 
-    SnapshotDto moduleBSnapshot = getUnprocessedSnapshot(moduleBDto.getId());
-    assertThat(moduleBSnapshot.getRootProjectId()).isEqualTo(projectDto.getId());
+    SnapshotDto moduleBSnapshot = getUnprocessedSnapshot(moduleBDto.uuid());
+    assertThat(moduleBSnapshot.getRootComponentUuid()).isEqualTo(project.getUuid());
     assertThat(moduleBSnapshot.getRootId()).isEqualTo(projectSnapshot.getId());
     assertThat(moduleBSnapshot.getParentId()).isEqualTo(projectSnapshot.getId());
     assertThat(moduleBSnapshot.getDepth()).isEqualTo(1);
@@ -290,7 +287,7 @@ public class ReportPersistSnapshotsStepTest extends BaseStepTest {
 
     underTest.execute();
 
-    SnapshotDto projectSnapshot = getUnprocessedSnapshot(projectDto.getId());
+    SnapshotDto projectSnapshot = getUnprocessedSnapshot(projectDto.uuid());
     assertThat(projectSnapshot.getPeriodMode(1)).isEqualTo(TIMEMACHINE_MODE_DATE);
     assertThat(projectSnapshot.getPeriodDate(1)).isEqualTo(analysisDate);
     assertThat(projectSnapshot.getPeriodModeParameter(1)).isNotNull();
@@ -335,16 +332,16 @@ public class ReportPersistSnapshotsStepTest extends BaseStepTest {
 
     underTest.execute();
 
-    SnapshotDto newProjectSnapshot = getUnprocessedSnapshot(projectDto.getId());
+    SnapshotDto newProjectSnapshot = getUnprocessedSnapshot(projectDto.uuid());
     assertThat(newProjectSnapshot.getPeriodMode(1)).isEqualTo(TIMEMACHINE_MODE_PREVIOUS_ANALYSIS);
 
-    SnapshotDto newModuleSnapshot = getUnprocessedSnapshot(moduleDto.getId());
+    SnapshotDto newModuleSnapshot = getUnprocessedSnapshot(moduleDto.uuid());
     assertThat(newModuleSnapshot.getPeriodMode(1)).isEqualTo(TIMEMACHINE_MODE_PREVIOUS_ANALYSIS);
 
-    SnapshotDto newDirectorySnapshot = getUnprocessedSnapshot(directoryDto.getId());
+    SnapshotDto newDirectorySnapshot = getUnprocessedSnapshot(directoryDto.uuid());
     assertThat(newDirectorySnapshot.getPeriodMode(1)).isNull();
 
-    SnapshotDto newFileSnapshot = getUnprocessedSnapshot(fileDto.getId());
+    SnapshotDto newFileSnapshot = getUnprocessedSnapshot(fileDto.uuid());
     assertThat(newFileSnapshot.getPeriodMode(1)).isNull();
   }
 
@@ -362,15 +359,15 @@ public class ReportPersistSnapshotsStepTest extends BaseStepTest {
 
     underTest.execute();
 
-    SnapshotDto projectSnapshot = getUnprocessedSnapshot(projectDto.getId());
+    SnapshotDto projectSnapshot = getUnprocessedSnapshot(projectDto.uuid());
     assertThat(projectSnapshot.getPeriodMode(1)).isNull();
     assertThat(projectSnapshot.getPeriodDate(1)).isNull();
     assertThat(projectSnapshot.getPeriodModeParameter(1)).isNull();
   }
 
-  private SnapshotDto getUnprocessedSnapshot(long componentId) {
+  private SnapshotDto getUnprocessedSnapshot(String componentUuid) {
     List<SnapshotDto> projectSnapshots = dbClient.snapshotDao().selectSnapshotsByQuery(dbTester.getSession(),
-      new SnapshotQuery().setComponentId(componentId).setIsLast(false).setStatus(SnapshotDto.STATUS_UNPROCESSED));
+      new SnapshotQuery().setComponentUuid(componentUuid).setIsLast(false).setStatus(SnapshotDto.STATUS_UNPROCESSED));
     assertThat(projectSnapshots).hasSize(1);
     return projectSnapshots.get(0);
   }
index ea4c4e5dfaa67e9a74f900dd6976b0f6848f02d3..41266b7ed31be2e1cc20ef546ac878850c962758 100644 (file)
@@ -300,7 +300,7 @@ public class ViewsPersistComponentsStepTest extends BaseStepTest {
       .setUuid(PROJECT_VIEW_1_UUID)
       .setName(PROJECT_VIEW_1_NAME)
       .setDescription("project view description is not persisted")
-      .setProjectViewAttributes(new ProjectViewAttributes(project.getId()));
+      .setProjectViewAttributes(new ProjectViewAttributes(project.getId(), project.uuid()));
   }
 
   private void persistComponents(ComponentDto... componentDtos) {
index b0b2bc73aae356f75821b812936a3f5a616a81b2..26f66cad5b69d86c328c577710855134c7534b26 100644 (file)
@@ -47,7 +47,6 @@ import static org.sonar.db.component.ComponentTesting.newProjectCopy;
 import static org.sonar.db.component.ComponentTesting.newProjectDto;
 import static org.sonar.db.component.ComponentTesting.newSubView;
 import static org.sonar.db.component.ComponentTesting.newView;
-import static org.sonar.db.component.SnapshotTesting.newSnapshotForProject;
 import static org.sonar.server.computation.component.Component.Type.PROJECT_VIEW;
 import static org.sonar.server.computation.component.Component.Type.SUBVIEW;
 import static org.sonar.server.computation.component.Component.Type.VIEW;
@@ -114,17 +113,13 @@ public class ViewsPersistSnapshotsStepTest extends BaseStepTest {
     Component view = ViewsComponent.builder(VIEW, 1).setUuid("ABCD").addChildren(subView).build();
     treeRootHolder.setRoot(view);
 
-    dbIdsRepository.setComponentId(view, viewDto.getId());
-    dbIdsRepository.setComponentId(subView, subViewDto.getId());
-    dbIdsRepository.setComponentId(projectView, projectViewDto.getId());
-
     underTest.execute();
 
     assertThat(dbTester.countRowsOfTable("snapshots")).isEqualTo(3);
 
-    SnapshotDto projectSnapshot = getUnprocessedSnapshot(viewDto.getId());
-    assertThat(projectSnapshot.getComponentId()).isEqualTo(viewDto.getId());
-    assertThat(projectSnapshot.getRootProjectId()).isEqualTo(viewDto.getId());
+    SnapshotDto projectSnapshot = getUnprocessedSnapshot(viewDto.uuid());
+    assertThat(projectSnapshot.getComponentUuid()).isEqualTo(view.getUuid());
+    assertThat(projectSnapshot.getRootComponentUuid()).isEqualTo(view.getUuid());
     assertThat(projectSnapshot.getRootId()).isNull();
     assertThat(projectSnapshot.getParentId()).isNull();
     assertThat(projectSnapshot.getDepth()).isEqualTo(0);
@@ -137,9 +132,9 @@ public class ViewsPersistSnapshotsStepTest extends BaseStepTest {
     assertThat(projectSnapshot.getCreatedAt()).isEqualTo(analysisDate);
     assertThat(projectSnapshot.getBuildDate()).isEqualTo(now);
 
-    SnapshotDto subViewSnapshot = getUnprocessedSnapshot(subViewDto.getId());
-    assertThat(subViewSnapshot.getComponentId()).isEqualTo(subViewDto.getId());
-    assertThat(subViewSnapshot.getRootProjectId()).isEqualTo(viewDto.getId());
+    SnapshotDto subViewSnapshot = getUnprocessedSnapshot(subViewDto.uuid());
+    assertThat(subViewSnapshot.getComponentUuid()).isEqualTo(subView.getUuid());
+    assertThat(subViewSnapshot.getRootComponentUuid()).isEqualTo(view.getUuid());
     assertThat(subViewSnapshot.getRootId()).isEqualTo(projectSnapshot.getId());
     assertThat(subViewSnapshot.getParentId()).isEqualTo(projectSnapshot.getId());
     assertThat(subViewSnapshot.getDepth()).isEqualTo(1);
@@ -152,9 +147,9 @@ public class ViewsPersistSnapshotsStepTest extends BaseStepTest {
     assertThat(subViewSnapshot.getCreatedAt()).isEqualTo(analysisDate);
     assertThat(subViewSnapshot.getBuildDate()).isEqualTo(now);
 
-    SnapshotDto projectViewSnapshot = getUnprocessedSnapshot(projectViewDto.getId());
-    assertThat(projectViewSnapshot.getComponentId()).isEqualTo(projectViewDto.getId());
-    assertThat(projectViewSnapshot.getRootProjectId()).isEqualTo(viewDto.getId());
+    SnapshotDto projectViewSnapshot = getUnprocessedSnapshot(projectViewDto.uuid());
+    assertThat(projectViewSnapshot.getComponentUuid()).isEqualTo(projectView.getUuid());
+    assertThat(projectViewSnapshot.getRootComponentUuid()).isEqualTo(view.getUuid());
     assertThat(projectViewSnapshot.getRootId()).isEqualTo(projectSnapshot.getId());
     assertThat(projectViewSnapshot.getParentId()).isEqualTo(subViewSnapshot.getId());
     assertThat(projectViewSnapshot.getDepth()).isEqualTo(2);
@@ -168,20 +163,16 @@ public class ViewsPersistSnapshotsStepTest extends BaseStepTest {
     assertThat(projectViewSnapshot.getBuildDate()).isEqualTo(now);
 
     assertThat(dbIdsRepository.getSnapshotId(view)).isEqualTo(projectSnapshot.getId());
-    assertThat(dbIdsRepository.getComponentId(subView)).isEqualTo(subViewDto.getId());
-    assertThat(dbIdsRepository.getComponentId(projectView)).isEqualTo(projectViewDto.getId());
   }
 
   @Test
   public void persist_snapshots_with_periods() {
     ComponentDto viewDto = save(newView("ABCD").setKey(valueOf(PROJECT_KEY)).setName("Project"));
     ComponentDto subViewDto = save(newSubView(viewDto, "CDEF", "key").setKey("2"));
-    SnapshotDto viewSnapshotDto = save(newSnapshotForProject(viewDto).setCreatedAt(DateUtils.parseDateQuietly("2015-01-01").getTime()));
-    SnapshotDto subViewSnapshotDto = save(newSnapshotForProject(subViewDto).setCreatedAt(DateUtils.parseDateQuietly("2015-01-01").getTime()));
     dbTester.getSession().commit();
 
     Component subView = ViewsComponent.builder(SUBVIEW, 2).setUuid("ABCD").build();
-    Component view = ViewsComponent.builder(VIEW, PROJECT_KEY).setUuid("ABCD").addChildren(subView).build();
+    Component view = ViewsComponent.builder(VIEW, PROJECT_KEY).setUuid("CDEF").addChildren(subView).build();
     treeRootHolder.setRoot(view);
     dbIdsRepository.setComponentId(view, viewDto.getId());
     dbIdsRepository.setComponentId(subView, subViewDto.getId());
@@ -190,12 +181,12 @@ public class ViewsPersistSnapshotsStepTest extends BaseStepTest {
 
     underTest.execute();
 
-    SnapshotDto viewSnapshot = getUnprocessedSnapshot(viewDto.getId());
+    SnapshotDto viewSnapshot = getUnprocessedSnapshot(viewDto.uuid());
     assertThat(viewSnapshot.getPeriodMode(1)).isEqualTo(TIMEMACHINE_MODE_DATE);
     assertThat(viewSnapshot.getPeriodDate(1)).isEqualTo(analysisDate);
     assertThat(viewSnapshot.getPeriodModeParameter(1)).isNotNull();
 
-    SnapshotDto subViewSnapshot = getUnprocessedSnapshot(subViewDto.getId());
+    SnapshotDto subViewSnapshot = getUnprocessedSnapshot(subViewDto.uuid());
     assertThat(subViewSnapshot.getPeriodMode(1)).isEqualTo(TIMEMACHINE_MODE_DATE);
     assertThat(subViewSnapshot.getPeriodDate(1)).isEqualTo(analysisDate);
     assertThat(subViewSnapshot.getPeriodModeParameter(1)).isNotNull();
@@ -206,14 +197,9 @@ public class ViewsPersistSnapshotsStepTest extends BaseStepTest {
     return componentDto;
   }
 
-  private SnapshotDto save(SnapshotDto snapshotDto) {
-    dbClient.snapshotDao().insert(dbTester.getSession(), snapshotDto);
-    return snapshotDto;
-  }
-
-  private SnapshotDto getUnprocessedSnapshot(long componentId) {
+  private SnapshotDto getUnprocessedSnapshot(String componentUuid) {
     List<SnapshotDto> projectSnapshots = dbClient.snapshotDao().selectSnapshotsByQuery(dbTester.getSession(),
-      new SnapshotQuery().setComponentId(componentId).setIsLast(false).setStatus(SnapshotDto.STATUS_UNPROCESSED));
+      new SnapshotQuery().setComponentUuid(componentUuid).setIsLast(false).setStatus(SnapshotDto.STATUS_UNPROCESSED));
     assertThat(projectSnapshots).hasSize(1);
     return projectSnapshots.get(0);
   }
index bd457413dca7d2c213a5fe5f0ef0386e14fa55f4..e9e9f3fe16052a8301841a50f584add2b1fa0ad6 100644 (file)
@@ -148,7 +148,7 @@ public class ComponentNavigationActionTest {
       .setKey("polop").setName("Polop");
     dbClient.componentDao().insert(dbTester.getSession(), project);
     dbClient.snapshotDao().insert(dbTester.getSession(), new SnapshotDto().setCreatedAt(snapshotDate.getTime()).setVersion("3.14")
-      .setLast(true).setQualifier(project.qualifier()).setComponentId(project.getId()).setRootProjectId(project.getId()).setScope(project.scope()));
+      .setLast(true).setQualifier(project.qualifier()).setComponentUuid(project.uuid()).setRootComponentUuid(project.uuid()).setScope(project.scope()));
     dbTester.getSession().commit();
 
     userSessionRule.login("obiwan").setUserId(userId).addProjectUuidPermissions(UserRole.USER, "abcd");
index 19ce3154111aad51ba7b759bbb547959da9f1436..0234c9b213f4e896af591a6698913ec1a88e5aa1 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
-    <projects id="567" kee="file cpt key" enabled="[true]"/>
-    <snapshots id="123" project_id="567" islast="[true]"/>
-    <snapshots id="369" project_id="567" islast="[false]"/>
+    <projects id="567" uuid="uuid_567" kee="file cpt key" enabled="[true]"/>
+    <snapshots id="123" component_uuid="uuid_567" root_component_uuid="uuid_567" islast="[true]"/>
+    <snapshots id="369" component_uuid="uuid_567" root_component_uuid="uuid_567" islast="[false]"/>
     <metrics id="1" name="metric 1"  />
     <metrics id="2" name="metric 2" />
 </dataset>
index a99245eec5d94f514fba0de81972de92902501da..be57cfc6d2191708818e5530ed70fde79c537315 100644 (file)
@@ -7,7 +7,7 @@
   <snapshots id="1000" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
              period5_param="[null]" period5_date="[null]"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1226379600000" build_date="1226379600000" version="0.9" path=""
              status="P" islast="[false]" depth="0"/>
 
@@ -15,7 +15,7 @@
   <!-- Version 1.0 -->
   <snapshots id="1001" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
-             period5_param="[null]" period5_date="[null]" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             period5_param="[null]" period5_date="[null]" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1226494680000" build_date="1226494680000" version="1.0" path=""
              status="P" islast="[false]" depth="0"/>
 
@@ -24,7 +24,7 @@
   <snapshots id="1002" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
              period5_param="[null]" period5_date="[null]"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1227157200000" build_date="1227157200000" version="1.1" path=""
              status="P" islast="[false]" depth="0"/>
 
@@ -32,7 +32,7 @@
   <snapshots id="1003" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
              period5_param="[null]" period5_date="[null]"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1227358680000" build_date="1227358680000" version="1.1" path=""
              status="P" islast="[false]" depth="0"/>
 
@@ -40,7 +40,7 @@
   <!-- Last version 1.1 -->
   <snapshots id="1004" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
-             period5_param="[null]" period5_date="[null]" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             period5_param="[null]" period5_date="[null]" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1227934800000" build_date="1227934800000" version="1.1" path=""
              status="P" islast="[true]" depth="0"/>
 
index cc92a138743673fb09711a5ef387e893348f0831..f8b76a179172afa9e471547c299ba82a0a9ade9b 100644 (file)
@@ -7,7 +7,7 @@
   <snapshots id="1000" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
              period5_param="[null]" period5_date="[null]"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1226379600000" build_date="1226379600000" version="0.9" path=""
              status="P" islast="[false]" depth="0"/>
 
@@ -15,7 +15,7 @@
   <!-- Version 1.0 -->
   <snapshots id="1001" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
-             period5_param="[null]" period5_date="[null]" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             period5_param="[null]" period5_date="[null]" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1226494680000" build_date="1226494680000" version="1.0" path=""
              status="P" islast="[false]" depth="0"/>
 
@@ -24,7 +24,7 @@
   <snapshots id="1002" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
              period5_param="[null]" period5_date="[null]"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1227157200000" build_date="1227157200000" version="1.1" path=""
              status="P" islast="[false]" depth="0"/>
 
index f61194367cfa62af9a7355e0b73213afcddf83c9..6a97946ef19cd44b9cf33bd3448eded5b76ce29b 100644 (file)
@@ -9,7 +9,7 @@
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]"
              period4_param="[null]" period4_date="[null]" period5_mode="[null]"
              period5_param="[null]" period5_date="[null]"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1226379600000" build_date="1226379600000" version="0.9" path=""
              status="P" islast="[true]" depth="0"/>
 
index 8a81488a57ae73fd1db421d046b2140a60ff2dfb..2c8ae5c913f1d77a3ff22cf03e7e5451f42ecd2c 100644 (file)
@@ -7,7 +7,7 @@
   <snapshots id="1000" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
              period5_param="[null]" period5_date="[null]"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1226379600000" build_date="1226379600000" version="0.9" path=""
              status="P" islast="[false]" depth="0"/>
 
@@ -15,7 +15,7 @@
   <!-- Version 1.0 -->
   <snapshots id="1001" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
-             period5_param="[null]" period5_date="[null]" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             period5_param="[null]" period5_date="[null]" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1226494680000" build_date="1226494680000" version="1.0" path=""
              status="P" islast="[false]" depth="0"/>
 
@@ -24,7 +24,7 @@
   <snapshots id="1002" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
              period5_param="[null]" period5_date="[null]"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1227157200000" build_date="1227157200000" version="1.1" path=""
              status="P" islast="[false]" depth="0"/>
 
@@ -32,7 +32,7 @@
   <snapshots id="1003" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
              period5_param="[null]" period5_date="[null]"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1227358680000" build_date="1227358680000" version="1.1" path=""
              status="P" islast="[false]" depth="0"/>
 
@@ -40,7 +40,7 @@
   <!-- Last version 1.1 -->
   <snapshots id="1004" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
-             period5_param="[null]" period5_date="[null]" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             period5_param="[null]" period5_date="[null]" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1227934800000" build_date="1227934800000" version="1.1" path=""
              status="P" islast="[true]" depth="0"/>
 
index e0a95fb14f2a16ad17c3bc6ee3038f278e893af5..70de478ba1e39018f0e8a468a60d4cb400515ddf 100644 (file)
@@ -8,7 +8,7 @@
   <snapshots id="1000" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
              period5_param="[null]" period5_date="[null]"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1226379600000" build_date="1226379600000" version="0.9" path=""
              status="U" islast="[false]" depth="0"/>
 
index f92f776ff1a1d256cfbd16216bdd3f2ade2a59a6..e8d30bcb7dd3d847c05df7218f362b8ff59ec769 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <!-- NEW SNAPSHOT -->
-  <snapshots id="1" project_id="123" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="1"
+  <snapshots id="1" component_uuid="uuid_123" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -10,7 +10,7 @@
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="PRJ" qualifier="PAC" created_at="1228258800000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="2" project_id="1" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="1"
+  <snapshots id="2" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -19,7 +19,7 @@
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="DIR" qualifier="PAC" created_at="1228258800000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="3" project_id="1" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="1"
+  <snapshots id="3" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -29,7 +29,7 @@
              depth="1" scope="DIR" qualifier="PAC" created_at="1228258800000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
   <!-- PROJECT_ID = 3 - no last snapshot -->
-  <snapshots id="4" project_id="3" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="1"
+  <snapshots id="4" component_uuid="uuid_3" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -39,7 +39,7 @@
              depth="1" scope="DIR" qualifier="PAC" created_at="1228258800000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
   <!-- Child of snapshot id=1 -->
-  <snapshots id="5" project_id="55" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="1"
+  <snapshots id="5" component_uuid="uuid_55" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -50,7 +50,7 @@
              version="2.1-SNAPSHOT" path="1.2."/>
 
   <!-- LAST FLAGGED SNAPSHOT -->
-  <snapshots id="21" project_id="123" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="21"
+  <snapshots id="21" component_uuid="uuid_123" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="21"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -59,7 +59,7 @@
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="PRJ" qualifier="PAC" created_at="1228172400000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="22" project_id="1" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="21"
+  <snapshots id="22" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="21"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -68,7 +68,7 @@
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="DIR" qualifier="PAC" created_at="1228172400000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="23" project_id="1" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="21"
+  <snapshots id="23" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="21"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -78,7 +78,7 @@
              depth="1" scope="DIR" qualifier="PAC" created_at="1228172400000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
   <!-- PROJECT_ID = 3 - no last snapshot -->
-  <snapshots id="24" project_id="3" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="21"
+  <snapshots id="24" component_uuid="uuid_3" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="21"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -88,7 +88,7 @@
              depth="1" scope="DIR" qualifier="PAC" created_at="1228172400000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
   <!-- Child of snapshot id=1 -->
-  <snapshots id="25" project_id="55" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="21"
+  <snapshots id="25" component_uuid="uuid_55" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="21"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -99,7 +99,7 @@
              version="2.1-SNAPSHOT" path="1.2."/>
 
   <!-- OLD SNAPSHOT -->
-  <snapshots id="46" project_id="123" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="46"
+  <snapshots id="46" component_uuid="uuid_123" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="46"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="PRJ" qualifier="PAC" created_at="1228086000000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="47" project_id="1" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="46"
+  <snapshots id="47" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="46"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="DIR" qualifier="PAC" created_at="1228086000000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="48" project_id="1" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="46"
+  <snapshots id="48" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="46"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
              depth="1" scope="DIR" qualifier="PAC" created_at="1228086000000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
   <!-- PROJECT_ID = 3 - no last snapshot -->
-  <snapshots id="49" project_id="3" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="46"
+  <snapshots id="49" component_uuid="uuid_3" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="46"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
              depth="1" scope="DIR" qualifier="PAC" created_at="1228086000000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
   <!-- Child of snapshot id=1 -->
-  <snapshots id="50" project_id="55" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="46"
+  <snapshots id="50" component_uuid="uuid_55" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="46"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
index 6bc85fcec052ed5d06c3ae471a791af8126a2454..662f5a5806a5fe55818cfe50481d25ba42e3fe46 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <!-- NEW SNAPSHOT -->
-  <snapshots id="1" project_id="123" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="1"
+  <snapshots id="1" component_uuid="uuid_123" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="1"
              status="U" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -10,7 +10,7 @@
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="PRJ" qualifier="PAC" created_at="1228258800000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="2" project_id="1" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="1"
+  <snapshots id="2" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="1"
              status="U" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -19,7 +19,7 @@
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="DIR" qualifier="PAC" created_at="1228258800000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="3" project_id="1" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="1"
+  <snapshots id="3" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="1"
              status="U" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -29,7 +29,7 @@
              depth="1" scope="DIR" qualifier="PAC" created_at="1228258800000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
   <!-- PROJECT_ID = 3 - no last snapshot -->
-  <snapshots id="4" project_id="3" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="1"
+  <snapshots id="4" component_uuid="uuid_3" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="1"
              status="U" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -39,7 +39,7 @@
              depth="1" scope="DIR" qualifier="PAC" created_at="1228258800000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
   <!-- Child of snapshot id=1 -->
-  <snapshots id="5" project_id="55" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="1"
+  <snapshots id="5" component_uuid="uuid_55" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="1"
              status="U" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -50,7 +50,7 @@
              version="2.1-SNAPSHOT" path="1.2."/>
 
   <!-- LAST FLAGGED SNAPSHOT -->
-  <snapshots id="21" project_id="123" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="21"
+  <snapshots id="21" component_uuid="uuid_123" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="21"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -59,7 +59,7 @@
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="PRJ" qualifier="PAC" created_at="1228172400000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="22" project_id="1" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="21"
+  <snapshots id="22" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="21"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -68,7 +68,7 @@
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="DIR" qualifier="PAC" created_at="1228172400000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="23" project_id="1" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="21"
+  <snapshots id="23" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="21"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -78,7 +78,7 @@
              depth="1" scope="DIR" qualifier="PAC" created_at="1228172400000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
   <!-- PROJECT_ID = 3 - no last snapshot -->
-  <snapshots id="24" project_id="3" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="21"
+  <snapshots id="24" component_uuid="uuid_3" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="21"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -88,7 +88,7 @@
              depth="1" scope="DIR" qualifier="PAC" created_at="1228172400000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
   <!-- Child of snapshot id=1 -->
-  <snapshots id="25" project_id="55" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="21"
+  <snapshots id="25" component_uuid="uuid_55" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="21"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -99,7 +99,7 @@
              version="2.1-SNAPSHOT" path="1.2."/>
 
   <!-- OLD SNAPSHOT -->
-  <snapshots id="46" project_id="123" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="46"
+  <snapshots id="46" component_uuid="uuid_123" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="46"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="PRJ" qualifier="PAC" created_at="1228086000000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="47" project_id="1" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="46"
+  <snapshots id="47" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="46"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="DIR" qualifier="PAC" created_at="1228086000000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="48" project_id="1" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="46"
+  <snapshots id="48" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="46"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
              depth="1" scope="DIR" qualifier="PAC" created_at="1228086000000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
   <!-- PROJECT_ID = 3 - no last snapshot -->
-  <snapshots id="49" project_id="3" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="46"
+  <snapshots id="49" component_uuid="uuid_3" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="46"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
              depth="1" scope="DIR" qualifier="PAC" created_at="1228086000000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
   <!-- Child of snapshot id=1 -->
-  <snapshots id="50" project_id="55" parent_snapshot_id="2" root_project_id="123" root_snapshot_id="46"
+  <snapshots id="50" component_uuid="uuid_55" parent_snapshot_id="2" root_component_uuid="uuid_123" root_snapshot_id="46"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
index 76aa5b6864f9b96ec99b4ac14c1b657c09c5204a..1a1f7e8466a7c3eab0645af6b51e9f3fa4f87782 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
   <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="ABCD"/>
-  <snapshots id="10" project_id="10" root_project_id="[null]" islast="[true]"/>
+  <snapshots id="10" component_uuid="ABCD" root_component_uuid="ABCD" islast="[true]"/>
 
   <projects id="100" scope="FIL" qualifier="CLA" kee="struts:Action" name="Action" uuid="BCDE"/>
-  <snapshots id="100" project_id="100" root_project_id="10" islast="[true]"/>
+  <snapshots id="100" component_uuid="BCDE" root_component_uuid="ABCD" islast="[true]"/>
 </dataset>
index a5097aa6f66694171943d340e56a4da34c865d24..f17681470e366bca4bab6d442d7668ce76561763 100644 (file)
@@ -2,6 +2,6 @@
   <projects id="1" kee="struts" root_id="[null]" uuid="ABCD"/>
   <projects id="2" kee="struts:Action.java" root_id="1" uuid="BCDE"/>
 
-  <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" islast="[true]" />
-  <snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1" islast="[true]" />
+  <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]" islast="[true]" />
+  <snapshots id="2" component_uuid="BCDE" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1" islast="[true]" />
 </dataset>
index 76aa5b6864f9b96ec99b4ac14c1b657c09c5204a..1a1f7e8466a7c3eab0645af6b51e9f3fa4f87782 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
   <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="ABCD"/>
-  <snapshots id="10" project_id="10" root_project_id="[null]" islast="[true]"/>
+  <snapshots id="10" component_uuid="ABCD" root_component_uuid="ABCD" islast="[true]"/>
 
   <projects id="100" scope="FIL" qualifier="CLA" kee="struts:Action" name="Action" uuid="BCDE"/>
-  <snapshots id="100" project_id="100" root_project_id="10" islast="[true]"/>
+  <snapshots id="100" component_uuid="BCDE" root_component_uuid="ABCD" islast="[true]"/>
 </dataset>
index bdaace4d67cbdaa2d62c88681065ef3f21910847..832058c2eef9740ed34d9c4546a6abcc7d2d44cb 100644 (file)
@@ -1,10 +1,10 @@
 <dataset>
 
   <projects id="10" scope="PRJ" qualifier="TRK" kee="struts" name="Struts" uuid="ABCD"/>
-  <snapshots id="10" project_id="10" root_project_id="[null]" islast="[true]"/>
+  <snapshots id="10" component_uuid="ABCD" root_component_uuid="ABCD" islast="[true]"/>
 
   <projects id="100" scope="FIL" qualifier="CLA" kee="struts:Action" name="Action" uuid="BCDE"/>
-  <snapshots id="100" project_id="100" root_project_id="10" islast="[true]"/>
+  <snapshots id="100" component_uuid="BCDE" root_component_uuid="ABCD" islast="[true]"/>
 
   <issues id="1"
           kee="ABCDE"
index 1436974b82b5c7e615a3b7b6d8815ea5316b9da8..126b499f803fd7c5a3f8e4842020b16bb830c2c4 100644 (file)
@@ -22,7 +22,7 @@
             description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
             created_at="2008-12-19 00:00:00.00"/>
 
-  <snapshots id="101" project_id="1" root_project_id="1" root_snapshot_id="[null]" parent_snapshot_id="[null]"
+  <snapshots id="101" component_uuid="ABCD" root_component_uuid="ABCD" root_snapshot_id="[null]" parent_snapshot_id="[null]"
              scope="FIL" qualifier="CLA" path="" depth="0"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
@@ -31,7 +31,7 @@
              created_at="1229727600000" build_date="1229727600000"
              version="1.0" status="P" islast="[true]"/>
 
-  <snapshots id="102" project_id="2" root_project_id="1" root_snapshot_id="101" parent_snapshot_id="101"
+  <snapshots id="102" component_uuid="BCDE" root_component_uuid="ABCD" root_snapshot_id="101" parent_snapshot_id="101"
              scope="FIL" qualifier="CLA" path="101." depth="1"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
@@ -40,7 +40,7 @@
              created_at="1229727600000" build_date="1229727600000"
              version="1.0" status="P" islast="[true]"/>
 
-  <snapshots id="103" project_id="3" root_project_id="1" root_snapshot_id="101" parent_snapshot_id="102"
+  <snapshots id="103" component_uuid="CDEF" root_component_uuid="ABCD" root_snapshot_id="101" parent_snapshot_id="102"
              scope="FIL" qualifier="CLA" path="101.102." depth="2"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
@@ -49,7 +49,7 @@
              created_at="1229727600000" build_date="1229727600000"
              version="1.0" status="P" islast="[true]"/>
 
-  <snapshots id="104" project_id="4" root_project_id="1" root_snapshot_id="101" parent_snapshot_id="102"
+  <snapshots id="104" component_uuid="DEFG" root_component_uuid="ABCD" root_snapshot_id="101" parent_snapshot_id="102"
              scope="FIL" qualifier="CLA" path="101.102." depth="2"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
index f17b71c5c739f61118570bbe3ea0e8825b0f7286..9ba1f33cfe7cf4d60d3b6a080155e01f3c2a206a 100644 (file)
@@ -8,7 +8,7 @@
             id="1" root_id="[null]" uuid="ABCD"
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"/>
 
-  <snapshots id="101" project_id="1" root_project_id="1" root_snapshot_id="[null]" parent_snapshot_id="[null]"
+  <snapshots id="101" component_uuid="ABCD" root_component_uuid="ABCD" root_snapshot_id="[null]" parent_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" path="" depth="0"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
index 964996ea17f267ecc2e38450acb2721a7dca2946..c99bd38bfc0efc772615a1dbdb8a67db4701e2e9 100644 (file)
@@ -8,7 +8,7 @@
             id="1" root_id="[null]" uuid="ABCD"
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"/>
 
-  <snapshots id="101" project_id="1" root_project_id="1" root_snapshot_id="[null]" parent_snapshot_id="[null]"
+  <snapshots id="101" component_uuid="ABCD" root_component_uuid="ABCD" root_snapshot_id="[null]" parent_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" path="" depth="0"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
index db520d39eb52231057087dba84cba054112f1c53..dcf925a251f820aac28a938d640b15c392177758 100644 (file)
@@ -44,7 +44,7 @@
             description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
             created_at="2008-12-19 00:00:00.00"/>
 
-  <snapshots id="101" project_id="1" root_project_id="1" root_snapshot_id="[null]" parent_snapshot_id="[null]"
+  <snapshots id="101" component_uuid="ABCD" root_component_uuid="ABCD" root_snapshot_id="[null]" parent_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" path="" depth="0"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
@@ -53,7 +53,7 @@
              created_at="1229727600000" build_date="1229727600000"
              version="1.0" status="P" islast="[true]"/>
 
-  <snapshots id="102" project_id="2" root_project_id="1" root_snapshot_id="101" parent_snapshot_id="101"
+  <snapshots id="102" component_uuid="BCDE" root_component_uuid="ABCD" root_snapshot_id="101" parent_snapshot_id="101"
              scope="DIR" qualifier="PAC" path="101." depth="1"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
@@ -62,7 +62,7 @@
              created_at="1229727600000" build_date="1229727600000"
              version="1.0" status="P" islast="[true]"/>
 
-  <snapshots id="103" project_id="3" root_project_id="1" root_snapshot_id="101" parent_snapshot_id="102"
+  <snapshots id="103" component_uuid="CDEF" root_component_uuid="ABCD" root_snapshot_id="101" parent_snapshot_id="102"
              scope="FIL" qualifier="CLA" path="101.102." depth="2"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
@@ -71,7 +71,7 @@
              created_at="1229727600000" build_date="1229727600000"
              version="1.0" status="P" islast="[true]"/>
 
-  <snapshots id="104" project_id="4" root_project_id="1" root_snapshot_id="101" parent_snapshot_id="102"
+  <snapshots id="104" component_uuid="DEFG" root_component_uuid="ABCD" root_snapshot_id="101" parent_snapshot_id="102"
              scope="FIL" qualifier="CLA" path="101.102." depth="2"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
             created_at="2012-12-12 04:06:00.00"/>
 
 
-  <snapshots id="110" project_id="10" root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]"
+  <snapshots id="110" component_uuid="EFGH" root_component_uuid="EFGH" root_snapshot_id="[null]" parent_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" path="" depth="0"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
index 24180d95e1adbeb1ad27dc9edf8be0afeecd4dcb..f3ed36c2b406098a0c5b95b00139835be3a19194 100644 (file)
@@ -11,7 +11,7 @@
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
             created_at="2008-12-19 00:00:00.00"/>
 
-  <snapshots id="101" project_id="1" root_project_id="1" root_snapshot_id="[null]" parent_snapshot_id="[null]"
+  <snapshots id="101" component_uuid="ABCD" root_component_uuid="ABCD" root_snapshot_id="[null]" parent_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" path="" depth="0"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
@@ -36,7 +36,7 @@
             created_at="2012-12-12 04:06:00.00"/>
 
 
-  <snapshots id="110" project_id="10" root_project_id="10" root_snapshot_id="[null]" parent_snapshot_id="[null]"
+  <snapshots id="110" component_uuid="BCDE" root_component_uuid="BCDE" root_snapshot_id="[null]" parent_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" path="" depth="0"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
@@ -60,7 +60,7 @@
             created_at="2012-12-12 04:06:00.00"/>
 
 
-  <snapshots id="120" project_id="20" root_project_id="20" root_snapshot_id="[null]" parent_snapshot_id="[null]"
+  <snapshots id="120" component_uuid="CDEF" root_component_uuid="CDEF" root_snapshot_id="[null]" parent_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" path="" depth="0"
              purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]"
index 800b10343faf7d1fdfc92e2223a3d8efed179433..dbe84a89137edfc6314f6275bdbdfaf2ca319750 100644 (file)
@@ -4,7 +4,7 @@
             uuid="JKLM" project_uuid="JKLM" module_uuid="[null]" module_uuid_path="."
             enabled="[true]" copy_resource_id="[null]" path="[null]"/>
 
-  <snapshots id="100" project_id="100" parent_snapshot_id="[null]" root_project_id="100" root_snapshot_id="[null]"
+  <snapshots id="100" component_uuid="JKLM" parent_snapshot_id="[null]" root_component_uuid="JKLM" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" version="[null]" path=""/>
 
index be3bfa4e5ea75e364e591d45ddbc94bab812c591..4f0c07b3f5b886c87059f3f60e7e1fc538443db4 100644 (file)
@@ -3,14 +3,14 @@
   <!-- Simple View -->
   <projects id="10" uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="." copy_resource_id="[null]" enabled="[true]"
             kee="MASTER_PROJECT" scope="PRJ" qualifier="VW" name="All projects" path="[null]"/>
-  <snapshots id="10" project_id="10" parent_snapshot_id="[null]" root_project_id="10" root_snapshot_id="[null]"
+  <snapshots id="10" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="VW" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
 
   <projects id="110" uuid="BCDE" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path=".ABCD." copy_resource_id="100" enabled="[true]"
             kee="MASTER_PROJECTorg.struts:struts" scope="FIL" qualifier="TRK" name="Struts" path="[null]"/>
-  <snapshots id="110" project_id="110" parent_snapshot_id="[null]" root_project_id="110" root_snapshot_id="[null]"
+  <snapshots id="110" component_uuid="BCDE" parent_snapshot_id="[null]" root_component_uuid="BCDE" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
   <!-- View with sub view -->
   <projects id="11" uuid="EFGH" project_uuid="EFGH" module_uuid="[null]" module_uuid_path="." copy_resource_id="[null]" enabled="[true]"
             kee="LANGUAGE_VIEW" scope="PRJ" qualifier="VW" name="By Language" path="[null]"/>
-  <snapshots id="11" project_id="11" parent_snapshot_id="[null]" root_project_id="11" root_snapshot_id="[null]"
+  <snapshots id="11" component_uuid="EFGH" parent_snapshot_id="[null]" root_component_uuid="EFGH" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="VW" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
   <projects id="112" uuid="GHIJ" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_resource_id="101" enabled="[true]"
             kee="VIEW2org.elasticsearch:elasticsearch" scope="FIL" qualifier="TRK" name="SSLR" path="[null]"/>
-  <snapshots id="112" project_id="112" parent_snapshot_id="[null]" root_project_id="112" root_snapshot_id="[null]"
+  <snapshots id="112" component_uuid="GHIJ" parent_snapshot_id="[null]" root_component_uuid="GHIJ" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
   <!-- Sub view -->
   <projects id="13" uuid="FGHI" project_uuid="EFGH" module_uuid="EFGH" module_uuid_path=".EFGH." copy_resource_id="[null]" enabled="[true]"
             kee="JAVA_PROJECTS" scope="PRJ" qualifier="SVW" name="Java projects" path="[null]"/>
-  <snapshots id="13" project_id="13" parent_snapshot_id="[null]" root_project_id="13" root_snapshot_id="[null]"
+  <snapshots id="13" component_uuid="FGHI" parent_snapshot_id="[null]" root_component_uuid="FGHI" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="SVW" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
 
   <projects id="113" uuid="HIJK" project_uuid="EFGH" module_uuid="FGHI" module_uuid_path=".EFGH.FGHI." copy_resource_id="100" enabled="[true]"
             kee="VIEW2org.struts:struts" scope="FIL" qualifier="TRK" name="Struts" path="[null]"/>
-  <snapshots id="113" project_id="113" parent_snapshot_id="[null]" root_project_id="113" root_snapshot_id="[null]"
+  <snapshots id="113" component_uuid="HIJK" parent_snapshot_id="[null]" root_component_uuid="HIJK" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
@@ -47,7 +47,7 @@
   <!-- View without project -->
   <projects id="14" uuid="IJKL" project_uuid="IJKL" module_uuid="[null]" module_uuid_path="." copy_resource_id="[null]" enabled="[true]"
             kee="OTHER" scope="PRJ" qualifier="VW" name="Other projects" path="[null]"/>
-  <snapshots id="14" project_id="14" parent_snapshot_id="[null]" root_project_id="14" root_snapshot_id="[null]"
+  <snapshots id="14" component_uuid="IJKL" parent_snapshot_id="[null]" root_component_uuid="IJKL" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="VW" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
@@ -57,7 +57,7 @@
   <projects id="100" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
             uuid="JKLM" project_uuid="JKLM" module_uuid="[null]" module_uuid_path="."
             enabled="[true]" copy_resource_id="[null]" path="[null]"/>
-  <snapshots id="100" project_id="100" parent_snapshot_id="[null]" root_project_id="100" root_snapshot_id="[null]"
+  <snapshots id="100" component_uuid="JKLM" parent_snapshot_id="[null]" root_component_uuid="JKLM" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
@@ -65,7 +65,7 @@
   <projects id="101" scope="PRJ" qualifier="TRK" kee="org.elasticsearch:elasticsearch" name="Elasticsearch"
             uuid="KLMN" project_uuid="KLMN" module_uuid="[null]" module_uuid_path="."
             enabled="[true]" copy_resource_id="[null]" path="[null]"/>
-  <snapshots id="101" project_id="101" parent_snapshot_id="[null]" root_project_id="101" root_snapshot_id="[null]"
+  <snapshots id="101" component_uuid="KLMN" parent_snapshot_id="[null]" root_component_uuid="KLMN" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
index 44277d0885b79344d8641b004d3b821523f73aa0..7900407f2199513a0fbb6934b8e99e190e95198b 100644 (file)
@@ -130,10 +130,10 @@ class Api::EventsController < Api::ApiController
       if (params[:dateTime])
         # try to find a snapshot on that day
         date = parse_datetime(params[:dateTime], true)
-        root_snapshot = Snapshot.find(:last, :conditions => ["project_id = ? AND created_at >= ? AND created_at <= ?", @resource.id, date.to_i*1000, (date + 1.day).to_i*1000], :order => :created_at)
+        root_snapshot = Snapshot.find(:last, :conditions => ["component_uuid = ? AND created_at >= ? AND created_at <= ?", @resource.uuid, date.to_i*1000, (date + 1.day).to_i*1000], :order => :created_at)
         raise "No snapshot exists for given date" unless root_snapshot
       else
-        root_snapshot = Snapshot.find(:last, :conditions => ["project_id = ?", @resource.id], :order => :created_at)
+        root_snapshot = Snapshot.find(:last, :conditions => ["component_uuid = ?", @resource.uuid], :order => :created_at)
       end
       
       raise "A version already exists on this resource." if params[:category]==EventCategory::KEY_VERSION && root_snapshot.event(EventCategory::KEY_VERSION)
@@ -161,7 +161,7 @@ class Api::EventsController < Api::ApiController
           :event_date => snapshot.created_at
         )
         event.save!
-        event_to_return = event if snapshot.project_id = @resource.id
+        event_to_return = event if snapshot.component_uuid = @resource.uuid
       end
       
       
index cac85bb1e1d1ab6780c05534703e1cfa2ee6e6b3..de02d22c9cdc4b353496a87eaad2ae23d9464d93 100644 (file)
@@ -38,7 +38,7 @@ class Api::ProjectsController < Api::ApiController
     begin
       @show_description=(params[:desc]=='true')
       @projects=load_projects
-      @snapshots_by_pid=load_snapshots_by_project
+      @snapshots_by_puuid=load_snapshots_by_project
       respond_to do |format|
         format.json{ render :json => jsonp(to_json) }
         format.xml { render :xml => to_xml }
@@ -115,7 +115,7 @@ class Api::ProjectsController < Api::ApiController
     end
 
     # this is really an advanced optimization !
-    select_columns='id,kee,name,language,long_name,scope,qualifier,root_id'
+    select_columns='id,uuid,kee,name,language,long_name,scope,qualifier,root_id'
     select_columns += ',description' if @show_description
 
     projects=Project.find(:all, :select => select_columns, :conditions => [conditions.join(' AND '), values], :order => 'name')
@@ -123,21 +123,21 @@ class Api::ProjectsController < Api::ApiController
   end
 
   def load_snapshots_by_project
-    select_columns='id,project_id,version,islast,created_at'
+    select_columns='id,component_uuid,version,islast,created_at'
     if params[:versions]=='true'
-      snapshots=Snapshot.find_by_sql(["SELECT #{select_columns} FROM snapshots s1 WHERE s1.status=? AND s1.project_id IN (?) AND NOT EXISTS(SELECT * FROM snapshots s2 WHERE s2.project_id=s1.project_id AND s2.created_at>s1.created_at AND s2.version=s1.version)", 'P', @projects.map{|p| p.id}])
+      snapshots=Snapshot.find_by_sql(["SELECT #{select_columns} FROM snapshots s1 WHERE s1.status=? AND s1.component_uuid IN (?) AND NOT EXISTS(SELECT * FROM snapshots s2 WHERE s2.component_uuid=s1.component_uuid AND s2.created_at>s1.created_at AND s2.version=s1.version)", 'P', @projects.map{|p| p.uuid}])
     elsif params[:versions]=='last'
-      snapshots=Snapshot.find_by_sql(["SELECT #{select_columns} FROM snapshots s1 WHERE s1.status=? AND islast=? AND s1.project_id IN (?) AND NOT EXISTS(SELECT * FROM snapshots s2 WHERE s2.project_id=s1.project_id AND s2.created_at>s1.created_at AND s2.version=s1.version)", 'P', true, @projects.map{|p| p.id}])
+      snapshots=Snapshot.find_by_sql(["SELECT #{select_columns} FROM snapshots s1 WHERE s1.status=? AND islast=? AND s1.component_uuid IN (?) AND NOT EXISTS(SELECT * FROM snapshots s2 WHERE s2.component_uuid=s1.component_uuid AND s2.created_at>s1.created_at AND s2.version=s1.version)", 'P', true, @projects.map{|p| p.uuid}])
     else
       snapshots=[]
     end
 
-    snapshots_by_project_id={}
+    snapshots_by_project_uuid={}
     snapshots.each do |s|
-      snapshots_by_project_id[s.project_id]||=[]
-      snapshots_by_project_id[s.project_id]<<s
+      snapshots_by_project_uuid[s.component_uuid]||=[]
+      snapshots_by_project_uuid[s.component_uuid]<<s
     end
-    snapshots_by_project_id
+    snapshots_by_project_uuid
   end
 
   def to_json
@@ -145,9 +145,9 @@ class Api::ProjectsController < Api::ApiController
     @projects.each do |project|
       hash=to_json_hash(project)
 
-      if @snapshots_by_pid && @snapshots_by_pid[project.id]
+      if @snapshots_by_puuid && @snapshots_by_puuid[project.uuid]
         versions={}
-        @snapshots_by_pid[project.id].sort{|s1,s2| s2.version <=> s1.version}.each do |snapshot|
+        @snapshots_by_puuid[project.uuid].sort{|s1,s2| s2.version <=> s1.version}.each do |snapshot|
           version={:sid => snapshot.id.to_s}
           version[:d]=Api::Utils.format_datetime(snapshot.created_at) if snapshot.created_at
           if snapshot.last?
@@ -189,8 +189,8 @@ class Api::ProjectsController < Api::ApiController
       xml.qualifier(project.qualifier)
       xml.desc(project.description) if @show_description && project.description
 
-      if @snapshots_by_pid && @snapshots_by_pid[project.id]
-        @snapshots_by_pid[project.id].sort{|s1,s2| s2.version <=> s1.version}.each do |snapshot|
+      if @snapshots_by_puuid && @snapshots_by_puuid[project.uuid]
+        @snapshots_by_puuid[project.id].sort{|s1,s2| s2.version <=> s1.version}.each do |snapshot|
           attributes={:sid => snapshot.id.to_s, :last => snapshot.last?}
           attributes[:date]=Api::Utils.format_datetime(snapshot.created_at) if snapshot.created_at
           xml.version(snapshot.version, attributes)
index 35f9baa870b677303c92695c28cf3c3b1ea2fd20..9be60b5114a26bacf452240983dfaa841c70df4f 100644 (file)
@@ -227,10 +227,10 @@ class Api::ResourcesController < Api::ApiController
 
       # ---------- PREPARE RESPONSE
       resource_by_sid={}
-      snapshots_by_rid={}
+      snapshots_by_uuid={}
       snapshots_including_resource.each do |snapshot|
         resource_by_sid[snapshot.id]=snapshot.project
-        snapshots_by_rid[snapshot.project_id]=snapshot
+        snapshots_by_uuid[snapshot.component_uuid]=snapshot
       end
 
 
@@ -248,7 +248,7 @@ class Api::ResourcesController < Api::ApiController
       sorted_resources=sorted_resources.uniq.compact
 
       # ---------- FORMAT RESPONSE
-      objects={:sorted_resources => sorted_resources, :snapshots_by_rid => snapshots_by_rid, :measures_by_sid => measures_by_sid, :params => params}
+      objects={:sorted_resources => sorted_resources, :snapshots_by_uuid => snapshots_by_uuid, :measures_by_sid => measures_by_sid, :params => params}
       respond_to do |format|
         format.json { render :json => jsonp(to_json(objects)) }
         format.xml { render :xml => to_xml(objects) }
@@ -277,13 +277,13 @@ class Api::ResourcesController < Api::ApiController
 
   def to_json(objects)
     resources = objects[:sorted_resources]
-    snapshots_by_rid = objects[:snapshots_by_rid]
+    snapshots_by_uuid = objects[:snapshots_by_uuid]
     measures_by_sid = objects[:measures_by_sid]
     params = objects[:params]
 
     result=[]
     resources.each do |resource|
-      snapshot=snapshots_by_rid[resource.id]
+      snapshot=snapshots_by_uuid[resource.uuid]
       result<<resource_to_json(resource, snapshot, measures_by_sid[snapshot.id], params)
     end
     result
index 746e1a32418a18113a0c31634b20bfa4c0f6ac15..4a3f6ac09a9bcbbeffe87f3955434ba032cb8697 100644 (file)
@@ -68,8 +68,8 @@ class Api::TimemachineController < Api::ApiController
       @measures_by_sid={}
 
       unless @metrics.empty?
-        sql_conditions = ['snapshots.project_id=:rid AND snapshots.status=:status AND project_measures.person_id IS NULL']
-        sql_values = {:rid => @resource.id, :status => Snapshot::STATUS_PROCESSED}
+        sql_conditions = ['snapshots.component_uuid=:rid AND snapshots.status=:status AND project_measures.person_id IS NULL']
+        sql_values = {:rid => @resource.uuid, :status => Snapshot::STATUS_PROCESSED}
 
         if params[:fromDateTime]
           from = parse_datetime(params[:fromDateTime])
index 169e153b56a4ca54c6c4e193802a5432f14d93c1..16fbb908651bc7e9bd1f509a323087200d318cd3 100644 (file)
@@ -221,7 +221,7 @@ class ProjectController < ApplicationController
     end
 
     @snapshot=@project.last_snapshot
-    @snapshots = Snapshot.all(:conditions => ["status='P' AND project_id=?", @project.id],
+    @snapshots = Snapshot.all(:conditions => ["status='P' AND component_uuid=?", @project.uuid],
                               :include => 'events', :order => 'snapshots.created_at DESC')
   end
 
@@ -320,7 +320,7 @@ class ProjectController < ApplicationController
       end
     end
 
-    redirect_to :action => 'history', :id => snapshot.root_project_id
+    redirect_to :action => 'history', :id => snapshot.root_project.id
   end
 
   def delete_version
@@ -329,7 +329,7 @@ class ProjectController < ApplicationController
     access_denied unless is_admin?(parent_snapshot)
 
     # We update all the related snapshots to have the same version as the next snapshot
-    next_snapshot = Snapshot.find(:first, :conditions => ['created_at>? and project_id=?', parent_snapshot.created_at.to_i*1000, parent_snapshot.project_id], :order => 'created_at asc')
+    next_snapshot = Snapshot.find(:first, :conditions => ['created_at>? and component_uuid=?', parent_snapshot.created_at.to_i*1000, parent_snapshot.component_uuid], :order => 'created_at asc')
     snapshots = find_project_snapshots(parent_snapshot.id)
     snapshots.each do |snapshot|
       snapshot.version = next_snapshot.version
@@ -348,7 +348,7 @@ class ProjectController < ApplicationController
     end
 
     flash[:notice] = message('project_history.version_removed', :params => h(old_version_name))
-    redirect_to :action => 'history', :id => parent_snapshot.root_project_id
+    redirect_to :action => 'history', :id => parent_snapshot.root_project.id
   end
 
   def create_event
@@ -371,7 +371,7 @@ class ProjectController < ApplicationController
       flash[:notice] = message('project_history.event_created', :params => h(params[:event_name]))
     end
 
-    redirect_to :action => 'history', :id => snapshot.project_id
+    redirect_to :action => 'history', :id => snapshot.project.id
   end
 
   def update_event
index b9d1b345cf75903b47ff8a5e3d92c8bfb515848e..6133eaead1e64dfad73ab52e27b391781771495e 100644 (file)
@@ -70,7 +70,7 @@ class Event < ActiveRecord::Base
   #
   def self.already_exists(snapshot_id, event_name, event_category)
     snapshot = Snapshot.find(snapshot_id.to_i)
-    snapshots = Snapshot.find(:all, :conditions => ["status='P' AND project_id=?", snapshot.project_id], :include => 'events')
+    snapshots = Snapshot.find(:all, :conditions => ["status='P' AND component_uuid=?", snapshot.component_uuid], :include => 'events')
     snapshots.each do |snapshot|
       snapshot.events.each do |event|
         return true if event.name==event_name && event.category==event_category
@@ -82,6 +82,6 @@ class Event < ActiveRecord::Base
   
   def populate_snapshot
     self.created_at=DateTime.now unless self.created_at
-    self.snapshot=Snapshot.snapshot_by_date(resource_id, event_date) unless self.snapshot
+    self.snapshot=Snapshot.snapshot_by_date(snapshot.uuid, event_date) unless self.snapshot
   end
 end
index ad9713b3dbeff745d04c9b528c4fc408a1ac7f55..2a24b78060e0b97a7869863c1ecb623965481813 100644 (file)
@@ -287,15 +287,11 @@ class MeasureFilter < ActiveRecord::Base
       end
 
       if require_links?
-        project_ids = []
         project_uuids = []
-        project_id_by_uuid = {}
-        rows_by_project_id = {}
+        rows_by_project_uuid = {}
         snapshots.each do |snapshot|
-          project_ids << snapshot.project_id
-          project_uuids << snapshot.project.uuid
-          project_id_by_uuid[snapshot.project.uuid] = snapshot.project_id
-          rows_by_project_id[snapshot.project_id] = rows_by_snapshot_id[snapshot.id]
+          project_uuids << snapshot.component_uuid
+          rows_by_project_uuid[snapshot.component_uuid] = rows_by_snapshot_id[snapshot.id]
         end
 
         links = []
@@ -303,7 +299,7 @@ class MeasureFilter < ActiveRecord::Base
           links.concat(ProjectLink.all(:conditions => {:component_uuid => safe_for_oracle_uuids}, :order => 'link_type'))
         end
         links.each do |link|
-          rows_by_project_id[project_id_by_uuid[link.component_uuid]].add_link(link)
+          rows_by_project_uuid[link.component_uuid].add_link(link)
         end
       end
     end
index 668c75ebd46c2dc5b1e5c9b88890c767e9430561..b3c0ec0dbc355af67ff8b38d135450ffd9325124 100644 (file)
@@ -21,8 +21,8 @@ class Project < ActiveRecord::Base
   include Comparable
   include Resourceable
 
-  has_many :snapshots
-  has_many :processed_snapshots, :class_name => 'Snapshot', :conditions => "status='#{Snapshot::STATUS_PROCESSED}' AND qualifier<>'LIB'", :order => 'created_at asc'
+  has_many :snapshots, :class_name => 'Snapshot', :foreign_key => 'component_uuid', :primary_key => 'uuid'
+  has_many :processed_snapshots, :class_name => 'Snapshot', :foreign_key => 'component_uuid', :primary_key => 'uuid', :conditions => "status='#{Snapshot::STATUS_PROCESSED}' AND qualifier<>'LIB'", :order => 'created_at asc'
   has_many :events, :foreign_key => 'component_uuid', :primary_key => 'uuid', :order => 'event_date DESC'
   has_many :project_links, :foreign_key => 'component_uuid', :primary_key => 'uuid', :dependent => :delete_all, :order => 'link_type'
   has_many :user_roles, :foreign_key => 'resource_id'
@@ -108,7 +108,7 @@ class Project < ActiveRecord::Base
   def last_snapshot
     @last_snapshot ||=
       begin
-        snapshot=Snapshot.first(:conditions => {:islast => true, :project_id => id})
+        snapshot=Snapshot.first(:conditions => {:islast => true, :component_uuid => uuid})
         if snapshot
           snapshot.project=self
         end
@@ -146,7 +146,7 @@ class Project < ActiveRecord::Base
                                          ' from project_measures m, snapshots s ' +
                                          ' where s.id=m.snapshot_id and ' +
                                          " s.status='%s' and " +
-                                         ' s.project_id=%s and m.metric_id=%s ', 'P', self.id, metric_id]) +
+                                         ' s.component_uuid=%s and m.metric_id=%s ', 'P', self.uuid, metric_id]) +
       ' and m.person_id IS NULL' +
       ' order by s.created_at'
     create_chart_measures(Project.connection.select_all(sql), 'created_at', 'value')
index f929f119e6f868ec79040b9616cb7004ef598d5d..9d17cfe325e082a7afb8a44109fa212bf3dd184a 100644 (file)
@@ -21,8 +21,8 @@ class Snapshot < ActiveRecord::Base
   include Resourceable
   acts_as_tree :foreign_key => 'parent_snapshot_id'
 
-  belongs_to :project
-  belongs_to :root_project, :class_name => 'Project', :foreign_key => 'root_project_id'
+  belongs_to :project, :class_name => 'Project', :foreign_key => 'component_uuid',:primary_key => 'uuid'
+  belongs_to :root_project, :class_name => 'Project', :foreign_key => 'root_component_uuid',:primary_key => 'uuid'
   belongs_to :parent_snapshot, :class_name => 'Snapshot', :foreign_key => 'parent_snapshot_id'
   belongs_to :root_snapshot, :class_name => 'Snapshot', :foreign_key => 'root_snapshot_id'
 
@@ -75,7 +75,7 @@ class Snapshot < ActiveRecord::Base
     #   2. project B, which depends on A 1.0, is analyzed -> new snapshot A 1.0 with qualifier LIB.
     #   3. project A has 2 snapshots : the first one with qualifier=TRK has measures, the second one with qualifier LIB has no measures. Its version must not be used in time machine
     # That's why the 2 following SQL requests check the qualifiers (and optionally scopes, just to be sure)
-    snapshots=Snapshot.find(:all, :conditions => ["snapshots.project_id=? AND events.snapshot_id=snapshots.id AND snapshots.status=? AND snapshots.scope=? AND snapshots.qualifier=?", resource.id, STATUS_PROCESSED, resource.scope, resource.qualifier],
+    snapshots=Snapshot.find(:all, :conditions => ["snapshots.component_uuid=? AND events.snapshot_id=snapshots.id AND snapshots.status=? AND snapshots.scope=? AND snapshots.qualifier=?", resource.uuid, STATUS_PROCESSED, resource.scope, resource.qualifier],
                             :include => 'events',
                             :order => 'snapshots.created_at ASC')
 
@@ -84,7 +84,7 @@ class Snapshot < ActiveRecord::Base
     snapshots=snapshots[-5, 5] if snapshots.size>=5
 
     snapshots.insert(0, Snapshot.find(:first,
-                                      :conditions => ["project_id=? AND status=? AND scope=? AND qualifier=?", resource.id, STATUS_PROCESSED, resource.scope, resource.qualifier],
+                                      :conditions => ["component_uuid=? AND status=? AND scope=? AND qualifier=?", resource.uuid, STATUS_PROCESSED, resource.scope, resource.qualifier],
                                       :include => 'project', :order => 'snapshots.created_at ASC', :limit => 1))
 
     snapshots.compact.uniq
@@ -97,7 +97,7 @@ class Snapshot < ActiveRecord::Base
     end
 
     # Get 1rst & latests snapshots of the period
-    snapshot_conditions = ["snapshots.project_id=? AND snapshots.status=? AND snapshots.scope=? AND snapshots.qualifier=?", resource.id, STATUS_PROCESSED, resource.scope, resource.qualifier]
+    snapshot_conditions = ["snapshots.component_uuid=? AND snapshots.status=? AND snapshots.scope=? AND snapshots.qualifier=?", resource.uuid, STATUS_PROCESSED, resource.scope, resource.qualifier]
     if options[:from]
       snapshot_conditions[0] += " AND snapshots.created_at>=?"
       snapshot_conditions << options[:from].to_i * 1000
@@ -196,9 +196,9 @@ class Snapshot < ActiveRecord::Base
     nil
   end
 
-  def self.snapshot_by_date(resource_id, date)
-    if resource_id && date
-      Snapshot.find(:first, :conditions => ['created_at>=? and created_at<? and project_id=?', date.beginning_of_day.to_i*1000, date.end_of_day.to_i*1000, resource_id], :order => 'created_at desc')
+  def self.snapshot_by_date(resource_uuid, date)
+    if resource_uuid && date
+      Snapshot.find(:first, :conditions => ['created_at>=? and created_at<? and component_uuid=?', date.beginning_of_day.to_i*1000, date.end_of_day.to_i*1000, resource_uuid], :order => 'created_at desc')
     else
       nil
     end
@@ -209,7 +209,7 @@ class Snapshot < ActiveRecord::Base
   end
 
   def resource_id
-    project_id
+    project.id
   end
 
   def periods?
@@ -217,7 +217,7 @@ class Snapshot < ActiveRecord::Base
   end
 
   def resource_id_for_authorization
-    root_project_id || project_id
+    root_project.id
   end
 
   def path_name
index 0780981546edefb6977aafedb5b07ab1079caf51..f681c28b3d7e4badb1d1029d8c49147638cda8fa 100644 (file)
@@ -24,9 +24,9 @@ class TrendsChart
       sql= "select s.created_at as created_at, m.value as value, m.metric_id as metric_id, s.id as sid " +
             " from project_measures m LEFT OUTER JOIN snapshots s ON s.id=m.snapshot_id " +
             " where s.status=? " +
-            " and s.project_id=? " +
+            " and s.component_uuid=? " +
             " and m.metric_id in (?) " +
-            " and  m.person_id is null"
+            " and m.person_id is null"
       if (options[:from])
         sql += ' and s.created_at>=?'
       end
@@ -34,7 +34,7 @@ class TrendsChart
         sql += ' and s.created_at<=?'
       end
       sql += ' order by s.created_at ASC'
-      conditions=[sql, Snapshot::STATUS_PROCESSED, resource.id, metric_ids]
+      conditions=[sql, Snapshot::STATUS_PROCESSED, resource.uuid, metric_ids]
       if (options[:from])
         conditions<<options[:from].to_i*1000
       end
index b93717e1e1f6cff6c00d719de089cc149c97c9a7..a8a49a0ac291f866fb2927dbccbe42fe4cc70955 100644 (file)
@@ -60,10 +60,10 @@ public class ResourceIndexDao extends AbstractDao {
   /**
    * This method is reentrant. It can be executed even if the project is already indexed.
    */
-  public ResourceIndexDao indexProject(final long rootProjectId) {
+  public ResourceIndexDao indexProject(String rootComponentUuid) {
     DbSession session = myBatis().openSession(true);
     try {
-      indexProject(session, rootProjectId);
+      indexProject(session, rootComponentUuid);
       session.commit();
       return this;
 
@@ -72,18 +72,18 @@ public class ResourceIndexDao extends AbstractDao {
     }
   }
 
-  public void indexProject(DbSession session, final long rootProjectId) {
+  public void indexProject(DbSession session, String rootComponentUuid) {
     ResourceIndexMapper mapper = session.getMapper(ResourceIndexMapper.class);
-    doIndexProject(session, rootProjectId, mapper);
+    doIndexProject(session, rootComponentUuid, mapper);
   }
 
-  private void doIndexProject(DbSession session, long rootProjectId, final ResourceIndexMapper mapper) {
+  private void doIndexProject(DbSession session, String rootProjectUuid, final ResourceIndexMapper mapper) {
     // non indexed resources
     ResourceIndexQuery query = ResourceIndexQuery.create()
       .setNonIndexedOnly(true)
       .setQualifiers(NOT_RENAMABLE_QUALIFIERS)
       .setScopes(NOT_RENAMABLE_SCOPES)
-      .setRootProjectId(rootProjectId);
+      .setRootComponentUuid(rootProjectUuid);
 
     session.select(SELECT_RESOURCES, query, context -> {
       ResourceDto resource = (ResourceDto) context.getResultObject();
@@ -96,7 +96,7 @@ public class ResourceIndexDao extends AbstractDao {
       .setNonIndexedOnly(false)
       .setQualifiers(RENAMABLE_QUALIFIERS)
       .setScopes(RENAMABLE_SCOPES)
-      .setRootProjectId(rootProjectId);
+      .setRootComponentUuid(rootProjectUuid);
 
     session.select(SELECT_RESOURCES, query, context -> {
       ResourceDto resource = (ResourceDto) context.getResultObject();
index 19b513375b301862416e29541b4ab4ee0e64876b..589b9d3f58f1240e86c1a646bcb3a3a04277fc29 100644 (file)
@@ -20,7 +20,7 @@
 package org.sonar.db.component;
 
 final class ResourceIndexQuery {
-  private long rootProjectId;
+  private String rootComponentUuid;
   private String[] scopes = null;
   private String[] qualifiers = null;
   private boolean nonIndexedOnly = false;
@@ -50,12 +50,12 @@ final class ResourceIndexQuery {
     return this;
   }
 
-  public long getRootProjectId() {
-    return rootProjectId;
+  public String getRootComponentUuid() {
+    return rootComponentUuid;
   }
 
-  public ResourceIndexQuery setRootProjectId(long i) {
-    this.rootProjectId = i;
+  public ResourceIndexQuery setRootComponentUuid(String rootComponentUuid) {
+    this.rootComponentUuid = rootComponentUuid;
     return this;
   }
 
index 32ed246eada17105b9f968fc3561c304a41e5573..a77f240dad353533595e804ef05737360eb53f5b 100644 (file)
@@ -52,16 +52,6 @@ public interface ResourceMapper {
    */
   void selectResources(ResourceQuery query, ResultHandler resultHandler);
 
-  /**
-   * @since 3.6
-   */
-  ResourceDto selectRootProjectByComponentKey(@Param("componentKey") String componentKey);
-
-  /**
-   * @since 3.6
-   */
-  ResourceDto selectRootProjectByComponentId(@Param("componentId") long componentId);
-
   List<ResourceDto> selectProjectsIncludingNotCompletedOnesByQualifiers(@Param("qualifiers") Collection<String> qualifier);
 
   List<ResourceDto> selectProjectsByQualifiers(@Param("qualifiers") Collection<String> qualifier);
index 2fd248d7c52f327ad32c64fb0b2b34256c888674..bacf8898f32000244a35bcf0c0aaa8657783259e 100644 (file)
@@ -59,18 +59,14 @@ public class SnapshotDao implements Dao {
   }
 
   @CheckForNull
-  public SnapshotDto selectLastSnapshotByComponentId(DbSession session, long componentId) {
-    return mapper(session).selectLastSnapshot(componentId);
+  public SnapshotDto selectLastSnapshotByComponentUuid(DbSession session, String componentUuid) {
+    return mapper(session).selectLastSnapshot(componentUuid);
   }
 
   public boolean hasLastSnapshotByComponentUuid(DbSession session, String componentUUid) {
     return mapper(session).countLastSnapshotByComponentUuid(componentUUid) > 0;
   }
 
-  public List<SnapshotDto> selectSnapshotsByComponentId(DbSession session, long componentId) {
-    return mapper(session).selectSnapshotsByQuery(new SnapshotQuery().setComponentId(componentId));
-  }
-
   public List<SnapshotDto> selectSnapshotsByQuery(DbSession session, SnapshotQuery query) {
     return mapper(session).selectSnapshotsByQuery(query);
   }
@@ -85,13 +81,13 @@ public class SnapshotDao implements Dao {
     return snapshotDtos.get(0);
   }
 
-  public List<SnapshotDto> selectPreviousVersionSnapshots(DbSession session, long componentId, String lastVersion) {
-    return mapper(session).selectPreviousVersionSnapshots(componentId, lastVersion);
+  public List<SnapshotDto> selectPreviousVersionSnapshots(DbSession session, String componentUuid, String lastVersion) {
+    return mapper(session).selectPreviousVersionSnapshots(componentUuid, lastVersion);
   }
 
   @CheckForNull
-  public SnapshotDto selectOldestSnapshot(DbSession session, long componentId) {
-    List<SnapshotDto> snapshotDtos = mapper(session).selectOldestSnapshots(componentId, new RowBounds(0, 1));
+  public SnapshotDto selectOldestSnapshot(DbSession session, String componentUuid) {
+    List<SnapshotDto> snapshotDtos = mapper(session).selectOldestSnapshots(componentUuid, new RowBounds(0, 1));
     return snapshotDtos.isEmpty() ? null : snapshotDtos.get(0);
   }
 
@@ -130,18 +126,16 @@ public class SnapshotDao implements Dao {
     insert(session, Lists.asList(item, others));
   }
 
+  /**
+   * Used by Governance
+   */
   @CheckForNull
-  public ViewsSnapshotDto selectSnapshotBefore(long componentId, long date, DbSession dbSession) {
-    return from(mapper(dbSession).selectSnapshotBefore(componentId, date))
+  public ViewsSnapshotDto selectSnapshotBefore(String componentUuid, long date, DbSession dbSession) {
+    return from(mapper(dbSession).selectSnapshotBefore(componentUuid, date))
       .first()
       .orNull();
   }
 
-  @CheckForNull
-  public ViewsSnapshotDto selectLatestSnapshot(long componentId, DbSession dbSession) {
-    return mapper(dbSession).selectLatestSnapshot(componentId);
-  }
-
   private static SnapshotMapper mapper(DbSession session) {
     return session.getMapper(SnapshotMapper.class);
   }
index 74c66297dbdebd330ffb89620e1da26b2b2e4f80..a70f75b0e77b50d104eed006324ea49d95b7bbc3 100644 (file)
@@ -35,11 +35,12 @@ public final class SnapshotDto {
   private Long id;
   private Long parentId;
   private Long rootId;
-  private Long rootProjectId;
+
+  private String rootComponentUuid;
+  private String componentUuid;
 
   private Long createdAt;
   private Long buildDate;
-  private Long componentId;
   private String status = STATUS_UNPROCESSED;
   private Integer purgeStatus;
   private Boolean last;
@@ -108,12 +109,21 @@ public final class SnapshotDto {
     return this;
   }
 
-  public Long getComponentId() {
-    return componentId;
+  public String getRootComponentUuid() {
+    return rootComponentUuid;
+  }
+
+  public SnapshotDto setRootComponentUuid(String rootComponentUuid) {
+    this.rootComponentUuid = rootComponentUuid;
+    return this;
+  }
+
+  public String getComponentUuid() {
+    return componentUuid;
   }
 
-  public SnapshotDto setComponentId(Long componentId) {
-    this.componentId = componentId;
+  public SnapshotDto setComponentUuid(String componentUuid) {
+    this.componentUuid = componentUuid;
     return this;
   }
 
@@ -198,15 +208,6 @@ public final class SnapshotDto {
     return this;
   }
 
-  public Long getRootProjectId() {
-    return rootProjectId;
-  }
-
-  public SnapshotDto setRootProjectId(Long rootProjectId) {
-    this.rootProjectId = rootProjectId;
-    return this;
-  }
-
   public SnapshotDto setPeriodMode(int index, @Nullable String p) {
     switch (index) {
       case 1:
index 67d3e10897a0fdd2232549a96e32bb38a8bfced8..3e79e7b7f05cf28951009ae294ae55a36fadd6fe 100644 (file)
@@ -27,8 +27,8 @@ public class SnapshotDtoFunctions {
     return ToId.INSTANCE;
   }
 
-  public static Function<SnapshotDto, Long> toComponentId() {
-    return ToComponentId.INSTANCE;
+  public static Function<SnapshotDto, String> toComponentUuid() {
+    return SnapshotDto::getComponentUuid;
   }
 
   private enum ToId implements Function<SnapshotDto, Long> {
@@ -40,14 +40,4 @@ public class SnapshotDtoFunctions {
     }
   }
 
-  private enum ToComponentId implements Function<SnapshotDto, Long> {
-    INSTANCE;
-
-    @Override
-    public Long apply(@Nonnull SnapshotDto input) {
-      return input.getComponentId();
-    }
-  }
-
-
 }
index b8a0ff6bab9764da667d2dbb171cbd8e9d66a01e..2082e241f7c73eb1f44648ef50b3d1ca9ac35dd4 100644 (file)
@@ -34,28 +34,24 @@ public interface SnapshotMapper {
   void insert(SnapshotDto snapshot);
 
   @CheckForNull
-  SnapshotDto selectLastSnapshot(Long resourceId);
+  SnapshotDto selectLastSnapshot(@Param("componentUuid") String componentUuid);
 
   int countLastSnapshotByComponentUuid(String componentUuid);
 
-  @CheckForNull
-  SnapshotDto selectLastSnapshotByComponentUuid(String componentUuid);
-
   List<SnapshotDto> selectSnapshotsByQuery(@Param("query") SnapshotQuery query);
 
-  List<SnapshotDto> selectPreviousVersionSnapshots(@Param(value = "componentId") Long componentId, @Param(value = "lastVersion") String lastVersion);
+  List<SnapshotDto> selectPreviousVersionSnapshots(@Param("componentUuid") String componentUuid, @Param("lastVersion") String lastVersion);
 
-  List<SnapshotDto> selectOldestSnapshots(@Param(value = "componentId") Long componentId, RowBounds rowBounds);
+  List<SnapshotDto> selectOldestSnapshots(@Param("componentUuid") String componentUuid, RowBounds rowBounds);
 
-  List<SnapshotDto> selectSnapshotAndChildrenOfScope(@Param(value = "snapshot") Long resourceId, @Param(value = "scope") String scope);
+  List<SnapshotDto> selectSnapshotAndChildrenOfScope(@Param("snapshot") Long resourceId, @Param("scope") String scope);
 
-  int updateSnapshotAndChildrenLastFlagAndStatus(@Param(value = "root") Long rootId, @Param(value = "pathRootId") Long pathRootId,
-    @Param(value = "path") String path, @Param(value = "isLast") boolean isLast, @Param(value = "status") String status);
+  int updateSnapshotAndChildrenLastFlagAndStatus(@Param("root") Long rootId, @Param("pathRootId") Long pathRootId,
+    @Param("path") String path, @Param("isLast") boolean isLast, @Param("status") String status);
 
-  int updateSnapshotAndChildrenLastFlag(@Param(value = "root") Long rootId, @Param(value = "pathRootId") Long pathRootId,
-    @Param(value = "path") String path, @Param(value = "isLast") boolean isLast);
+  int updateSnapshotAndChildrenLastFlag(@Param("root") Long rootId, @Param("pathRootId") Long pathRootId,
+    @Param("path") String path, @Param("isLast") boolean isLast);
 
-  List<ViewsSnapshotDto> selectSnapshotBefore(@Param("componentId") long componentId, @Param("date") long date);
+  List<ViewsSnapshotDto> selectSnapshotBefore(@Param("componentUuid") String componentUuid, @Param("date") long date);
 
-  ViewsSnapshotDto selectLatestSnapshot(@Param("componentId") long componentId);
 }
index d06492d6afe396b9250c0ca4383bbdc7a8b5b6b8..fca78966f8cc11d122e6d2047b2bd11c5366225c 100644 (file)
@@ -42,7 +42,6 @@ public final class SnapshotQuery {
     }
   }
 
-  private Long componentId;
   private String componentUuid;
   private Long createdAfter;
   private Long createdBefore;
@@ -90,16 +89,6 @@ public final class SnapshotQuery {
     return this;
   }
 
-  @CheckForNull
-  public Long getComponentId() {
-    return componentId;
-  }
-
-  public SnapshotQuery setComponentId(@Nullable Long componentId) {
-    this.componentId = componentId;
-    return this;
-  }
-
   @CheckForNull
   public String getComponentUuid() {
     return componentUuid;
index 214e07aef30d6617330c2ad3062735fe1371d0b8..8dd3c515c927d683ef5e839b6c8e481be3df163b 100644 (file)
@@ -61,8 +61,8 @@ class PurgeCommands {
     // voluntarily grouped by tables in order to benefit from JDBC batch mode.
     // Batch requests can only relate to the same PreparedStatement.
 
-    for (List<Long> partResourceIds : componentIdPartitions) {
-      deleteSnapshots(purgeMapper.selectSnapshotIdsByResource(partResourceIds));
+    for (List<String> componentUuidPartition : componentUuidsPartitions) {
+      deleteSnapshots(purgeMapper.selectSnapshotIdsByResource(componentUuidPartition));
     }
 
     // possible missing optimization: filter requests according to resource scope
index 9d265f0ebda46a5cd5b9928f1adb6bd860b33ab3..403b991e530c7eb541ac2b991af1cc8451894b46 100644 (file)
@@ -103,14 +103,14 @@ public class PurgeDao implements Dao {
     PurgeSnapshotQuery query = PurgeSnapshotQuery.create()
       .setIslast(false)
       .setStatus(UNPROCESSED_STATUS)
-      .setRootProjectId(project.getId());
+      .setRootComponentUuid(project.getUuid());
     commands.deleteSnapshots(query);
   }
 
   private static void purge(ResourceDto project, String[] scopesWithoutHistoricalData, PurgeCommands purgeCommands) {
     List<Long> projectSnapshotIds = purgeCommands.selectSnapshotIds(
       PurgeSnapshotQuery.create()
-        .setResourceId(project.getId())
+        .setComponentUuid(project.getUuid())
         .setIslast(false)
         .setNotPurged(true));
     for (Long projectSnapshotId : projectSnapshotIds) {
@@ -148,19 +148,19 @@ public class PurgeDao implements Dao {
     session.commit();
   }
 
-  public List<PurgeableSnapshotDto> selectPurgeableSnapshots(long resourceId) {
+  public List<PurgeableSnapshotDto> selectPurgeableSnapshots(String componentUuid) {
     DbSession session = mybatis.openSession(true);
     try {
-      return selectPurgeableSnapshots(resourceId, session);
+      return selectPurgeableSnapshots(componentUuid, session);
     } finally {
       MyBatis.closeQuietly(session);
     }
   }
 
-  public List<PurgeableSnapshotDto> selectPurgeableSnapshots(long resourceId, DbSession session) {
+  public List<PurgeableSnapshotDto> selectPurgeableSnapshots(String componentUuid, DbSession session) {
     List<PurgeableSnapshotDto> result = Lists.newArrayList();
-    result.addAll(mapper(session).selectPurgeableSnapshotsWithEvents(resourceId));
-    result.addAll(mapper(session).selectPurgeableSnapshotsWithoutEvents(resourceId));
+    result.addAll(mapper(session).selectPurgeableSnapshotsWithEvents(componentUuid));
+    result.addAll(mapper(session).selectPurgeableSnapshotsWithoutEvents(componentUuid));
     // sort by date
     Collections.sort(result);
     return result;
@@ -181,11 +181,10 @@ public class PurgeDao implements Dao {
   }
 
   private void disableResource(IdUuidPair componentIdUuid, PurgeMapper mapper) {
-    long componentId = componentIdUuid.getId();
     mapper.deleteResourceIndex(Arrays.asList(componentIdUuid.getUuid()));
-    mapper.setSnapshotIsLastToFalse(componentId);
+    mapper.setSnapshotIsLastToFalse(componentIdUuid.getUuid());
     mapper.deleteFileSourcesByUuid(componentIdUuid.getUuid());
-    mapper.disableResource(componentId);
+    mapper.disableResource(componentIdUuid.getId());
     mapper.resolveResourceIssuesNotAlreadyResolved(componentIdUuid.getUuid(), system2.now());
   }
 
index bf3c97cc6dc26cb639e12b45ec33dfd3843a3372..d0f63fe332b9fef5d0e8fa23f15fd13d431c12d7 100644 (file)
@@ -27,7 +27,7 @@ public interface PurgeMapper {
 
   List<Long> selectSnapshotIds(PurgeSnapshotQuery query);
 
-  List<Long> selectSnapshotIdsByResource(@Param("resourceIds") List<Long> resourceIds);
+  List<Long> selectSnapshotIdsByResource(@Param("componentUuids") List<String> componentUuids);
 
   /**
    * Returns the list of components of a project from a project_uuid. The project itself is also returned.
@@ -56,7 +56,7 @@ public interface PurgeMapper {
 
   void deleteEvent(long eventId);
 
-  void setSnapshotIsLastToFalse(long resourceId);
+  void setSnapshotIsLastToFalse(@Param("componentUuid") String componentUuid);
 
   void deleteResourceLinks(@Param("componentUuids") List<String> componentUuids);
 
@@ -74,9 +74,9 @@ public interface PurgeMapper {
 
   void deleteAuthors(@Param("resourceIds") List<Long> resourceIds);
 
-  List<PurgeableSnapshotDto> selectPurgeableSnapshotsWithEvents(long resourceId);
+  List<PurgeableSnapshotDto> selectPurgeableSnapshotsWithEvents(@Param("componentUuid") String componentUuid);
 
-  List<PurgeableSnapshotDto> selectPurgeableSnapshotsWithoutEvents(long resourceId);
+  List<PurgeableSnapshotDto> selectPurgeableSnapshotsWithoutEvents(@Param("componentUuid") String componentUuid);
 
   void deleteComponentIssueChanges(@Param("componentUuids") List<String> componentUuids);
 
index 2827ddd0296908e15ee61f440ef3add23f36762e..52dc9dc42e78dd339847ab360c28cef7ef5b4bb9 100644 (file)
@@ -21,9 +21,9 @@ package org.sonar.db.purge;
 
 public final class PurgeSnapshotQuery {
   private Long id;
-  private Long rootProjectId;
+  private String rootComponentUuid;
   private Long rootSnapshotId;
-  private Long resourceId;
+  private String componentUuid;
   private String[] scopes;
   private String[] qualifiers;
   private String[] status;
@@ -47,12 +47,12 @@ public final class PurgeSnapshotQuery {
     return this;
   }
 
-  public Long getRootProjectId() {
-    return rootProjectId;
+  public String getRootComponentUuid() {
+    return rootComponentUuid;
   }
 
-  public PurgeSnapshotQuery setRootProjectId(Long rootProjectId) {
-    this.rootProjectId = rootProjectId;
+  public PurgeSnapshotQuery setRootComponentUuid(String rootComponentUuid) {
+    this.rootComponentUuid = rootComponentUuid;
     return this;
   }
 
@@ -110,12 +110,12 @@ public final class PurgeSnapshotQuery {
     return this;
   }
 
-  public Long getResourceId() {
-    return resourceId;
+  public String getComponentUuid() {
+    return componentUuid;
   }
 
-  public PurgeSnapshotQuery setResourceId(Long l) {
-    this.resourceId = l;
+  public PurgeSnapshotQuery setComponentUuid(String componentUuid) {
+    this.componentUuid = componentUuid;
     return this;
   }
 
index ac65ae2247a7b5b2d42f9e5ea2d7e1e26949ed40..26de4acd9020d4be11546b1838fd1b51c35ed535 100644 (file)
@@ -42,13 +42,13 @@ public class DefaultPeriodCleaner {
     this.profiler = profiler;
   }
 
-  public void clean(DbSession session, long projectId, Settings settings) {
-    doClean(projectId, new Filters(settings).all(), session);
+  public void clean(DbSession session, String componentUuid, Settings settings) {
+    doClean(componentUuid, new Filters(settings).all(), session);
   }
 
   @VisibleForTesting
-  void doClean(long projectId, List<Filter> filters, DbSession session) {
-    List<PurgeableSnapshotDto> history = selectProjectSnapshots(projectId, session);
+  void doClean(String componentUuid, List<Filter> filters, DbSession session) {
+    List<PurgeableSnapshotDto> history = selectProjectSnapshots(componentUuid, session);
     for (Filter filter : filters) {
       filter.log();
       delete(filter.filter(history), session);
@@ -65,7 +65,7 @@ public class DefaultPeriodCleaner {
     }
   }
 
-  private List<PurgeableSnapshotDto> selectProjectSnapshots(long resourceId, DbSession session) {
-    return purgeDao.selectPurgeableSnapshots(resourceId, session);
+  private List<PurgeableSnapshotDto> selectProjectSnapshots(String componentUuid, DbSession session) {
+    return purgeDao.selectPurgeableSnapshots(componentUuid, session);
   }
 }
index afe8e015818f65d7b23a5f78cbe85caad3f70cb4..297f5a037e1a0cafb898d9bc4dc8c5835d2e128f 100644 (file)
 
   <sql id="sqlSelectByTreeQuery">
     from projects p
-    inner join snapshots s on p.id = s.project_id
+    inner join snapshots s on p.uuid = s.component_uuid
     where
     p.enabled=${_true}
     <if test="query.qualifiers!=null">
   </select>
 
   <sql id="provisionClauses">
-    left join snapshots s on s.project_id=p.id
+    left join snapshots s on s.component_uuid=p.uuid
     where
     s.id is null
     and p.enabled=${_true}
   </select>
 
   <sql id="ghostClauses">
-    inner join snapshots s1 on s1.project_id = p.id and s1.status='U'
-    left join snapshots s2 on s2.project_id = p.id and s2.status='P'
+    inner join snapshots s1 on s1.component_uuid = p.uuid and s1.status='U'
+    left join snapshots s2 on s2.component_uuid = p.uuid and s2.status='P'
     where
     s2.id is null
     and p.qualifier=#{qualifier}
index 15c1c98568c82b1af131951ce9342b62c410d7e0..de993ded498aa0b45197e416e6c29c23eafb70fc 100644 (file)
@@ -24,7 +24,7 @@
     <where>
       p.enabled=${_true}
       and p.copy_resource_id is null
-      and p.id=s.project_id
+      and p.uuid=s.component_uuid
       and s.islast=${_true}
       <if test="scopes != null">
         and p.scope in
         <foreach item="qualifier" index="index" collection="qualifiers" open="(" separator="," close=")">#{qualifier}
         </foreach>
       </if>
-      <if test="rootProjectId != null">
-        and s.root_project_id=#{rootProjectId}
+      <if test="rootComponentUuid != null">
+        and s.root_component_uuid=#{rootComponentUuid}
       </if>
       <if test="nonIndexedOnly">
         and not exists(select * from resource_index ri where ri.component_uuid=p.uuid)
       </if>
-      and root.id = s.root_project_id
+      and root.uuid = s.root_component_uuid
     </where>
     order by p.id
   </select>
index 0816902334c7b467102f876adbcd365bba37f9e6..ef0fce32d24b3757bc0ac242a8a57623fa64a262 100644 (file)
@@ -9,7 +9,7 @@
     <result property="rootId" column="root_snapshot_id"/>
     <result property="createdAt" column="created_at"/>
     <result property="buildDate" column="build_date"/>
-    <result property="componentId" column="project_id"/>
+    <result property="componentUuid" column="component_uuid"/>
     <result property="status" column="status"/>
     <result property="purgeStatus" column="purge_status"/>
     <result property="last" column="islast"/>
@@ -18,7 +18,7 @@
     <result property="version" column="version"/>
     <result property="path" column="path"/>
     <result property="depth" column="depth"/>
-    <result property="rootProjectId" column="root_project_id"/>
+    <result property="rootComponentUuid" column="root_component_uuid"/>
     <result property="period1Mode" column="period1_mode"/>
     <result property="period2Mode" column="period2_mode"/>
     <result property="period3Mode" column="period3_mode"/>
 
   <select id="selectLastSnapshotByResourceKey" parameterType="string" resultMap="snapshotResultMap">
     SELECT s.* FROM snapshots s
-    INNER JOIN projects p on p.id=s.project_id AND p.enabled=${_true} AND p.copy_resource_id IS NULL
+    INNER JOIN projects p on p.uuid=s.component_uuid AND p.enabled=${_true} AND p.copy_resource_id IS NULL
     <where>
       AND p.kee=#{id}
       AND s.islast=${_true}
 
   <select id="selectLastSnapshotByResourceUuid" parameterType="string" resultMap="snapshotResultMap">
     SELECT s.* from snapshots s
-    INNER JOIN projects p on p.id=s.project_id AND p.enabled=${_true} AND p.copy_resource_id IS NULL
+    INNER JOIN projects p on p.uuid=s.component_uuid AND p.enabled=${_true} AND p.copy_resource_id IS NULL
     <where>
       AND p.uuid=#{uuid}
       AND s.islast=${_true}
     </where>
   </select>
 
-  <select id="selectRootProjectByComponentKey" parameterType="string" resultMap="resourceResultMap">
-    select rootProject.*
-    from projects p
-    inner join snapshots s on s.project_id=p.id and s.islast=${_true}
-    inner join projects rootProject on rootProject.id=s.root_project_id
-    <where>
-      and p.kee=#{componentKey}
-    </where>
-  </select>
-
-  <select id="selectRootProjectByComponentId" parameterType="long" resultMap="resourceResultMap">
-    select rootProject.*
-    from snapshots s
-    inner join projects rootProject on rootProject.id=s.root_project_id
-    where
-    s.project_id=#{componentId}
-    and s.islast=${_true}
-  </select>
-
   <select id="selectProjectsIncludingNotCompletedOnesByQualifiers" parameterType="map" resultMap="resourceResultMap">
     select * from projects p
     <where>
 
   <sql id="selectProjectsByQualifiersQuery">
     select p.* from projects p
-    inner join snapshots s on s.project_id=p.id
+    inner join snapshots s on s.component_uuid=p.uuid
     <where>
       <if test="qualifiers != null and qualifiers.size() > 0">
         and
 
   <select id="selectGhostsProjects" parameterType="map" resultMap="resourceResultMap">
     select distinct p.* from projects p
-    inner join snapshots s1 on s1.project_id = p.id and s1.status='U'
-    left join snapshots s2 on s2.project_id = p.id and s2.status='P'
+    inner join snapshots s1 on s1.component_uuid = p.uuid and s1.status='U'
+    left join snapshots s2 on s2.component_uuid = p.uuid and s2.status='P'
     <where>
       and s2.id is null
       <if test="qualifiers != null and qualifiers.size() > 0">
 
   <select id="selectProvisionedProjects" parameterType="map" resultMap="resourceResultMap">
     select p.* from projects p
-    left join snapshots s on s.project_id=p.id
+    left join snapshots s on s.component_uuid=p.uuid
     <where>
       and s.id is null
       <if test="qualifiers != null and qualifiers.size() > 0">
 
   <select id="selectProvisionedProject" parameterType="string" resultMap="resourceResultMap">
     select p.* from projects p
-    left join snapshots s on s.project_id=p.id
+    left join snapshots s on s.component_uuid=p.uuid
     where s.id is null
     and p.kee = #{key}
     and p.copy_resource_id is null
index 1cc4b2aff962ec0048349b71caba94a878c9bd2c..1b9704deddc799910ed66920778e7777f092ef79 100644 (file)
@@ -6,8 +6,8 @@
     s.id,
     s.parent_snapshot_id as parentId,
     s.root_snapshot_id as rootId,
-    s.root_project_id as rootProjectId,
-    s.project_id as componentId,
+    s.root_component_uuid as rootComponentUuid,
+    s.component_uuid as componentUuId,
     s.created_at as createdAt,
     s.build_date as buildDate,
     s.status as status,
     select
     <include refid="snapshotColumns"/>
     from snapshots s
-    where s.islast=${_true} and s.project_id = #{resource}
+    where s.islast=${_true} and s.component_uuid = #{componentUuid}
   </select>
 
   <select id="countLastSnapshotByComponentUuid" resultType="Integer">
     SELECT count(1)
     FROM snapshots s
-    INNER JOIN projects p ON p.id=s.project_id AND p.uuid=#{componentUuid}
     <where>
+      s.component_uuid=#{componentUuid}
       AND s.islast=${_true}
     </where>
   </select>
     <include refid="snapshotColumns"/>
     FROM snapshots s
     <if test="query.componentUuid != null">
-      INNER JOIN projects p ON p.id=s.project_id AND p.uuid=#{query.componentUuid} AND p.enabled=${_true}
+      INNER JOIN projects p ON p.uuid=s.component_uuid AND p.enabled=${_true} AND s.component_uuid=#{query.componentUuid}
     </if>
     <where>
-      <if test="query.componentId != null">
-        AND s.project_id=#{query.componentId}
-      </if>
       <if test="query.scope != null">
         AND s.scope=#{query.scope}
       </if>
     FROM snapshots s
     INNER JOIN events e ON s.id = e.snapshot_id AND e.name &lt;&gt; #{lastVersion} AND e.category='Version'
     <where>
-      s.project_id=#{componentId}
+      s.component_uuid=#{componentUuid}
     </where>
     ORDER BY e.event_date DESC
   </select>
     <include refid="snapshotColumns"/>
     FROM snapshots s
     <where>
-      s.project_id=#{componentId}
+      s.component_uuid=#{componentUuid}
     </where>
     ORDER BY s.created_at ASC
   </select>
     <include refid="viewsSnapshotColumns"/>
     FROM snapshots s
     <where>
-      and s.project_id = #{componentId}
+      and s.component_uuid = #{componentUuid}
       and s.status = 'P'
       and s.created_at &lt; #{date}
     </where>
     order by created_at desc
   </select>
 
-  <select id="selectLatestSnapshot" resultType="ViewsSnapshot">
-    SELECT
-    <include refid="viewsSnapshotColumns"/>
-    FROM snapshots s
-    <where>
-      and s.project_id = #{componentId}
-      and s.status = 'P'
-      and s.islast = ${_true}
-    </where>
-  </select>
-
   <sql id="insertColumns">
-    (parent_snapshot_id, root_snapshot_id, root_project_id, project_id, created_at, build_date, status, purge_status,
+    (parent_snapshot_id, root_snapshot_id, root_component_uuid, component_uuid, created_at, build_date, status, purge_status,
     islast, scope, qualifier, version, path, depth,
     period1_mode, period2_mode, period3_mode, period4_mode, period5_mode,
     period1_param, period2_param, period3_param, period4_param, period5_param,
   <insert id="insert" parameterType="Snapshot" keyColumn="id" useGeneratedKeys="true" keyProperty="id">
     insert into snapshots
     <include refid="insertColumns"/>
-    values (#{parentId}, #{rootId}, #{rootProjectId}, #{componentId}, #{createdAt}, #{buildDate}, #{status},
+    values (#{parentId}, #{rootId}, #{rootComponentUuid}, #{componentUuid}, #{createdAt}, #{buildDate}, #{status},
     #{purgeStatus}, #{last}, #{scope}, #{qualifier}, #{version}, #{path}, #{depth},
     #{period1Mode}, #{period2Mode}, #{period3Mode}, #{period4Mode}, #{period5Mode},
     #{period1Param}, #{period2Param}, #{period3Param}, #{period4Param}, #{period5Param},
index af67fef05842f11dcd585c0a7dd080858c31bcf8..b1ce10e4069a5c6bdb5240b896a9668c8bba15a2 100644 (file)
@@ -15,7 +15,7 @@
     file_component.kee as componentKey
     FROM duplications_index duplication_block
     INNER JOIN snapshots snapshot ON duplication_block.snapshot_id=snapshot.id AND snapshot.islast=${_true}
-    INNER JOIN projects file_component ON file_component.id=snapshot.project_id AND file_component.language=#{language}
+    INNER JOIN projects file_component ON file_component.uuid=snapshot.component_uuid AND file_component.language=#{language}
     AND file_component.enabled=${_true}
     <where>
       AND duplication_block.hash in
index eb938f119ba986b03eb91bc74517d9f2bdc91a97..90c5a3dde465dd326ef86b00056d752930b18632 100644 (file)
@@ -29,7 +29,7 @@
     <include refid="extendedMeasureColumns"/>
     FROM project_measures pm
     INNER JOIN snapshots s ON s.id=pm.snapshot_id AND s.islast=${_true}
-    INNER JOIN projects p ON p.id=s.project_id AND p.enabled=${_true}
+    INNER JOIN projects p ON p.uuid=s.component_uuid AND p.enabled=${_true}
     INNER JOIN metrics metric ON metric.id=pm.metric_id
     <where>
       AND p.kee = #{componentKey}
@@ -43,7 +43,7 @@
     <include refid="extendedMeasureColumns"/>
     FROM project_measures pm
     INNER JOIN snapshots s ON s.id=pm.snapshot_id AND s.islast=${_true}
-    INNER JOIN projects p ON p.id=s.project_id AND p.enabled=${_true}
+    INNER JOIN projects p ON p.uuid=s.component_uuid AND p.enabled=${_true}
     INNER JOIN metrics metric ON metric.id=pm.metric_id
     <where>
       AND p.kee = #{componentKey}
   <select id="selectProjectMeasuresByDeveloperForMetrics" parameterType="map" resultType="Measure">
     SELECT
     <include refid="measureColumns"/>,
-    s.project_id as componentId
+    p.id as componentId
     FROM project_measures pm
     INNER JOIN snapshots s ON s.id=pm.snapshot_id AND s.islast=${_true} AND s.scope='PRJ' AND s.qualifier='TRK'
+    INNER JOIN projects p ON p.uuid=s.component_uuid
     <where>
       pm.person_id = #{developerId}
       AND
     FROM project_measures pm
     INNER JOIN snapshots s ON s.id=pm.snapshot_id AND s.islast=${_true}
     INNER JOIN metrics metric ON metric.id=pm.metric_id
-    INNER JOIN projects p ON p.id=s.project_id AND p.enabled=${_true}
+    INNER JOIN projects p ON p.uuid=s.component_uuid AND p.enabled=${_true}
     <where>
       AND p.kee = #{componentKey}
       AND metric.name = #{metricKey}
     pm.person_id as personId, pm.value as value
     FROM project_measures pm
     INNER JOIN snapshots s ON s.id=pm.snapshot_id AND s.status=#{status}
-    INNER JOIN projects p ON p.id=s.project_id AND p.enabled=${_true}
+    INNER JOIN projects p ON p.uuid=s.component_uuid AND p.enabled=${_true}
     <where>
       AND p.uuid = #{componentUuid}
       AND (s.root_snapshot_id=#{rootSnapshotId} OR s.id=#{rootSnapshotId})
index 64b7ae0fba262af3b3bdeccab6992b711a6a9195..3b39f3fad051007812ef351e05799348c1921c23 100644 (file)
       <if test="id != null">
         and s.id=#{id}
       </if>
-      <if test="rootProjectId != null">
-        and s.root_project_id=#{rootProjectId}
+      <if test="rootComponentUuid != null">
+        and s.root_component_uuid=#{rootComponentUuid}
       </if>
-      <if test="resourceId != null">
-        and s.project_id=#{resourceId}
+      <if test="componentUuid != null">
+        and s.component_uuid=#{componentUuid}
       </if>
       <if test="status != null">
         and s.status in
   <select id="selectSnapshotIdsByResource" parameterType="map" resultType="long">
     select s.id from snapshots s
     <where>
-      s.project_id in
-      <foreach collection="resourceIds" open="(" close=")" item="resourceId" separator=",">
-        #{resourceId}
+      s.component_uuid in
+      <foreach collection="componentUuids" open="(" close=")" item="componentUuid" separator=",">
+        #{componentUuid}
       </foreach>
     </where>
   </select>
 
-  <select id="selectPurgeableSnapshotsWithEvents" parameterType="long" resultType="PurgeableSnapshot">
+  <select id="selectPurgeableSnapshotsWithEvents" parameterType="String" resultType="PurgeableSnapshot">
     select s.id as "snapshotId", s.created_at as "date", ${_true} as "hasEvents", islast as "isLast" from
     snapshots s where
-    s.project_id=#{id} and s.status='P' and s.qualifier &lt;&gt; 'LIB' and
+    s.component_uuid=#{componentUuid} and s.status='P' and s.qualifier &lt;&gt; 'LIB' and
     exists(select e.id from events e where e.snapshot_id=s.id)
   </select>
 
-  <select id="selectPurgeableSnapshotsWithoutEvents" parameterType="long" resultType="PurgeableSnapshot">
+  <select id="selectPurgeableSnapshotsWithoutEvents" parameterType="String" resultType="PurgeableSnapshot">
     select s.id as "snapshotId", s.created_at as "date", ${_false} as "hasEvents", islast as "isLast" from
     snapshots s where
-    s.project_id=#{id} and s.status='P' and s.qualifier &lt;&gt; 'LIB' and
+    s.component_uuid=#{componentUuid} and s.status='P' and s.qualifier &lt;&gt; 'LIB' and
     not exists(select e.id from events e where e.snapshot_id=s.id)
   </select>
 
   <select id="selectComponentIdUuidsToDisable" resultType="org.sonar.db.purge.IdUuidPair" parameterType="long">
     select p.id, p.uuid from projects p
     where (p.id=#{id} or p.root_id=#{id}) and p.enabled=${_true}
-    and not exists(select s.project_id from snapshots s where s.islast=${_true} and s.project_id=p.id)
+    and not exists(select s.component_uuid from snapshots s where s.islast=${_true} and s.component_uuid=p.uuid)
   </select>
 
   <select id="selectMetricIdsWithoutHistoricalData" resultType="long">
     </foreach>
   </delete>
 
-  <update id="setSnapshotIsLastToFalse" parameterType="long">
-    update snapshots set islast=${_false} where project_id=#{id}
+  <update id="setSnapshotIsLastToFalse" parameterType="String">
+    update snapshots set islast=${_false} where component_uuid=#{componentUuid}
   </update>
 
   <delete id="deleteComponentIssueChanges" parameterType="map">
index 7ac2fec5c8bc053106e87a7c196d05d9925564a5..d2af1311575b6ceea1d4473c47e8f1055ab09624 100644 (file)
@@ -91,7 +91,7 @@ public class ComponentDbTester {
       .build();
     List<ComponentDto> rootProjects = dbClient.componentDao().selectByQuery(dbSession, dbQuery, 0, Integer.MAX_VALUE);
     for (ComponentDto project : rootProjects) {
-      dbClient.componentIndexDao().indexProject(dbSession, project.getId());
+      dbClient.componentIndexDao().indexProject(dbSession, project.uuid());
     }
     db.commit();
   }
index 75b1984dbbaf3d58f36f6806045ee80576693aa8..cdcce31fb4b3f4dcc8c2626a087713437444f502 100644 (file)
@@ -54,7 +54,7 @@ public class ResourceIndexDaoTest {
   public void shouldIndexMultiModulesProject() {
     dbTester.prepareDbUnit(getClass(), "shouldIndexMultiModulesProject.xml");
 
-    underTest.indexProject(1);
+    underTest.indexProject("ABCD");
 
     dbTester.assertDbUnit(getClass(), "shouldIndexMultiModulesProject-result.xml", EXCLUDED_ID_COLUMN, "resource_index");
   }
@@ -63,7 +63,7 @@ public class ResourceIndexDaoTest {
   public void shouldReindexProjectAfterRenaming() {
     dbTester.prepareDbUnit(getClass(), "shouldReindexProjectAfterRenaming.xml");
 
-    underTest.indexProject(1);
+    underTest.indexProject("ABCD");
 
     dbTester.assertDbUnit(getClass(), "shouldReindexProjectAfterRenaming-result.xml", EXCLUDED_ID_COLUMN, "resource_index");
   }
@@ -72,7 +72,7 @@ public class ResourceIndexDaoTest {
   public void shouldNotIndexPackages() {
     dbTester.prepareDbUnit(getClass(), "shouldNotIndexPackages.xml");
 
-    underTest.indexProject(1);
+    underTest.indexProject("ABCD");
     // project
     assertThat(dbTester.countSql("select count(1) from resource_index where component_uuid='ABCD'")).isGreaterThan(0);
     // directory
@@ -150,9 +150,9 @@ public class ResourceIndexDaoTest {
     ComponentDto project = new ComponentDto().setUuid(ROOT_UUID).setKey("the_key").setName(longName).setScope(Scopes.PROJECT).setQualifier(Qualifiers.PROJECT);
     DbSession session = dbTester.getSession();
     dbTester.getDbClient().componentDao().insert(session, project);
-    dbTester.getDbClient().snapshotDao().insert(session, new SnapshotDto().setComponentId(project.getId()).setRootProjectId(project.getId()).setLast(true));
+    dbTester.getDbClient().snapshotDao().insert(session, new SnapshotDto().setComponentUuid(project.uuid()).setRootComponentUuid(project.uuid()).setLast(true));
 
-    underTest.indexProject(session, project.getId());
+    underTest.indexProject(session, project.uuid());
     session.commit();
 
     assertThat(dbTester.countRowsOfTable("resource_index")).isEqualTo(longName.length() - ResourceIndexDao.MINIMUM_KEY_SIZE + 1);
index 76fe88ddf0098cb01f20f8532c006bee16795005..988ea874dc2179cbbbcb8893a862b262a1c7951c 100644 (file)
@@ -59,8 +59,8 @@ public class SnapshotDaoTest {
     SnapshotDto result = underTest.selectById(db.getSession(), 3L);
     assertThat(result).isNotNull();
     assertThat(result.getId()).isEqualTo(3L);
-    assertThat(result.getComponentId()).isEqualTo(3L);
-    assertThat(result.getRootProjectId()).isEqualTo(1L);
+    assertThat(result.getComponentUuid()).isEqualTo("uuid_3");
+    assertThat(result.getRootComponentUuid()).isEqualTo("uuid_1");
     assertThat(result.getParentId()).isEqualTo(2L);
     assertThat(result.getRootId()).isEqualTo(1L);
     assertThat(result.getStatus()).isEqualTo("P");
@@ -108,7 +108,7 @@ public class SnapshotDaoTest {
 
   @Test
   public void lastSnapshot_returns_null_when_no_last_snapshot() {
-    SnapshotDto snapshot = underTest.selectLastSnapshotByComponentId(db.getSession(), 123L);
+    SnapshotDto snapshot = underTest.selectLastSnapshotByComponentUuid(db.getSession(), "uuid_123");
 
     assertThat(snapshot).isNull();
   }
@@ -117,7 +117,7 @@ public class SnapshotDaoTest {
   public void lastSnapshot_from_one_resource() {
     db.prepareDbUnit(getClass(), "snapshots.xml");
 
-    SnapshotDto snapshot = underTest.selectLastSnapshotByComponentId(db.getSession(), 2L);
+    SnapshotDto snapshot = underTest.selectLastSnapshotByComponentUuid(db.getSession(), "uuid_2");
 
     assertThat(snapshot).isNotNull();
     assertThat(snapshot.getId()).isEqualTo(4L);
@@ -127,7 +127,7 @@ public class SnapshotDaoTest {
   public void lastSnapshot_from_one_resource_without_last_is_null() {
     db.prepareDbUnit(getClass(), "snapshots.xml");
 
-    SnapshotDto snapshot = underTest.selectLastSnapshotByComponentId(db.getSession(), 5L);
+    SnapshotDto snapshot = underTest.selectLastSnapshotByComponentUuid(db.getSession(), "uuid_5");
 
     assertThat(snapshot).isNull();
   }
@@ -142,37 +142,12 @@ public class SnapshotDaoTest {
     assertThat(snapshots).extracting("id").containsOnly(1L, 6L);
   }
 
-  @Test
-  public void select_snapshots_by_component_id() {
-    db.prepareDbUnit(getClass(), "snapshots.xml");
-
-    List<SnapshotDto> snapshots = underTest.selectSnapshotsByComponentId(db.getSession(), 1L);
-
-    assertThat(snapshots).hasSize(3);
-  }
-
   @Test
   public void select_snapshots_by_query() {
     db.prepareDbUnit(getClass(), "select_snapshots_by_query.xml");
 
     assertThat(underTest.selectSnapshotsByQuery(db.getSession(), new SnapshotQuery())).hasSize(6);
 
-    assertThat(underTest.selectSnapshotsByQuery(db.getSession(), new SnapshotQuery().setComponentId(1L))).hasSize(3);
-
-    assertThat(underTest.selectSnapshotsByQuery(db.getSession(), new SnapshotQuery().setComponentId(1L).setVersion("2.2-SNAPSHOT"))).extracting("id").containsOnly(3L);
-
-    assertThat(underTest.selectSnapshotsByQuery(db.getSession(), new SnapshotQuery().setComponentId(1L).setIsLast(true))).extracting("id").containsOnly(1L);
-    assertThat(underTest.selectSnapshotsByQuery(db.getSession(), new SnapshotQuery().setComponentId(1L).setIsLast(false))).extracting("id").containsOnly(2L, 3L);
-
-    assertThat(underTest.selectSnapshotsByQuery(db.getSession(), new SnapshotQuery().setComponentId(1L).setCreatedAfter(1228172400002L))).extracting("id").containsOnly(2L, 3L);
-    assertThat(underTest.selectSnapshotsByQuery(db.getSession(), new SnapshotQuery().setComponentId(1L).setCreatedBefore(1228172400002L))).extracting("id").containsOnly(1L);
-
-    assertThat(underTest.selectSnapshotsByQuery(db.getSession(), new SnapshotQuery().setComponentId(2L).setStatus("P"))).hasSize(1);
-    assertThat(underTest.selectSnapshotsByQuery(db.getSession(), new SnapshotQuery().setComponentId(2L).setStatus("U"))).hasSize(1);
-
-    assertThat(underTest.selectSnapshotsByQuery(db.getSession(), new SnapshotQuery().setComponentId(1L).setSort(BY_DATE, ASC)).get(0).getId()).isEqualTo(1L);
-    assertThat(underTest.selectSnapshotsByQuery(db.getSession(), new SnapshotQuery().setComponentId(1L).setSort(BY_DATE, DESC)).get(0).getId()).isEqualTo(3L);
-
     assertThat(underTest.selectSnapshotsByQuery(db.getSession(), new SnapshotQuery().setComponentUuid("ABCD").setSort(BY_DATE, ASC)).get(0).getId()).isEqualTo(1L);
     assertThat(underTest.selectSnapshotsByQuery(db.getSession(), new SnapshotQuery().setComponentUuid("ABCD").setSort(BY_DATE, DESC)).get(0).getId()).isEqualTo(3L);
 
@@ -208,14 +183,14 @@ public class SnapshotDaoTest {
   public void select_previous_version_snapshots() {
     db.prepareDbUnit(getClass(), "select_previous_version_snapshots.xml");
 
-    List<SnapshotDto> snapshots = underTest.selectPreviousVersionSnapshots(db.getSession(), 1L, "1.2-SNAPSHOT");
+    List<SnapshotDto> snapshots = underTest.selectPreviousVersionSnapshots(db.getSession(), "ABCD", "1.2-SNAPSHOT");
     assertThat(snapshots).hasSize(2);
 
     SnapshotDto firstSnapshot = snapshots.get(0);
     assertThat(firstSnapshot.getVersion()).isEqualTo("1.1");
 
     // All snapshots are returned on an unknown version
-    assertThat(underTest.selectPreviousVersionSnapshots(db.getSession(), 1L, "UNKNOWN")).hasSize(3);
+    assertThat(underTest.selectPreviousVersionSnapshots(db.getSession(), "ABCD", "UNKNOWN")).hasSize(3);
   }
 
   @Test
@@ -230,11 +205,11 @@ public class SnapshotDaoTest {
       );
     dbSession.commit();
 
-    SnapshotDto dto = underTest.selectOldestSnapshot(dbSession, project.getId());
+    SnapshotDto dto = underTest.selectOldestSnapshot(dbSession, project.uuid());
     assertThat(dto).isNotNull();
     assertThat(dto.getCreatedAt()).isEqualTo(1L);
 
-    assertThat(underTest.selectOldestSnapshot(dbSession, 123456789)).isNull();
+    assertThat(underTest.selectOldestSnapshot(dbSession, "blabla")).isNull();
   }
 
   @Test
@@ -255,8 +230,8 @@ public class SnapshotDaoTest {
     db.prepareDbUnit(getClass(), "empty.xml");
 
     underTest.insert(db.getSession(),
-      new SnapshotDto().setComponentId(1L).setLast(false),
-      new SnapshotDto().setComponentId(2L).setLast(false));
+      new SnapshotDto().setComponentUuid("uuid_1").setRootComponentUuid("uuid_1").setLast(false),
+      new SnapshotDto().setComponentUuid("uuid_2").setRootComponentUuid("uuid_1").setLast(false));
     db.getSession().commit();
 
     assertThat(db.countRowsOfTable("snapshots")).isEqualTo(2);
@@ -337,8 +312,8 @@ public class SnapshotDaoTest {
 
   private static SnapshotDto defaultSnapshot() {
     return new SnapshotDto()
-      .setComponentId(3L)
-      .setRootProjectId(1L)
+      .setComponentUuid("uuid_3")
+      .setRootComponentUuid("uuid_1")
       .setParentId(2L)
       .setRootId(1L)
       .setStatus("P")
index aecefce40ff5fc5141a07d3e8eba30e419e4b64f..5188747e35549d480650a0049f95b270718de5b3 100644 (file)
@@ -32,9 +32,9 @@ public class SnapshotDtoTest {
       .setId(10L)
       .setParentId(2L)
       .setRootId(3L)
-      .setRootProjectId(20L)
+      .setRootComponentUuid("uuid_20")
       .setBuildDate(parseDate("2014-07-02").getTime())
-      .setComponentId(21L)
+      .setComponentUuid("uuid_21")
       .setLast(true)
       .setScope("FIL")
       .setQualifier("FIL")
@@ -60,9 +60,9 @@ public class SnapshotDtoTest {
     assertThat(snapshotDto.getId()).isEqualTo(10L);
     assertThat(snapshotDto.getParentId()).isEqualTo(2L);
     assertThat(snapshotDto.getRootId()).isEqualTo(3L);
-    assertThat(snapshotDto.getRootProjectId()).isEqualTo(20L);
+    assertThat(snapshotDto.getRootComponentUuid()).isEqualTo("uuid_20");
     assertThat(snapshotDto.getBuildDate()).isEqualTo(parseDate("2014-07-02").getTime());
-    assertThat(snapshotDto.getComponentId()).isEqualTo(21L);
+    assertThat(snapshotDto.getComponentUuid()).isEqualTo("uuid_21");
     assertThat(snapshotDto.getLast()).isTrue();
     assertThat(snapshotDto.getScope()).isEqualTo("FIL");
     assertThat(snapshotDto.getQualifier()).isEqualTo("FIL");
index f7100695c1df9b6096afd3372c9c106654437346..e1307006c6a1558358b7ee76e6590eae7e3eb1e8 100644 (file)
@@ -30,7 +30,6 @@ public class SnapshotQueryTest {
   @Test
   public void test_setters_and_getters() throws Exception {
     SnapshotQuery query = new SnapshotQuery()
-      .setComponentId(1L)
       .setComponentUuid("abcd")
       .setIsLast(true)
       .setStatus("P")
@@ -39,7 +38,6 @@ public class SnapshotQueryTest {
       .setCreatedBefore(20L)
       .setSort(BY_DATE, ASC);
 
-    assertThat(query.getComponentId()).isEqualTo(1L);
     assertThat(query.getComponentUuid()).isEqualTo("abcd");
     assertThat(query.getIsLast()).isTrue();
     assertThat(query.getStatus()).isEqualTo("P");
index 8e271c5b3cbcbd9e5311d4b051f3c1b2a29a0200..7d0bc76e77a7894ed221bdda0d9e306cea8af401 100644 (file)
@@ -31,7 +31,7 @@ public class SnapshotTesting {
   public static SnapshotDto createForComponent(ComponentDto component, SnapshotDto parentSnapshot) {
     checkNotNull(parentSnapshot.getId(), "The parent snapshot need to be persisted before creating this snapshot");
     Long parentRootId = parentSnapshot.getRootId();
-    return createBasicSnapshot(component, parentSnapshot.getRootProjectId())
+    return createBasicSnapshot(component, parentSnapshot.getRootComponentUuid())
       .setRootId(parentRootId != null ? parentRootId : parentSnapshot.getId())
       .setParentId(parentSnapshot.getId())
       .setDepth(parentSnapshot.getDepth()+1)
@@ -40,29 +40,29 @@ public class SnapshotTesting {
   }
 
   public static SnapshotDto newSnapshotForProject(ComponentDto project) {
-    return createBasicSnapshot(project, project.getId())
+    return createBasicSnapshot(project, project.uuid())
       .setDepth(0)
       .setPath("");
   }
 
   public static SnapshotDto newSnapshotForView(ComponentDto view) {
-    return createBasicSnapshot(view, view.getId())
+    return createBasicSnapshot(view, view.uuid())
       .setDepth(0)
       .setPath("");
   }
 
   public static SnapshotDto newSnapshotForDeveloper(ComponentDto developer) {
-    return createBasicSnapshot(developer, developer.getId())
+    return createBasicSnapshot(developer, developer.uuid())
       .setDepth(0)
       .setPath("");
   }
 
-  private static SnapshotDto createBasicSnapshot(ComponentDto component, Long rootProjectId) {
+  private static SnapshotDto createBasicSnapshot(ComponentDto component, String rootComponentUuid) {
     checkNotNull(component.getId(), "The project need to be persisted before creating this snapshot");
-    checkNotNull(rootProjectId, "Root project id is null");
+    checkNotNull(rootComponentUuid, "Root component uuid is null");
     return new SnapshotDto()
-      .setComponentId(component.getId())
-      .setRootProjectId(rootProjectId)
+      .setComponentUuid(component.uuid())
+      .setRootComponentUuid(rootComponentUuid)
       .setStatus(SnapshotDto.STATUS_PROCESSED)
       .setQualifier(component.qualifier())
       .setScope(component.scope())
index 2e7c592e5680734ec7f50ef9447b9503b7e98913..b710955955c5e2d3ffa4e975bf6de93d99769bb4 100644 (file)
@@ -21,8 +21,6 @@ package org.sonar.db.measure;
 
 import com.google.common.base.Function;
 import com.google.common.base.Optional;
-import com.google.common.base.Predicate;
-import com.google.common.collect.FluentIterable;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
 import java.util.Collections;
@@ -42,6 +40,7 @@ import org.sonar.db.component.SnapshotDto;
 import org.sonar.db.metric.MetricDto;
 import org.sonar.db.metric.MetricTesting;
 
+import static com.google.common.collect.FluentIterable.from;
 import static com.google.common.collect.Lists.newArrayList;
 import static com.google.common.collect.Sets.newHashSet;
 import static java.util.Collections.singletonList;
@@ -135,12 +134,7 @@ public class MeasureDaoTest {
     List<MeasureDto> results = underTest.selectBySnapshotIdAndMetricKeys(SNAPSHOT_ID, ImmutableSet.of("ncloc", "authors_by_line"), dbSession);
     assertThat(results).hasSize(2);
 
-    Optional<MeasureDto> optional = FluentIterable.from(results).filter(new Predicate<MeasureDto>() {
-      @Override
-      public boolean apply(@Nullable MeasureDto input) {
-        return input.getId() == 22;
-      }
-    }).first();
+    Optional<MeasureDto> optional = from(results).filter(input -> input.getId() == 22).first();
     assertThat(optional).isPresent();
 
     MeasureDto result = optional.get();
@@ -467,7 +461,8 @@ public class MeasureDaoTest {
   }
 
   private SnapshotDto insertSnapshot(ComponentDto componentDto, boolean last) {
-    SnapshotDto snapshotDto = new SnapshotDto().setComponentId(componentDto.getId()).setLast(last).setQualifier(componentDto.qualifier()).setScope(componentDto.scope());
+    SnapshotDto snapshotDto = new SnapshotDto().setComponentUuid(componentDto.uuid()).setRootComponentUuid(componentDto.projectUuid())
+      .setLast(last).setQualifier(componentDto.qualifier()).setScope(componentDto.scope());
     dbClient.snapshotDao().insert(dbSession, snapshotDto);
     dbSession.commit();
     return snapshotDto;
@@ -525,7 +520,7 @@ public class MeasureDaoTest {
   }
 
   private static Map<Long, PastMeasureDto> pastMeasuresById(List<PastMeasureDto> pastMeasures) {
-    return FluentIterable.from(pastMeasures).uniqueIndex(new Function<PastMeasureDto, Long>() {
+    return from(pastMeasures).uniqueIndex(new Function<PastMeasureDto, Long>() {
       @Nullable
       @Override
       public Long apply(PastMeasureDto input) {
@@ -534,13 +529,4 @@ public class MeasureDaoTest {
     });
   }
 
-  private static Map<Long, MeasureDto> measuresById(List<MeasureDto> pastMeasures) {
-    return FluentIterable.from(pastMeasures).uniqueIndex(new Function<MeasureDto, Long>() {
-      @Nullable
-      @Override
-      public Long apply(MeasureDto input) {
-        return input.getId();
-      }
-    });
-  }
 }
index 5568b0c00cde7ba73ab74eec90fbbce3a39d8724..1c30f1c9583245759889b6fda58a59ffde88f97a 100644 (file)
@@ -91,7 +91,7 @@ public class PurgeCommandsTest {
   public void shouldDeleteResource() {
     dbTester.prepareDbUnit(getClass(), "shouldDeleteResource.xml");
 
-    new PurgeCommands(dbTester.getSession(), profiler).deleteComponents(newArrayList(new IdUuidPair(1L, "1")));
+    new PurgeCommands(dbTester.getSession(), profiler).deleteComponents(newArrayList(new IdUuidPair(1L, "uuid_1")));
 
     assertThat(dbTester.countRowsOfTable("projects")).isZero();
     assertThat(dbTester.countRowsOfTable("snapshots")).isZero();
index aace20f99df321d6b4258cc411dc74e220de909c..0cba06d947c2e4cd3a9636a0bcaf3c0682d42d7d 100644 (file)
@@ -98,14 +98,14 @@ public class PurgeDaoTest {
   @Test
   public void shouldDeleteSnapshots() {
     dbTester.prepareDbUnit(getClass(), "shouldDeleteSnapshots.xml");
-    underTest.deleteSnapshots(PurgeSnapshotQuery.create().setIslast(false).setResourceId(THE_PROJECT_ID), new PurgeProfiler());
+    underTest.deleteSnapshots(PurgeSnapshotQuery.create().setIslast(false).setComponentUuid(THE_PROJECT_UUID), new PurgeProfiler());
     dbTester.assertDbUnit(getClass(), "shouldDeleteSnapshots-result.xml", "snapshots");
   }
 
   @Test
   public void shouldSelectPurgeableSnapshots() {
     dbTester.prepareDbUnit(getClass(), "shouldSelectPurgeableSnapshots.xml");
-    List<PurgeableSnapshotDto> snapshots = underTest.selectPurgeableSnapshots(THE_PROJECT_ID);
+    List<PurgeableSnapshotDto> snapshots = underTest.selectPurgeableSnapshots(THE_PROJECT_UUID);
 
     assertThat(snapshots).hasSize(3);
     assertThat(getById(snapshots, THE_PROJECT_ID).isLast()).isTrue();
index 785504ba07322f819561ad9b9395a85de9495803..fc8ff9502b2d4be05b8e53181976e7799198d177 100644 (file)
@@ -48,13 +48,13 @@ public class DefaultPeriodCleanerTest {
   public void doClean() {
     PurgeDao dao = mock(PurgeDao.class);
     DbSession session = mock(DbSession.class);
-    when(dao.selectPurgeableSnapshots(123L, session)).thenReturn(Arrays.asList(
+    when(dao.selectPurgeableSnapshots("uuid_123", session)).thenReturn(Arrays.asList(
       new PurgeableSnapshotDto().setSnapshotId(999L).setDate(System2.INSTANCE.now())));
     Filter filter1 = newLazyFilter();
     Filter filter2 = newLazyFilter();
 
     DefaultPeriodCleaner cleaner = new DefaultPeriodCleaner(dao, new PurgeProfiler());
-    cleaner.doClean(123L, Arrays.asList(filter1, filter2), session);
+    cleaner.doClean("uuid_123", Arrays.asList(filter1, filter2), session);
 
     verify(filter1).log();
     verify(filter2).log();
index a8c6ee4962957fce45e0a507e0188600ce6fcd27..81f5bde319dfb1b587d099f89e46f0420af979bb 100644 (file)
@@ -5,36 +5,36 @@
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             scope="PRJ" qualifier="TRK" long_name="Apache Struts" description="the description"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="[null]"/>
-  <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" islast="[true]" scope="PRJ" qualifier="TRK"/>
-  <snapshots id="10" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" islast="[false]" scope="PRJ" qualifier="TRK"/>
+  <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]" islast="[true]" scope="PRJ" qualifier="TRK"/>
+  <snapshots id="10" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]" islast="[false]" scope="PRJ" qualifier="TRK"/>
 
   <!-- module -->
   <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
             uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Core" description="[null]"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/>
-  <snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1" islast="[true]" scope="PRJ" qualifier="BRC"/>
+  <snapshots id="2" component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1" islast="[true]" scope="PRJ" qualifier="BRC"/>
 
   <!-- sub module -->
   <projects id="3" root_id="1" kee="org.struts:struts-data" name="Struts Data"
             uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH.FGHI."
             scope="PRJ" qualifier="BRC" long_name="Struts Data" description="[null]"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/>
-  <snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1" islast="[true]" scope="PRJ" qualifier="BRC"/>
+  <snapshots id="3" component_uuid="FGHI" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1" islast="[true]" scope="PRJ" qualifier="BRC"/>
 
   <!-- directory -->
   <projects id="4" root_id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts"
             uuid="GHIJ" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path=".ABCD.EFGH.FGHI."
             name="src/org/struts" long_name="org.struts" description="[null]"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
-  <snapshots id="4" project_id="4" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1" islast="[true]" scope="DIR" qualifier="DIR"/>
+  <snapshots id="4" component_uuid="GHIJ" parent_snapshot_id="3" root_component_uuid="ABCD" root_snapshot_id="1" islast="[true]" scope="DIR" qualifier="DIR"/>
 
   <!-- file -->
   <projects id="5" root_id="3" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
             uuid="HIJK" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path=".ABCD.EFGH.FGHI."
             name="RequestContext.java" long_name="org.struts.RequestContext" description="[null]"
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
-  <snapshots id="5" project_id="5" parent_snapshot_id="4" root_project_id="1" root_snapshot_id="1" islast="[true]" scope="FIL" qualifier="FIL"/>
+  <snapshots id="5" component_uuid="HIJK" parent_snapshot_id="4" root_component_uuid="ABCD" root_snapshot_id="1" islast="[true]" scope="FIL" qualifier="FIL"/>
 
   <!-- removed sub module -->
   <projects id="10" root_id="1" kee="org.struts:struts-data-removed" name="Struts Data Removed"
index b323c0f221fd4efa5a1d0c74a795fda4646ba1e7..c7ad5d723ec03467486e398da7850cb64e4f69e8 100644 (file)
@@ -14,7 +14,7 @@
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             description="the description" long_name="Apache Struts"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
-  <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+  <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -23,7 +23,7 @@
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
-  <snapshots id="10" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+  <snapshots id="10" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -32,7 +32,7 @@
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228136280000" build_date="1228136280000"
              version="[null]" path=""/>
-  <snapshots id="11" project_id="42" parent_snapshot_id="[null]" root_project_id="42" root_snapshot_id="[null]"
+  <snapshots id="11" component_uuid="PPAA" parent_snapshot_id="[null]" root_component_uuid="PPAA" root_snapshot_id="[null]"
              status="U" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -47,7 +47,7 @@
             uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/>
-  <snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="2" component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -63,7 +63,7 @@
             name="src/org/struts" root_id="2"
             description="[null]"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
-  <snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="3" component_uuid="GHIJ" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -80,7 +80,7 @@
             description="[null]"
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
 
-  <snapshots id="4" project_id="4" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="4" component_uuid="KLMN" parent_snapshot_id="3" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index 4c31e03cb24686ed306e4fb70f782a6070a80b4e..2e2ae8bad5cea4e717462e6677548c72e80351c5 100644 (file)
@@ -14,7 +14,7 @@
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             description="the description" long_name="Apache Struts"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
-  <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+  <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -23,7 +23,7 @@
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
-  <snapshots id="10" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+  <snapshots id="10" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -38,7 +38,7 @@
             uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/>
-  <snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="2" component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -54,7 +54,7 @@
             name="src/org/struts" root_id="2"
             description="[null]"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
-  <snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="3" component_uuid="GHIJ" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -71,7 +71,7 @@
             description="[null]"
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
 
-  <snapshots id="4" project_id="4" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="4" component_uuid="KLMN" parent_snapshot_id="3" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index 27ae97b696d7339bc2066495191860d7ebe990c2..adaa8d388efefc800030790d59df405bc065e38a 100644 (file)
@@ -9,7 +9,7 @@
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             description="the description" long_name="Apache Struts"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
-  <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+  <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -18,7 +18,7 @@
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
-  <snapshots id="10" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+  <snapshots id="10" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -33,7 +33,7 @@
             uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]"/>
-  <snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="2" component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -49,7 +49,7 @@
             name="src/org/struts" root_id="2"
             description="[null]"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" authorization_updated_at="[null]"/>
-  <snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="3" component_uuid="GHIJ" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -66,7 +66,7 @@
             description="[null]"
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" authorization_updated_at="[null]"/>
 
-  <snapshots id="4" project_id="4" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="4" component_uuid="KLMN" parent_snapshot_id="3" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index 01781afd6843e4f0a78de3fdb0b890f9e6f803d6..490e8fa0cbec39ae5f3c875f16be369f8138798d 100644 (file)
@@ -6,7 +6,7 @@
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
             authorization_updated_at="[null]"/>
-  <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+  <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -15,7 +15,7 @@
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
-  <snapshots id="10" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+  <snapshots id="10" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -31,7 +31,7 @@
             uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
             authorization_updated_at="[null]"/>
-  <snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="2" component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -48,7 +48,7 @@
             uuid="GHIJ" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
             authorization_updated_at="[null]"/>
-  <snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="3" component_uuid="GHIJ" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -67,7 +67,7 @@
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
             authorization_updated_at="[null]"/>
 
-  <snapshots id="4" project_id="4" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="4" component_uuid="KLMN" parent_snapshot_id="3" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -88,7 +88,7 @@
             uuid="ONLYERRORS" project_uuid="[null]" module_uuid="[null]" module_uuid_path="."
             description="the description" long_name="Shinding"
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
-  <snapshots id="6" project_id="6" parent_snapshot_id="[null]" root_project_id="6" root_snapshot_id="[null]"
+  <snapshots id="6" component_uuid="ONLYERRORS" parent_snapshot_id="[null]" root_component_uuid="ONLYERRORS" root_snapshot_id="[null]"
              status="U" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -97,7 +97,7 @@
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
-  <snapshots id="7" project_id="6" parent_snapshot_id="6" root_project_id="6" root_snapshot_id="6"
+  <snapshots id="7" component_uuid="ONLYERRORS" parent_snapshot_id="6" root_component_uuid="ONLYERRORS" root_snapshot_id="6"
              status="U" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
             description="the description" long_name="Tika"
             uuid="DISABLED" project_uuid="[null]" module_uuid="[null]" module_uuid_path="."
             enabled="[false]" language="java" copy_resource_id="[null]" person_id="[null]"/>
-  <snapshots id="8" project_id="8" parent_snapshot_id="[null]" root_project_id="8" root_snapshot_id="[null]"
+  <snapshots id="8" component_uuid="DISABLED" parent_snapshot_id="[null]" root_component_uuid="DISABLED" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index 766923459107546c22cb707aa127c0180054cebd..98acd8645c7091c2d6591c2bd049dfdc01a62c3c 100644 (file)
@@ -10,7 +10,7 @@
             description="the description" long_name="Apache Struts"
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
             created_at="2008-12-02" authorization_updated_at="123456789"/>
-  <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+  <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -19,7 +19,7 @@
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
-  <snapshots id="10" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+  <snapshots id="10" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -35,7 +35,7 @@
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
             description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
             created_at="2008-12-02" authorization_updated_at="[null]"/>
-  <snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="2" component_uuid="BCDE" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -52,7 +52,7 @@
             description="[null]"
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts"
             created_at="2008-12-02" authorization_updated_at="[null]"/>
-  <snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="3" component_uuid="CDEF" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -72,7 +72,7 @@
             path="src/org/struts/RequestContext.java"
             created_at="2008-12-02" authorization_updated_at="[null]"/>
 
-  <snapshots id="4" project_id="4" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="4" component_uuid="DEFG" parent_snapshot_id="3" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index a1cd4ef6f5af03999d0f0a0c11aa0e118ac31f2a..d88fef9f1b4cbcf66cc260fe30e478ecb4605b4f 100644 (file)
@@ -27,8 +27,8 @@
             description="[null]"
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
 
-  <snapshots purge_status="[null]" id="1" islast="[true]" root_project_id="1" project_id="1"/>
-  <snapshots purge_status="[null]" id="2" islast="[true]" root_project_id="1" project_id="2"/>
-  <snapshots purge_status="[null]" id="3" islast="[true]" root_project_id="1" project_id="3"/>
-  <snapshots purge_status="[null]" id="4" islast="[true]" root_project_id="1" project_id="4"/>
+  <snapshots purge_status="[null]" id="1" islast="[true]" root_component_uuid="ABCD" component_uuid="ABCD"/>
+  <snapshots purge_status="[null]" id="2" islast="[true]" root_component_uuid="ABCD" component_uuid="BCDE"/>
+  <snapshots purge_status="[null]" id="3" islast="[true]" root_component_uuid="ABCD" component_uuid="CDEF"/>
+  <snapshots purge_status="[null]" id="4" islast="[true]" root_component_uuid="ABCD" component_uuid="DEFG"/>
 </dataset>
index 0043b4ced0bfab5052c8aec683a5b6941c10160e..1072f211a68ddea4e94c19aa521c17b121ab3a96 100644 (file)
             description="[null]"
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
 
-  <snapshots purge_status="[null]" id="1" islast="[true]" root_project_id="1" project_id="1" scope="PRJ"
+  <snapshots purge_status="[null]" id="1" islast="[true]" root_component_uuid="ABCD" component_uuid="ABCD" scope="PRJ"
              qualifier="TRK"/>
-  <snapshots purge_status="[null]" id="2" islast="[true]" root_project_id="1" project_id="2" scope="DIR"
+  <snapshots purge_status="[null]" id="2" islast="[true]" root_component_uuid="ABCD" component_uuid="BCDE" scope="DIR"
              qualifier="PAC"/>
-  <snapshots purge_status="[null]" id="3" islast="[true]" root_project_id="1" project_id="3" scope="FIL"
+  <snapshots purge_status="[null]" id="3" islast="[true]" root_component_uuid="ABCD" component_uuid="CDEF" scope="FIL"
              qualifier="CLA"/>
 </dataset>
index ea9318e91f3ef53da228853219935b7f8474340a..268953293f7e221ca4c5e3a0cfb4e3ed40f7a30b 100644 (file)
@@ -6,7 +6,7 @@
             description="[null]"
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
 
-  <snapshots purge_status="[null]" id="1" islast="[true]" root_project_id="1" project_id="1" scope="PRJ"
+  <snapshots purge_status="[null]" id="1" islast="[true]" root_component_uuid="ABCD" component_uuid="ABCD" scope="PRJ"
              qualifier="TRK"/>
 
   <!-- the index is on the old name "ST" but not on "AS" -->
index 85b7abab51220e8b54dac4918c1daae435ad1158..5b1c5fa7a1aef2a636cd4f869d7d6dbdfc898efc 100644 (file)
@@ -6,7 +6,7 @@
             description="[null]"
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
 
-  <snapshots purge_status="[null]" id="1" islast="[true]" root_project_id="1" project_id="1" scope="PRJ"
+  <snapshots purge_status="[null]" id="1" islast="[true]" root_component_uuid="ABCD" component_uuid="ABCD" scope="PRJ"
              qualifier="TRK"/>
 
   <!-- the index is on the old name "ST" but not on "AS" -->
index 8017ad92ff5b015c0e1c99ad25fbc470f127a941..e00a76026070ab1a396822b1606b8a49f9f42353 100644 (file)
@@ -6,7 +6,7 @@
             description="[null]"
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/>
 
-  <snapshots purge_status="[null]" id="1" islast="[true]" root_project_id="1" project_id="1" scope="PRJ"
+  <snapshots purge_status="[null]" id="1" islast="[true]" root_component_uuid="ABCD" component_uuid="ABCD" scope="PRJ"
              qualifier="TRK"/>
 
   <!-- the index is on the old name "Struts" but not on "Apache Struts -->
index 16f7fe7547141013ca512acf5929cdda50ab3159..3a4404377a3f9e5f1ad1a877db0656805228bb53 100644 (file)
@@ -5,7 +5,7 @@
             uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
             description="the description" long_name="Apache Struts"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="[null]" />
-  <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+  <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -14,7 +14,7 @@
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path=""/>
-  <snapshots id="10" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+  <snapshots id="10" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -35,7 +35,7 @@
             uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Data"
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" authorization_updated_at="[null]" />
-  <snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="3" component_uuid="FGHI" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index a138d68b188ae48081f77216e3d8f6845578dac0..66e1a4ec3d1bf5deacd13bf9066b08313163270c 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
 
-  <snapshots id="1" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="1" component_uuid="uuid_3" parent_snapshot_id="2" root_component_uuid="uuid_1" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1500000000001"
              period2_mode="days2" period2_param="31" period2_date="1500000000002"
index 3f56960cd92b73cab24b00fc32c66c45d23d4a2d..2c4dad9044c7957a81765a14d469455313f73240 100644 (file)
@@ -9,7 +9,7 @@
   <snapshots id="1000" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
              period5_param="[null]" period5_date="[null]"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1225630680000" build_date="1225630680000" version="1.0" path=""
              status="P" islast="[false]" depth="0"/>
 
@@ -17,7 +17,7 @@
   <snapshots id="1001" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
              period5_param="[null]" period5_date="[null]"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1225803480000" build_date="1225803480000" version="1.1" path=""
              status="P" islast="[false]" depth="0"/>
 
@@ -25,7 +25,7 @@
   <snapshots id="1002" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
              period5_param="[null]" period5_date="[null]"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1225976280000" build_date="1225976280000" version="1.2-SNAPSHOT" path=""
              status="P" islast="[false]" depth="0"/>
 
@@ -33,7 +33,7 @@
   <snapshots id="1003" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]"
              period5_param="[null]" period5_date="[null]"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1226235480000" build_date="1226235480000" version="1.2-SNAPSHOT" path=""
              status="U" islast="[true]" depth="0"/>
 
index 36cb562b62ff1dcec95c8ff60ef78251c54810ee..8b4cba62605859358947d894890215777f5d1316 100644 (file)
@@ -7,7 +7,7 @@
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
             authorization_updated_at="[null]"/>
 
-  <snapshots id="1" project_id="1" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="1" component_uuid="ABCD" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -16,7 +16,7 @@
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="PRJ" qualifier="PAC" created_at="1228172400001" build_date="1317247200000"
              version="2.0-SNAPSHOT" path="1.2."/>
-  <snapshots id="2" project_id="1" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="3"
+  <snapshots id="2" component_uuid="ABCD" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="3"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -25,7 +25,7 @@
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="DIR" qualifier="PAC" created_at="1228172400002" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="3" project_id="1" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="3"
+  <snapshots id="3" component_uuid="ABCD" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="3"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -42,7 +42,7 @@
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
             authorization_updated_at="[null]"/>
 
-  <snapshots id="4" project_id="2" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="3"
+  <snapshots id="4" component_uuid="EFGH" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="3"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -52,7 +52,7 @@
              depth="1" scope="DIR" qualifier="PAC" created_at="1228172400000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
   <!-- Unprocessed snapshot -->
-  <snapshots id="5" project_id="2" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="3"
+  <snapshots id="5" component_uuid="EFGH" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="3"
              status="U" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -69,7 +69,7 @@
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
             authorization_updated_at="[null]"/>
 
-  <snapshots id="6" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="3"
+  <snapshots id="6" component_uuid="FGHI" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="3"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
index a52b271da32c123f07541e5d55d6c1598b8ade7c..b457f267b98aa841d7e34b20ab827be5f1aee48a 100644 (file)
@@ -1,6 +1,6 @@
 <dataset>
 
-  <snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="3" component_uuid="uuid_3" parent_snapshot_id="2" root_component_uuid="uuid_1" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
index 4c18e257396bd336ac211339e2e1cfda06a8cbc0..b950190b9263750794054e2f41f6dcab927151d6 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <!-- PROJECT_ID = 1 -->
-  <snapshots id="1" project_id="1" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="1" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_1" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -10,7 +10,7 @@
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="PRJ" qualifier="PAC" created_at="1228172400000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="2" project_id="1" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="3"
+  <snapshots id="2" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_1" root_snapshot_id="3"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -19,7 +19,7 @@
              period5_mode="days5" period5_param="34" period5_date="1317160800000"
              depth="1" scope="DIR" qualifier="PAC" created_at="1228172400000" build_date="1317247200000"
              version="2.1-SNAPSHOT" path="1.2."/>
-  <snapshots id="3" project_id="1" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="3"
+  <snapshots id="3" component_uuid="uuid_1" parent_snapshot_id="2" root_component_uuid="uuid_1" root_snapshot_id="3"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -31,7 +31,7 @@
 
 
   <!-- PROJECT_ID = 2 -->
-  <snapshots id="4" project_id="2" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="3"
+  <snapshots id="4" component_uuid="uuid_2" parent_snapshot_id="2" root_component_uuid="uuid_1" root_snapshot_id="3"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -42,7 +42,7 @@
              version="2.1-SNAPSHOT" path="1.2."/>
 
   <!-- PROJECT_ID = 3 - no last snapshot -->
-  <snapshots id="5" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="3"
+  <snapshots id="5" component_uuid="uuid_3" parent_snapshot_id="2" root_component_uuid="uuid_1" root_snapshot_id="3"
              status="P" islast="[false]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
@@ -53,7 +53,7 @@
              version="2.1-SNAPSHOT" path="1.2."/>
 
   <!-- Child of snapshot id=1 -->
-  <snapshots id="6" project_id="55" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="6" component_uuid="uuid_55" parent_snapshot_id="2" root_component_uuid="uuid_1" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="1"
              period1_mode="days1" period1_param="30" period1_date="1316815200000"
              period2_mode="days2" period2_param="31" period2_date="1316901600000"
index fd4fdc7b9488f7d403eb5e3e3357a0434a3ece3c..1a1682937653e478b7db205aee184f31e72ec3b3 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
-  <snapshots purge_status="[null]" id="1" status="U" islast="0" project_id="0"/>
-  <snapshots purge_status="[null]" id="2" status="U" islast="0" project_id="1"/>
-  <projects id="1" uuid="1" kee="foo" enabled="1" scope="FIL" qualifier="CLA"/>
+  <snapshots purge_status="[null]" id="1" status="U" islast="0" component_uuid="0" root_component_uuid="0"/>
+  <snapshots purge_status="[null]" id="2" status="U" islast="0" component_uuid="uuid_1" root_component_uuid="uuid_1"/>
+  <projects id="1" uuid="uuid_1" kee="foo" enabled="1" scope="FIL" qualifier="CLA"/>
 
 </dataset>
index 7b4ddcef84d16649c25b80af1e4aef5afb8a29a9..e03ca58794e1525f7cfeb898471df68e644340a2 100644 (file)
@@ -1,27 +1,27 @@
 <dataset>
 
-  <snapshots id="1" project_id="1" status="P" islast="[false]" purge_status="[null]"/>
-  <snapshots id="2" project_id="1" status="P" islast="[false]" purge_status="[null]"/>
-  <projects id="1" uuid="1" kee="bar-old" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
+  <snapshots id="1" component_uuid="uuid_1" status="P" islast="[false]" purge_status="[null]" root_component_uuid="uuid_1"/>
+  <snapshots id="2" component_uuid="uuid_1" status="P" islast="[false]" purge_status="[null]" root_component_uuid="uuid_1"/>
+  <projects id="1" uuid="uuid_1" kee="bar-old" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
 
-  <snapshots id="3" project_id="2" status="P" islast="[true]" purge_status="[null]"/>
-  <snapshots id="4" project_id="2" status="P" islast="[true]" purge_status="[null]"/>
-  <projects id="2" uuid="2" kee="bar-last" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
+  <snapshots id="3" component_uuid="uuid_2" status="P" islast="[true]" purge_status="[null]" root_component_uuid="uuid_1"/>
+  <snapshots id="4" component_uuid="uuid_2" status="P" islast="[true]" purge_status="[null]" root_component_uuid="uuid_1"/>
+  <projects id="2" uuid="uuid_2" kee="bar-last" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
 
-  <snapshots id="5" project_id="3" status="P" islast="[false]" purge_status="[null]"/>
-  <snapshots id="6" project_id="3" status="P" islast="[false]" purge_status="[null]"/>
-  <projects id="3" uuid="3" kee="foo-old" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
+  <snapshots id="5" component_uuid="uuid_3" status="P" islast="[false]" purge_status="[null]" root_component_uuid="uuid_1"/>
+  <snapshots id="6" component_uuid="uuid_3" status="P" islast="[false]" purge_status="[null]" root_component_uuid="uuid_1"/>
+  <projects id="3" uuid="uuid_3" kee="foo-old" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
 
-  <snapshots id="7" project_id="4" status="P" islast="[true]" purge_status="[null]"/>
-  <snapshots id="8" project_id="4" status="P" islast="[true]" purge_status="[null]"/>
-  <projects id="4" uuid="4" kee="foo-last" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
+  <snapshots id="7" component_uuid="uuid_4" status="P" islast="[true]" purge_status="[null]" root_component_uuid="uuid_1"/>
+  <snapshots id="8" component_uuid="uuid_4" status="P" islast="[true]" purge_status="[null]" root_component_uuid="uuid_1"/>
+  <projects id="4" uuid="uuid_4" kee="foo-last" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
 
-  <snapshots id="9" project_id="5" status="U" islast="[false]" purge_status="[null]"/>
-  <snapshots id="10" project_id="5" status="U" islast="[false]" purge_status="[null]"/>
-  <projects id="5" uuid="5" kee="foo" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
+  <snapshots id="9" component_uuid="uuid_5" status="U" islast="[false]" purge_status="[null]" root_component_uuid="uuid_1"/>
+  <snapshots id="10" component_uuid="uuid_5" status="U" islast="[false]" purge_status="[null]" root_component_uuid="uuid_1"/>
+  <projects id="5" uuid="uuid_5" kee="foo" enabled="[true]" scope="FIL" qualifier="CLA" language="java"/>
 
-  <snapshots id="11" project_id="6" purge_status="[null]" status="P" islast="1"/>
-  <projects id="6" uuid="6" kee="baz" enabled="[true]" scope="FIL" qualifier="CLA" language="grvy"/>
+  <snapshots id="11" component_uuid="uuid_6" purge_status="[null]" status="P" islast="1" root_component_uuid="uuid_1"/>
+  <projects id="6" uuid="uuid_6" kee="baz" enabled="[true]" scope="FIL" qualifier="CLA" language="grvy"/>
 
   <!-- Old snapshot of another project -->
   <!-- bar-old -->
index 353f9651342c3e581813797091e81deb7a904d9c..f6825ce705627e26e80cfbd72fe5deefa7ea59b8 100644 (file)
   <projects id="402" uuid="DEFG" project_uuid="ABCD" module_uuid="BCDE" module_uuid_path=".ABCD.BCDE." kee="Filter.java"
             root_id="400" qualifier="CLA" scope="PRJ"/>
 
-  <snapshots id="100" project_id="399" root_snapshot_id="[null]" parent_snapshot_id="[null]" root_project_id="399"
+  <snapshots id="100" component_uuid="ABCD" root_snapshot_id="[null]" parent_snapshot_id="[null]" root_component_uuid="ABCD"
              path="" islast="[true]"/>
-  <snapshots id="101" project_id="400" root_snapshot_id="100" parent_snapshot_id="100" root_project_id="399" path="100."
+  <snapshots id="101" component_uuid="BCDE" root_snapshot_id="100" parent_snapshot_id="100" root_component_uuid="ABCD" path="100."
              islast="[true]"/>
-  <snapshots id="102" project_id="401" root_snapshot_id="100" parent_snapshot_id="101" root_project_id="399"
+  <snapshots id="102" component_uuid="CDEF" root_snapshot_id="100" parent_snapshot_id="101" root_component_uuid="ABCD"
              path="100.101." islast="[true]"/>
-  <snapshots id="103" project_id="402" root_snapshot_id="100" parent_snapshot_id="101" root_project_id="399"
+  <snapshots id="103" component_uuid="DEFG" root_snapshot_id="100" parent_snapshot_id="101" root_component_uuid="ABCD"
              path="100.101." islast="[true]"/>
 
   <rules id="500" tags="[null]" system_tags="[null]" plugin_rule_key="AvoidCycle" plugin_name="squid" language="java"/>
index 3c66edfdb2a268f09cf461e40013dff221559343..db51be1f6e9705a1d3c1b5c97f93db71c6bc1629 100644 (file)
 
 
   <!-- snapshots -->
-  <snapshots id="1000" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+  <snapshots id="1000" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1225544280000" build_date="1225544280000" version="[null]" path=""
              status="P" islast="[false]" depth="0"/>
-  <snapshots id="1001" project_id="2" parent_snapshot_id="1000" root_project_id="1" root_snapshot_id="1000"
+  <snapshots id="1001" component_uuid="BCDE" parent_snapshot_id="1000" root_component_uuid="ABCD" root_snapshot_id="1000"
              scope="DIR" qualifier="PAC" created_at="1225544280000" build_date="1225544280000" version="[null]" path="1000."
              status="P" islast="[false]" depth="1"/>
-  <snapshots id="1002" project_id="3" parent_snapshot_id="1001" root_project_id="1" root_snapshot_id="1000"
+  <snapshots id="1002" component_uuid="CDEF" parent_snapshot_id="1001" root_component_uuid="ABCD" root_snapshot_id="1000"
              scope="FIL" qualifier="CLA" created_at="1225544280000" build_date="1225544280000" version="[null]" path="1000.1001."
              status="P" islast="[false]" depth="2"/>
 
index 88489e1c20b8801493087d7ceb0ee55d4e2f54ff..ab6d117dae07dd6e951b6d3d5bf09a3cc6f062d6 100644 (file)
@@ -8,7 +8,7 @@
             enabled="[true]"/>
 
   <!-- snapshots -->
-  <snapshots id="1000" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+  <snapshots id="1000" component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              scope="PRJ" qualifier="TRK" created_at="1225544280000" build_date="1225544280000" version="[null]" path=""
              status="P" islast="[false]" depth="0"/>
 
index c27311c8d38c8cf11d7e92b09bbe50c94d372a7e..3b41cf2d22107601497acc234b93c3a1cb6d7250 100644 (file)
@@ -4,9 +4,9 @@
   <metrics id="11" name="coverage_line_hits_data"/>
   <metrics id="12" name="ncloc"/>
 
-  <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[true]"/>
+  <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[true]" uuid="ABCD"/>
 
-  <snapshots id="5" project_id="1" islast="[true]" />
+  <snapshots id="5" component_uuid="ABCD" root_component_uuid="ABCD" islast="[true]" />
 
   <project_measures id="20" snapshot_id="5" metric_id="10" value="[null]" text_value="0123456789012345678901234567890123456789" measure_data="[null]"
                     variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
index c27311c8d38c8cf11d7e92b09bbe50c94d372a7e..3b41cf2d22107601497acc234b93c3a1cb6d7250 100644 (file)
@@ -4,9 +4,9 @@
   <metrics id="11" name="coverage_line_hits_data"/>
   <metrics id="12" name="ncloc"/>
 
-  <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[true]"/>
+  <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[true]" uuid="ABCD"/>
 
-  <snapshots id="5" project_id="1" islast="[true]" />
+  <snapshots id="5" component_uuid="ABCD" root_component_uuid="ABCD" islast="[true]" />
 
   <project_measures id="20" snapshot_id="5" metric_id="10" value="[null]" text_value="0123456789012345678901234567890123456789" measure_data="[null]"
                     variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
index 347beb806c2fe0c3d7d14741ec594a1fb0b885fb..f2e5a9c8decb8873cd3f140c311015ecf1f54080 100644 (file)
@@ -4,10 +4,10 @@
   <metrics id="11" name="coverage_line_hits_data"/>
   <metrics id="12" name="ncloc"/>
 
-  <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[true]" uuid="1"/>
+  <projects id="1" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[true]" uuid="uuid_1"/>
   <projects id="333" kee="dev:John-Doe" enabled="[true]" uuid="333"/>
 
-  <snapshots id="5" project_id="1" islast="[true]" />
+  <snapshots id="5" component_uuid="uuid_1" islast="[true]" root_component_uuid="uuid_1"/>
 
   <project_measures id="20" snapshot_id="5" metric_id="10" value="[null]" text_value="0123456789012345678901234567890123456789" measure_data="[null]"
                     variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"
index 6a01f4517e22f02fbd6819446cee588ab189fcb1..2230f63a43b94deac4b1e206e234a585fa58ae32 100644 (file)
@@ -1,10 +1,10 @@
 <dataset>
 
-  <projects id="1" uuid="1" enabled="[true]" root_id="[null]"
+  <projects id="1" uuid="uuid_1" enabled="[true]" root_id="[null]"
             long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project"
             description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/>
 
-  <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]"
+  <snapshots id="1" component_uuid="uuid_1" parent_snapshot_id="[null]" root_component_uuid="uuid_1" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              build_date="1228222680000"
              version="[null]" path="[null]"/>
 
-  <events id="1" name="Version 1.0" component_uuid="1" snapshot_id="1" category="VERSION" description="[null]"
+  <events id="1" name="Version 1.0" component_uuid="uuid_1" snapshot_id="1" category="VERSION" description="[null]"
           event_date="1228222680000" created_at="1228222680000" event_data="[null]"/>
 
-  <issues id="1" kee="ABCDE" component_uuid="1" project_uuid="1" status="CLOSED" resolution="[null]" line="200"
+  <issues id="1" kee="ABCDE" component_uuid="uuid_1" project_uuid="1" status="CLOSED" resolution="[null]" line="200"
           severity="BLOCKER"
           reporter="[null]" assignee="arthur" rule_id="500"
           manual_severity="[false]"
index fd47744a14fcd9ac918ad247a6fdfddf9844ddc3..4ead71d632c062e4c3a384f7ac8598253e4e0bdd 100644 (file)
@@ -1,17 +1,17 @@
 <dataset>
 
   <!-- snapshot to keep -->
-  <snapshots id="1" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]"
+  <snapshots id="1" parent_snapshot_id="[null]" component_uuid="uuid_1" root_component_uuid="uuid_1" root_snapshot_id="[null]"
+             status="P" islast="[false]" purge_status="[null]"
+             period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
-             period3_mode="[null]" period3_param="[null]"
-             period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]"
+             period3_mode="[null]" period3_param="[null]" period3_date="[null]"
+             period4_mode="[null]" period4_param="[null]" period4_date="[null]"
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
              depth="[null]"
-             scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
-             version="[null]"
-             project_id="1"
-             parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="[false]"
-             path="[null]"/>
+             scope="PRJ" qualifier="TRK" created_at="1228222680000"
+             build_date="1228222680000"
+             version="[null]" path="[null]"/>
 
   <project_measures ID="1" variation_value_1="[null]" variation_value_2="[null]"
                     variation_value_3="[null]" variation_value_4="[null]"
index bb9f31210591a752631f1e349012aaabfa3ff34f..791b313516bf07fc8a908dde0e2060b5de81d25d 100644 (file)
@@ -1,14 +1,15 @@
 <dataset>
 
   <!-- snapshot to keep -->
-  <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]"
+  <snapshots id="1"  parent_snapshot_id="[null]" component_uuid="uuid_1" root_component_uuid="uuid_1" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]"
              period4_mode="[null]" period4_param="[null]" period4_date="[null]"
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
-             depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000"
+             depth="[null]"
+             scope="PRJ" qualifier="TRK" created_at="1228222680000"
              build_date="1228222680000"
              version="[null]" path="[null]"/>
 
@@ -26,7 +27,7 @@
 
 
   <!-- snapshot to remove, id 5 on resource 5-->
-  <snapshots id="5" project_id="5" parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]"
+  <snapshots id="5" component_uuid="uuid_5" parent_snapshot_id="[null]" root_component_uuid="uuid_5" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index e5946cb30f63c21e4ad1559a03f4ca991b12363c..23b5e4aff63babc26e7fee21dff604ee4b5d0797 100644 (file)
@@ -11,7 +11,7 @@
            direction="1" hidden="[false]"/>
 
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="uuid_1" parent_snapshot_id="[null]" root_component_uuid="uuid_1" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
                     text_value="[null]" alert_status="[null]"
                     description="[null]" measure_data="[null]"/>
 
-  <!-- do not delete measure on root characteristic -->
-  <!--project_measures id="3" project_id="1" snapshot_id="1"  characteristic_id="1" metric_id="1"
-                    variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
-                    variation_value_4="[null]"
-                    variation_value_5="[null]"  alert_text="[null]" value="10.0"
-                    person_id="[null]"
-                    text_value="[null]"   alert_status="[null]"
-                    description="[null]" measure_data="[null]"/>-->
-
-  <!-- do not delete measure on characteristic -->
-  <!--project_measures id="4" project_id="1" snapshot_id="1"  characteristic_id="2" metric_id="1"
-                    variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
-                    variation_value_4="[null]"
-                    variation_value_5="[null]"  alert_text="[null]" value="10.0"
-                    person_id="[null]"
-                    text_value="[null]"   alert_status="[null]"
-                    description="[null]" measure_data="[null]"/>-->
-
   <!-- delete measure on metrics that are flagged with delete_historical_data=true -->
   <project_measures id="6" project_id="1" snapshot_id="1" metric_id="2"
                     variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
@@ -63,6 +45,6 @@
                     person_id="123456"
                     variation_value_4="[null]"
                     variation_value_5="[null]" alert_text="[null]" value="10.0"
-                    text_value="[null]" alert_status="[null]"
+                    text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
                     description="[null]" measure_data="[null]"/>
 </dataset>
index b349f6da5b3e8d2ac7b58560e86dd798e9ef8f0e..78e880e7dcc784251d01cf9f64251e2631c4ff80 100644 (file)
@@ -9,7 +9,7 @@ Note that measures, events and reviews are not deleted.
 -->
 <dataset>
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="uuid_1" parent_snapshot_id="[null]" root_component_uuid="uuid_1" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="1"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -43,7 +43,7 @@ Note that measures, events and reviews are not deleted.
 
   <!-- The following is not purged but is kept for DBUnit -->
   <snapshots id="2"
-             project_id="2" parent_snapshot_id="[null]" root_project_id="2" root_snapshot_id="[null]"
+             component_uuid="uuid_2" parent_snapshot_id="[null]" root_component_uuid="uuid_2" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="1"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index bbc1d50c7abf85973aeb3f74ce71cc9e01b81a21..d754dffab3ef1213bb8fad8c2dd1c4c5e27ffba0 100644 (file)
@@ -1,7 +1,7 @@
 <dataset>
 
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="uuid_1" parent_snapshot_id="[null]" root_component_uuid="uuid_1" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -29,7 +29,7 @@
 
   <!-- The following is not purged but is kept for DBUnit -->
   <snapshots id="2"
-             project_id="2" parent_snapshot_id="[null]" root_project_id="2" root_snapshot_id="[null]"
+             component_uuid="uuid_2" parent_snapshot_id="[null]" root_component_uuid="uuid_2" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="1"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -39,7 +39,7 @@
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000"
              build_date="1228222680000" version="[null]" path="[null]"/>
 
-  <project_measures ID="2" project_id="2" SNAPSHOT_ID="2"
+  <project_measures ID="2" project_id="2" SNAPSHOT_ID="2" characteristic_id="[null]"
                     variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
                     variation_value_4="[null]"
                     variation_value_5="[null]" alert_text="[null]" VALUE="10.0" METRIC_ID="1"
index 0f86e1796139e408dfa1f98db5ec2e5e10c04007..00546fd11e75bfee58883bd7b6287138a8a9e8de 100644 (file)
@@ -28,7 +28,7 @@
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -39,7 +39,7 @@
              build_date="1228222680000" version="[null]" path="[null]"/>
 
   <snapshots id="2"
-             project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+             component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -50,7 +50,7 @@
              build_date="1228222680000" version="[null]" path="[null]"/>
 
   <snapshots id="3"
-             project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+             component_uuid="GHIJ" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -62,7 +62,7 @@
 
   <!-- isLast is true, don't want to delete associated source lines -->
   <snapshots id="4"
-             project_id="4" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+             component_uuid="KLMN" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index 1ffcc740ac175de0fcd739727cea74dff2e0460e..e9a7fbb175cc6237dbc220a3913267d30e52c270 100644 (file)
@@ -30,7 +30,7 @@ What has been changed :
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="1"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -41,7 +41,7 @@ What has been changed :
              build_date="1228222680000" version="[null]" path="[null]"/>
 
   <snapshots id="2"
-             project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+             component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[false]" purge_status="1"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -53,7 +53,7 @@ What has been changed :
 
 
   <snapshots id="3"
-             project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+             component_uuid="GHIJ" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[false]" purge_status="1"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index f8262ebc225ef51e30eef78e3777b25b7d1ba69f..c229efccb3b06db09ea56802e0ed77073b0e8df8 100644 (file)
@@ -22,7 +22,7 @@
             deprecated_kee="[null]" authorization_updated_at="[null]"/>
 
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -33,7 +33,7 @@
              version="[null]" path="[null]"/>
 
   <snapshots id="2"
-             project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+             component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -45,7 +45,7 @@
 
 
   <snapshots id="3"
-             project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+             component_uuid="GHIJ" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index 0a9e001e8d209e3cd8deda21163a6985a242c23d..1165b2514bf5eb2178a245965ae1fff9884d0fcb 100644 (file)
@@ -14,7 +14,7 @@ Snapshot 2 has been deleted
 
   <!-- past snapshot with status "processed" and already purged -->
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="projectUUID" parent_snapshot_id="[null]" root_component_uuid="projectUUID" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="1"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -24,20 +24,9 @@ Snapshot 2 has been deleted
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path="[null]"/>
 
-  <!-- snapshot with status "unprocessed" -> to be deleted -->
-  <!--<snapshots id="2"-->
-  <!--project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"-->
-  <!--status="U" islast="[false]" purge_status="0"-->
-  <!--period1_mode="[null]" period1_param="[null]" period1_date="[null]"-->
-  <!--period2_mode="[null]" period2_param="[null]" period2_date="[null]"-->
-  <!--period3_mode="[null]" period3_param="[null]" period3_date="[null]"-->
-  <!--period4_mode="[null]" period4_param="[null]" period4_date="[null]"-->
-  <!--period5_mode="[null]" period5_param="[null]" period5_date="[null]"-->
-  <!--depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000" version="[null]" path="[null]"/>-->
-
   <!-- snapshot with status "processed" and flagged as "last" -> do not purge and do not delete -->
   <snapshots id="3"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="projectUUID" parent_snapshot_id="[null]" root_component_uuid="projectUUID" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="0"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index 91881d8c22fd402a75e517f753af2a0a2be0694d..d80f257666d27e81d8c8b63b3c10ed7fc9bb9dae 100644 (file)
@@ -9,7 +9,7 @@
 
   <!-- past snapshot with status "processed" and already purged -->
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="projectUUID" parent_snapshot_id="[null]" root_component_uuid="projectUUID" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="1"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -21,7 +21,7 @@
 
   <!-- snapshot with status "unprocessed" -> to be deleted -->
   <snapshots id="2"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="projectUUID" parent_snapshot_id="[null]" root_component_uuid="projectUUID" root_snapshot_id="[null]"
              status="U" islast="[false]" purge_status="0"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -33,7 +33,7 @@
 
   <!-- snapshot with status "processed" and flagged as "last" -> do not purge and do not delete -->
   <snapshots id="3"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="projectUUID" parent_snapshot_id="[null]" root_component_uuid="projectUUID" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="0"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index a43778f76a09752e3604309ff07aa74a7ad289a8..763a93149ce67f4cffc352cbba2b65a1c1ceb417 100644 (file)
@@ -29,7 +29,7 @@ What has been changed : purge_status=1 on snapshot 4 (PRJ) and snapshots 5 and 6
 
   <!-- do not purge last snapshots -->
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -40,7 +40,7 @@ What has been changed : purge_status=1 on snapshot 4 (PRJ) and snapshots 5 and 6
              version="[null]" path="[null]"/>
 
   <snapshots id="2"
-             project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+             component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -52,7 +52,7 @@ What has been changed : purge_status=1 on snapshot 4 (PRJ) and snapshots 5 and 6
 
 
   <snapshots id="3"
-             project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+             component_uuid="GHIJ" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -64,7 +64,7 @@ What has been changed : purge_status=1 on snapshot 4 (PRJ) and snapshots 5 and 6
 
   <!-- snapshots to be purged -->
   <snapshots id="4"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="1"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -74,25 +74,4 @@ What has been changed : purge_status=1 on snapshot 4 (PRJ) and snapshots 5 and 6
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path="[null]"/>
 
-  <!--<snapshots id="5"-->
-  <!--project_id="2" parent_snapshot_id="4" root_project_id="1" root_snapshot_id="4"-->
-  <!--status="P" islast="[false]" purge_status="1"-->
-  <!--period1_mode="[null]" period1_param="[null]" period1_date="[null]"-->
-  <!--period2_mode="[null]" period2_param="[null]" period2_date="[null]"-->
-  <!--period3_mode="[null]" period3_param="[null]" period3_date="[null]"-->
-  <!--period4_mode="[null]" period4_param="[null]" period4_date="[null]"-->
-  <!--period5_mode="[null]" period5_param="[null]" period5_date="[null]"-->
-  <!--depth="[null]" scope="DIR" qualifier="DIR" created_at="1228222680000" build_date="1228222680000" version="[null]" path="[null]"/>-->
-
-
-  <!--<snapshots id="6"-->
-  <!--project_id="3" parent_snapshot_id="5" root_project_id="1" root_snapshot_id="4"-->
-  <!--status="P" islast="[false]" purge_status="1"-->
-  <!--period1_mode="[null]" period1_param="[null]" period1_date="[null]"-->
-  <!--period2_mode="[null]" period2_param="[null]" period2_date="[null]"-->
-  <!--period3_mode="[null]" period3_param="[null]" period3_date="[null]"-->
-  <!--period4_mode="[null]" period4_param="[null]" period4_date="[null]"-->
-  <!--period5_mode="[null]" period5_param="[null]" period5_date="[null]"-->
-  <!--depth="[null]" scope="FIL" qualifier="FIL" created_at="1228222680000" build_date="1228222680000" version="[null]" path="[null]"/>-->
-
 </dataset>
index b7089187ceda1440b43ae6556cc657f2fde90b8f..1a20054a9cdb85187490ed7d0a6215fdb896408b 100644 (file)
@@ -23,7 +23,7 @@
 
   <!-- do not purge last snapshots -->
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -34,7 +34,7 @@
              version="[null]" path="[null]"/>
 
   <snapshots id="2"
-             project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+             component_uuid="EFGH" parent_snapshot_id="1" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -46,7 +46,7 @@
 
 
   <snapshots id="3"
-             project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
+             component_uuid="GHIJ" parent_snapshot_id="2" root_component_uuid="ABCD" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -58,7 +58,7 @@
 
   <!-- snapshots to be purged -->
   <snapshots id="4"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -69,7 +69,7 @@
              version="[null]" path="[null]"/>
 
   <snapshots id="5"
-             project_id="2" parent_snapshot_id="4" root_project_id="1" root_snapshot_id="4"
+             component_uuid="EFGH" parent_snapshot_id="4" root_component_uuid="ABCD" root_snapshot_id="4"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -81,7 +81,7 @@
 
 
   <snapshots id="6"
-             project_id="3" parent_snapshot_id="5" root_project_id="1" root_snapshot_id="4"
+             component_uuid="GHIJ" parent_snapshot_id="5" root_component_uuid="ABCD" root_snapshot_id="4"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index 9f1e6d1f057eef57a2f707b8bdc4dba0fb138630..492010d763af6413ea0ee3dcec1b65aa31283fa5 100644 (file)
@@ -7,7 +7,7 @@
             description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
             authorization_updated_at="[null]"/>
 
-  <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]"
+  <snapshots id="1" component_uuid="A" parent_snapshot_id="[null]" root_component_uuid="A" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -58,7 +58,7 @@
             description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
             authorization_updated_at="[null]"/>
 
-  <snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="2" component_uuid="B" parent_snapshot_id="1" root_component_uuid="A" root_snapshot_id="1"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -76,7 +76,7 @@
             description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
             authorization_updated_at="[null]"/>
 
-  <snapshots id="3" project_id="3" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="3" component_uuid="C" parent_snapshot_id="1" root_component_uuid="A" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -94,7 +94,7 @@
             description="[null]" language="java" copy_resource_id="[null]" person_id="[null]"
             authorization_updated_at="[null]"/>
 
-  <snapshots id="4" project_id="4" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1"
+  <snapshots id="4" component_uuid="D" parent_snapshot_id="3" root_component_uuid="A" root_snapshot_id="1"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index 18f56865b2549c44aff941d02e1f66373dde9a05..b4e6316d26a8f8a3ecfa30051dbe1e366f4ac82a 100644 (file)
@@ -2,7 +2,7 @@
 
   <!-- do not delete if islast=true -->
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="P1" parent_snapshot_id="[null]" root_component_uuid="P1" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -14,7 +14,7 @@
 
   <!-- delete only resource 1 -->
   <snapshots id="2"
-             project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+             component_uuid="uuid_2" parent_snapshot_id="1" root_component_uuid="P1" root_snapshot_id="1"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
              depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000"
              version="[null]" path="[null]"/>
 
-  <!-- to be deleted -->
-  <!--<snapshots id="3"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
-             status="P" islast="[false]" purge_status="[null]"
-             period1_mode="[null]" period1_param="[null]" period1_date="[null]"
-             period2_mode="[null]" period2_param="[null]" period2_date="[null]"
-             period3_mode="[null]" period3_param="[null]" period3_date="[null]"
-             period4_mode="[null]" period4_param="[null]" period4_date="[null]"
-             period5_mode="[null]" period5_param="[null]" period5_date="[null]"
-             depth="[null]" scope="PRJ" qualifier="TRK" created_at="1228222680000" build_date="1228222680000" version="[null]" path="[null]"/>-->
 </dataset>
index b22f1e45c20b53d06a7081f40c358ac657c5073c..3f61d3bdbabbc2f1b1aeb74e4afdfdf77ba80405 100644 (file)
@@ -2,7 +2,7 @@
 
   <!-- do not delete if islast=true -->
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="P1" parent_snapshot_id="[null]" root_component_uuid="P1" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -14,7 +14,7 @@
 
   <!-- delete only resource 1 -->
   <snapshots id="2"
-             project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+             component_uuid="uuid_2" parent_snapshot_id="1" root_component_uuid="P1" root_snapshot_id="1"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -26,7 +26,7 @@
 
   <!-- to be deleted -->
   <snapshots id="3"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="P1" parent_snapshot_id="[null]" root_component_uuid="P1" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index 1072cf247147aff118c7862d82ea24b8526b3ccd..59212cb083181ac61f581d21d918b9c21c5661d4 100644 (file)
@@ -11,7 +11,7 @@
 
   <!-- snapshot already purged -->
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="1"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -24,7 +24,7 @@
 
   <!-- do not purge snapshot with islast=true-->
   <snapshots id="2"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -36,7 +36,7 @@
 
   <!-- snapshot to be purged -->
   <snapshots id="3"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="1"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index 034d3856aafa78c06b04ebf316ea4a5cc26a1955..c4b9ccba430b44b6323e6dc6defdce39999893fc 100644 (file)
@@ -11,7 +11,7 @@
 
   <!-- snapshot already purged -->
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="1"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -24,7 +24,7 @@
 
   <!-- do not purge snapshot with islast=true-->
   <snapshots id="2"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -36,7 +36,7 @@
 
   <!-- snapshot to be purged -->
   <snapshots id="3"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="ABCD" parent_snapshot_id="[null]" root_component_uuid="ABCD" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index d523d563dc76790d0ab32e07e1280a904692a9a3..290485d8094f6cb58a08d4ad744cabb798b7a91e 100644 (file)
@@ -2,7 +2,7 @@
 
   <!-- last -> select -->
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="P1" parent_snapshot_id="[null]" root_component_uuid="P1" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -14,7 +14,7 @@
 
   <!-- not processed -> exclude -->
   <snapshots id="2"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="P1" parent_snapshot_id="[null]" root_component_uuid="P1" root_snapshot_id="[null]"
              status="U" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -26,7 +26,7 @@
 
   <!-- on other resource -> exclude -->
   <snapshots id="3"
-             project_id="222" parent_snapshot_id="[null]" root_project_id="222" root_snapshot_id="[null]"
+             component_uuid="uuid_222" parent_snapshot_id="[null]" root_component_uuid="uuid_222" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -38,7 +38,7 @@
 
   <!-- without event -> select -->
   <snapshots id="4"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="P1" parent_snapshot_id="[null]" root_component_uuid="P1" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
@@ -50,7 +50,7 @@
 
   <!-- with event -> select -->
   <snapshots id="5"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="P1" parent_snapshot_id="[null]" root_component_uuid="P1" root_snapshot_id="[null]"
              status="P" islast="[false]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index 9bf6e8cfa14a4fe145dab7d9ae8727cb4a66c2bd..348c6520e654880b2a6add868cc1076b732e7be0 100644 (file)
@@ -6,7 +6,7 @@
             authorization_updated_at="[null]"/>
 
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="1" parent_snapshot_id="[null]" root_component_uuid="1" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"
index d826ee8e3113f37db97e952ed37cb145619d61a0..17230f4310e2b9457b63828f329df3a25e072e4f 100644 (file)
@@ -6,7 +6,7 @@
             authorization_updated_at="[null]"/>
 
   <snapshots id="1"
-             project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
+             component_uuid="P1" parent_snapshot_id="[null]" root_component_uuid="P1" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period2_mode="[null]" period2_param="[null]" period2_date="[null]"