// 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);
}
/**
}
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);
}
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();
}
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());
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));
}
return orderedSnapshotIds;
}
- List<Long> getOrderedComponentIds() {
- return orderedComponentIds;
+ List<String> getOrderedComponentUuids() {
+ return orderedComponentUuids;
}
}
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);
}
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 + '\'' +
'}';
}
}
PurgeConfiguration configuration = newDefaultPurgeConfiguration(projectSettings, idUuidPair);
- cleanHistoricalData(session, configuration.rootProjectIdUuid().getId(), projectSettings);
+ cleanHistoricalData(session, configuration.rootProjectIdUuid().getUuid(), projectSettings);
doPurge(session, configuration);
session.commit();
}
}
- 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);
}
}
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;
/**
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
}
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);
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;
}
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;
}
@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) {
@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;
}
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);
@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;
}
@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;
}
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) {
try {
new PathAwareCrawler<>(
new PersistSnapshotsPathAwareVisitor(session, analysisMetadataHolder.getAnalysisDate(), dbIdsRepository))
- .visit(treeRootHolder.getRoot());
+ .visit(treeRootHolder.getRoot());
session.commit();
} finally {
dbClient.closeSession(session);
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);
@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);
@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);
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)
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();
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);
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()) {
@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));
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);
}
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()) {
@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();
}
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);
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)
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);
}
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();
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()));
}
}
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;
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));
}
@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));
}
}
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);
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;
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
@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();
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);
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);
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);
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);
underTest.execute();
- SnapshotDto fileSnapshot = getUnprocessedSnapshot(fileDto.getId());
+ SnapshotDto fileSnapshot = getUnprocessedSnapshot(fileDto.uuid());
assertThat(fileSnapshot.getQualifier()).isEqualTo("UTS");
assertThat(fileSnapshot.getScope()).isEqualTo("FIL");
}
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);
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();
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();
}
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);
}
.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) {
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;
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);
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);
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);
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());
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();
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);
}
.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");
<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>
<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"/>
<!-- 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"/>
<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"/>
<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"/>
<!-- 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"/>
<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"/>
<!-- 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"/>
<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"/>
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"/>
<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"/>
<!-- 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"/>
<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"/>
<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"/>
<!-- 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"/>
<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"/>
<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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
<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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
<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>
<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>
<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>
<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"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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=""/>
<!-- 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=""/>
<!-- 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=""/>
<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=""/>
<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=""/>
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)
: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
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 }
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')
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
@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?
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)
# ---------- 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
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) }
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
@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])
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
end
end
- redirect_to :action => 'history', :id => snapshot.root_project_id
+ redirect_to :action => 'history', :id => snapshot.root_project.id
end
def delete_version
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
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
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
#
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
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
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 = []
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
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'
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
' 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')
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'
# 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')
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
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
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
end
def resource_id
- project_id
+ project.id
end
def periods?
end
def resource_id_for_authorization
- root_project_id || project_id
+ root_project.id
end
def path_name
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
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
/**
* 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;
}
}
- 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();
.setNonIndexedOnly(false)
.setQualifiers(RENAMABLE_QUALIFIERS)
.setScopes(RENAMABLE_SCOPES)
- .setRootProjectId(rootProjectId);
+ .setRootComponentUuid(rootProjectUuid);
session.select(SELECT_RESOURCES, query, context -> {
ResourceDto resource = (ResourceDto) context.getResultObject();
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;
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;
}
*/
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);
}
@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);
}
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);
}
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);
}
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;
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;
}
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:
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> {
}
}
- private enum ToComponentId implements Function<SnapshotDto, Long> {
- INSTANCE;
-
- @Override
- public Long apply(@Nonnull SnapshotDto input) {
- return input.getComponentId();
- }
- }
-
-
}
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);
}
}
}
- private Long componentId;
private String componentUuid;
private Long createdAfter;
private Long createdBefore;
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;
// 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
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) {
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;
}
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());
}
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.
void deleteEvent(long eventId);
- void setSnapshotIsLastToFalse(long resourceId);
+ void setSnapshotIsLastToFalse(@Param("componentUuid") String componentUuid);
void deleteResourceLinks(@Param("componentUuids") List<String> componentUuids);
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);
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;
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;
}
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;
}
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);
}
}
- 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);
}
}
<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}
<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>
<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"/>
<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
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 <> #{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 < #{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},
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
<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}
<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})
<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 <> 'LIB' and
+ s.component_uuid=#{componentUuid} and s.status='P' and s.qualifier <> '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 <> 'LIB' and
+ s.component_uuid=#{componentUuid} and s.status='P' and s.qualifier <> '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">
.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();
}
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");
}
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");
}
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
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);
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");
@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();
}
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);
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();
}
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);
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
);
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
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);
private static SnapshotDto defaultSnapshot() {
return new SnapshotDto()
- .setComponentId(3L)
- .setRootProjectId(1L)
+ .setComponentUuid("uuid_3")
+ .setRootComponentUuid("uuid_1")
.setParentId(2L)
.setRootId(1L)
.setStatus("P")
.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")
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");
@Test
public void test_setters_and_getters() throws Exception {
SnapshotQuery query = new SnapshotQuery()
- .setComponentId(1L)
.setComponentUuid("abcd")
.setIsLast(true)
.setStatus("P")
.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");
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)
}
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())
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;
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;
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();
}
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;
}
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) {
});
}
- 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();
- }
- });
- }
}
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();
@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();
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();
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"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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]"
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>
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>
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" -->
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" -->
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 -->
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]"
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]"
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]"
<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"
<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"/>
<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"/>
<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"/>
<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"/>
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"
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"
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"
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"
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"
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"
<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"
<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"
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"
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"
<!-- 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"
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"
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"
<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>
<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 -->
<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"/>
<!-- 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"/>
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"/>
<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]"
<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]"
<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]"
<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]"
<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]"
<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]"/>
<!-- 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]"
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]"
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>
-->
<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]"
<!-- 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]"
<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]"
<!-- 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]"
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"
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]"
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]"
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]"
<!-- 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]"
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]"
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]"
<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]"
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]"
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]"
<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]"
<!-- 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]"
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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
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]"
<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]"
<!-- 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]"
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>
<!-- 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]"
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]"
<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]"
<!-- 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]"
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]"
<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]"
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]"
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]"
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]"
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]"
<!-- 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]"
<!-- 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>
<!-- 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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
<!-- 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]"
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]"
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]"