import org.sonar.api.Plugin;\r
import org.sonar.api.Properties;\r
import org.sonar.api.Property;\r
+import org.sonar.plugins.dbcleaner.api.DbCleanerConstants;\r
import org.sonar.plugins.dbcleaner.period.DefaultPeriodCleaner;\r
import org.sonar.plugins.dbcleaner.period.PeriodPurge;\r
import org.sonar.plugins.dbcleaner.purges.*;\r
import org.sonar.plugins.dbcleaner.runner.PurgeRunner;\r
-import org.sonar.plugins.dbcleaner.util.DbCleanerConstants;\r
\r
import java.util.Arrays;\r
import java.util.List;\r
--- /dev/null
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2010 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+ */
+package org.sonar.plugins.dbcleaner.api;
+
+public interface DbCleanerConstants {
+
+ String PLUGIN_KEY = "dbcleaner";
+ String PLUGIN_NAME = "DbCleaner";
+ String MONTHS_BEFORE_KEEPING_ONLY_ONE_SNAPSHOT_BY_WEEK = "sonar.dbcleaner.monthsBeforeKeepingOnlyOneSnapshotByWeek";
+ String MONTHS_BEFORE_KEEPING_ONLY_ONE_SNAPSHOT_BY_MONTH = "sonar.dbcleaner.monthsBeforeKeepingOnlyOneSnapshotByMonth";
+ String MONTHS_BEFORE_DELETING_ALL_SNAPSHOTS = "sonar.dbcleaner.monthsBeforeDeletingAllSnapshots";
+ String ONE_MONTH = "1";
+ String ONE_YEAR = "12";
+ String THREE_YEARS = "36";
+}
--- /dev/null
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2009 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+ */
+package org.sonar.plugins.dbcleaner.api;
+
+import org.apache.commons.configuration.Configuration;
+import org.sonar.api.database.DatabaseSession;
+import org.sonar.api.database.model.*;
+import org.sonar.api.design.DependencyDto;
+import org.sonar.api.utils.TimeProfiler;
+
+import javax.persistence.Query;
+import java.util.List;
+
+/**
+ * @since 2.5
+ */
+public final class PurgeUtils {
+
+ public static final int DEFAULT_MINIMUM_PERIOD_IN_HOURS = 12;
+ public static final String PROP_KEY_MINIMUM_PERIOD_IN_HOURS = "sonar.purge.minimumPeriodInHours";
+
+ /**
+ * Maximum elements in the SQL statement "IN" due to an Oracle limitation (see error ORA-01795)
+ */
+ public static final int MAX_IN_ELEMENTS = 950;
+
+ private PurgeUtils() {
+ // only static methods
+ }
+
+ public static int getMinimumPeriodInHours(Configuration conf) {
+ int hours = DEFAULT_MINIMUM_PERIOD_IN_HOURS;
+ if (conf != null) {
+ hours = conf.getInt(PROP_KEY_MINIMUM_PERIOD_IN_HOURS, DEFAULT_MINIMUM_PERIOD_IN_HOURS);
+ }
+ return hours;
+ }
+
+ public static void deleteSnapshotsData(DatabaseSession session, List<Integer> snapshotIds) {
+ deleteMeasuresBySnapshotId(session, snapshotIds);
+ deleteSources(session, snapshotIds);
+ deleteViolations(session, snapshotIds);
+ deleteDependencies(session, snapshotIds);
+ deleteSnapshots(session, snapshotIds);
+ }
+
+ public static void deleteDependencies(DatabaseSession session, List<Integer> snapshotIds) {
+ executeQuery(session, "delete dependencies", snapshotIds, "delete from " + DependencyDto.class.getSimpleName() + " d where d.fromSnapshotId in (:ids)");
+ executeQuery(session, "delete dependencies", snapshotIds, "delete from " + DependencyDto.class.getSimpleName() + " d where d.toSnapshotId in (:ids)");
+ }
+
+ /**
+ * Delete all measures, including MEASURE_DATA
+ */
+ public static void deleteMeasuresBySnapshotId(DatabaseSession session, List<Integer> snapshotIds) {
+ executeQuery(session, "delete measures by snapshot id", snapshotIds, "delete from " + MeasureData.class.getSimpleName() + " m where m.snapshotId in (:ids)");
+ executeQuery(session, "delete measures by snapshot id", snapshotIds, "delete from " + MeasureModel.class.getSimpleName() + " m where m.snapshotId in (:ids)");
+ }
+
+ /**
+ * Delete all measures, including MEASURE_DATA
+ */
+ public static void deleteMeasuresById(DatabaseSession session, List<Integer> measureIds) {
+ executeQuery(session, "delete measures by id", measureIds, "delete from " + MeasureData.class.getSimpleName() + " m where m.measure.id in (:ids)");
+ executeQuery(session, "delete measures by id", measureIds, "delete from " + MeasureModel.class.getSimpleName() + " m where m.id in (:ids)");
+ }
+
+ /**
+ * Delete SNAPSHOT_SOURCES table
+ */
+ public static void deleteSources(DatabaseSession session, List<Integer> snapshotIds) {
+ executeQuery(session, "delete sources", snapshotIds, "delete from " + SnapshotSource.class.getSimpleName() + " e where e.snapshotId in (:ids)");
+ }
+
+ /**
+ * Delete violations (RULE_FAILURES table)
+ */
+ public static void deleteViolations(DatabaseSession session, List<Integer> snapshotIds) {
+ executeQuery(session, "delete violations", snapshotIds, "delete from " + RuleFailureModel.class.getSimpleName() + " e where e.snapshotId in (:ids)");
+ }
+
+ /**
+ * Delete SNAPSHOTS table
+ */
+ public static void deleteSnapshots(DatabaseSession session, List<Integer> snapshotIds) {
+ executeQuery(session, "delete snapshots", snapshotIds, "delete from " + Snapshot.class.getSimpleName() + " s where s.id in (:ids)");
+ }
+
+ /**
+ * Paginate execution of SQL requests to avoid exceeding size of rollback segment
+ */
+ public static void executeQuery(DatabaseSession session, String description, List<Integer> ids, String hql) {
+ if (ids == null || ids.isEmpty()) {
+ return;
+ }
+
+ TimeProfiler profiler = new TimeProfiler().setLevelToDebug().start("Execute " + description);
+
+ int index = 0;
+ while (index < ids.size()) {
+ Query query = session.createQuery(hql);
+ List<Integer> paginedSids = ids.subList(index, Math.min(ids.size(), index + MAX_IN_ELEMENTS));
+ query.setParameter("ids", paginedSids);
+ query.executeUpdate();
+ index += MAX_IN_ELEMENTS;
+ session.commit();
+ }
+
+ profiler.stop();
+ }
+
+}
import org.sonar.api.database.model.Snapshot;
import org.sonar.api.resources.Project;
import org.sonar.plugins.dbcleaner.api.PeriodCleaner;
-import org.sonar.plugins.dbcleaner.util.PurgeUtils;
+import org.sonar.plugins.dbcleaner.api.PurgeUtils;
import java.text.DateFormat;
import java.util.Date;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.resources.Project;
-import org.sonar.plugins.dbcleaner.util.DbCleanerConstants;
+import org.sonar.plugins.dbcleaner.api.DbCleanerConstants;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.sonar.api.database.model.Snapshot;
import org.sonar.plugins.dbcleaner.api.Purge;
import org.sonar.plugins.dbcleaner.api.PurgeContext;
-import org.sonar.plugins.dbcleaner.util.PurgeUtils;
+import org.sonar.plugins.dbcleaner.api.PurgeUtils;
import java.util.List;
import org.sonar.api.design.DependencyDto;
import org.sonar.plugins.dbcleaner.api.Purge;
import org.sonar.plugins.dbcleaner.api.PurgeContext;
-import org.sonar.plugins.dbcleaner.util.PurgeUtils;
+import org.sonar.plugins.dbcleaner.api.PurgeUtils;
import javax.persistence.Query;
import java.util.List;
import org.sonar.api.database.model.Snapshot;
import org.sonar.plugins.dbcleaner.api.Purge;
import org.sonar.plugins.dbcleaner.api.PurgeContext;
-import org.sonar.plugins.dbcleaner.util.PurgeUtils;
+import org.sonar.plugins.dbcleaner.api.PurgeUtils;
import java.util.List;
import org.sonar.plugins.dbcleaner.api.Purge;
import org.sonar.plugins.dbcleaner.api.PurgeContext;
-import org.sonar.plugins.dbcleaner.util.PurgeUtils;
+import org.sonar.plugins.dbcleaner.api.PurgeUtils;
import java.util.List;
import org.sonar.api.utils.Logs;
import org.sonar.plugins.dbcleaner.api.Purge;
import org.sonar.plugins.dbcleaner.api.PurgeContext;
-import org.sonar.plugins.dbcleaner.util.PurgeUtils;
+import org.sonar.plugins.dbcleaner.api.PurgeUtils;
import javax.persistence.Query;
import java.util.Date;
import org.sonar.api.database.model.ResourceModel;
import org.sonar.plugins.dbcleaner.api.Purge;
import org.sonar.plugins.dbcleaner.api.PurgeContext;
-import org.sonar.plugins.dbcleaner.util.PurgeUtils;
+import org.sonar.plugins.dbcleaner.api.PurgeUtils;
import java.util.List;
import org.sonar.api.database.model.ResourceModel;
import org.sonar.plugins.dbcleaner.api.Purge;
import org.sonar.plugins.dbcleaner.api.PurgeContext;
-import org.sonar.plugins.dbcleaner.util.PurgeUtils;
+import org.sonar.plugins.dbcleaner.api.PurgeUtils;
import java.util.List;
import org.sonar.api.database.model.User;
import org.sonar.plugins.dbcleaner.api.Purge;
import org.sonar.plugins.dbcleaner.api.PurgeContext;
-import org.sonar.plugins.dbcleaner.util.PurgeUtils;
+import org.sonar.plugins.dbcleaner.api.PurgeUtils;
import java.util.List;
import org.sonar.api.security.UserRole;
import org.sonar.plugins.dbcleaner.api.Purge;
import org.sonar.plugins.dbcleaner.api.PurgeContext;
-import org.sonar.plugins.dbcleaner.util.PurgeUtils;
+import org.sonar.plugins.dbcleaner.api.PurgeUtils;
import java.util.List;
import org.sonar.api.database.model.Snapshot;
import org.sonar.plugins.dbcleaner.api.Purge;
import org.sonar.plugins.dbcleaner.api.PurgeContext;
-import org.sonar.plugins.dbcleaner.util.PurgeUtils;
+import org.sonar.plugins.dbcleaner.api.PurgeUtils;
import java.util.List;
import org.sonar.api.utils.Logs;
import org.sonar.plugins.dbcleaner.api.Purge;
import org.sonar.plugins.dbcleaner.api.PurgeContext;
-import org.sonar.plugins.dbcleaner.util.PurgeUtils;
+import org.sonar.plugins.dbcleaner.api.PurgeUtils;
import javax.persistence.Query;
import java.util.Date;
import org.sonar.api.database.model.Snapshot;
import org.sonar.plugins.dbcleaner.api.Purge;
import org.sonar.plugins.dbcleaner.api.PurgeContext;
-import org.sonar.plugins.dbcleaner.util.PurgeUtils;
+import org.sonar.plugins.dbcleaner.api.PurgeUtils;
import java.util.List;
+++ /dev/null
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2010 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.dbcleaner.util;
-
-public interface DbCleanerConstants {
-
- String PLUGIN_KEY = "dbcleaner";
- String PLUGIN_NAME = "DbCleaner";
- String MONTHS_BEFORE_KEEPING_ONLY_ONE_SNAPSHOT_BY_WEEK = "sonar.dbcleaner.monthsBeforeKeepingOnlyOneSnapshotByWeek";
- String MONTHS_BEFORE_KEEPING_ONLY_ONE_SNAPSHOT_BY_MONTH = "sonar.dbcleaner.monthsBeforeKeepingOnlyOneSnapshotByMonth";
- String MONTHS_BEFORE_DELETING_ALL_SNAPSHOTS = "sonar.dbcleaner.monthsBeforeDeletingAllSnapshots";
- String ONE_MONTH = "1";
- String ONE_YEAR = "12";
- String THREE_YEARS = "36";
-}
+++ /dev/null
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.dbcleaner.util;
-
-import org.apache.commons.configuration.Configuration;
-import org.sonar.api.database.DatabaseSession;
-import org.sonar.api.database.model.*;
-import org.sonar.api.design.DependencyDto;
-import org.sonar.api.utils.TimeProfiler;
-
-import javax.persistence.Query;
-import java.util.List;
-
-/**
- * @since 2.5
- */
-public final class PurgeUtils {
-
- public static final int DEFAULT_MINIMUM_PERIOD_IN_HOURS = 12;
- public static final String PROP_KEY_MINIMUM_PERIOD_IN_HOURS = "sonar.purge.minimumPeriodInHours";
-
- /**
- * Maximum elements in the SQL statement "IN" due to an Oracle limitation (see error ORA-01795)
- */
- public static final int MAX_IN_ELEMENTS = 950;
-
- private PurgeUtils() {
- // only static methods
- }
-
- public static int getMinimumPeriodInHours(Configuration conf) {
- int hours = DEFAULT_MINIMUM_PERIOD_IN_HOURS;
- if (conf != null) {
- hours = conf.getInt(PROP_KEY_MINIMUM_PERIOD_IN_HOURS, DEFAULT_MINIMUM_PERIOD_IN_HOURS);
- }
- return hours;
- }
-
- public static void deleteSnapshotsData(DatabaseSession session, List<Integer> snapshotIds) {
- deleteMeasuresBySnapshotId(session, snapshotIds);
- deleteSources(session, snapshotIds);
- deleteViolations(session, snapshotIds);
- deleteDependencies(session, snapshotIds);
- deleteSnapshots(session, snapshotIds);
- }
-
- public static void deleteDependencies(DatabaseSession session, List<Integer> snapshotIds) {
- executeQuery(session, "delete dependencies", snapshotIds, "delete from " + DependencyDto.class.getSimpleName() + " d where d.fromSnapshotId in (:ids)");
- executeQuery(session, "delete dependencies", snapshotIds, "delete from " + DependencyDto.class.getSimpleName() + " d where d.toSnapshotId in (:ids)");
- }
-
- /**
- * Delete all measures, including MEASURE_DATA
- */
- public static void deleteMeasuresBySnapshotId(DatabaseSession session, List<Integer> snapshotIds) {
- executeQuery(session, "delete measures by snapshot id", snapshotIds, "delete from " + MeasureData.class.getSimpleName() + " m where m.snapshotId in (:ids)");
- executeQuery(session, "delete measures by snapshot id", snapshotIds, "delete from " + MeasureModel.class.getSimpleName() + " m where m.snapshotId in (:ids)");
- }
-
- /**
- * Delete all measures, including MEASURE_DATA
- */
- public static void deleteMeasuresById(DatabaseSession session, List<Integer> measureIds) {
- executeQuery(session, "delete measures by id", measureIds, "delete from " + MeasureData.class.getSimpleName() + " m where m.measure.id in (:ids)");
- executeQuery(session, "delete measures by id", measureIds, "delete from " + MeasureModel.class.getSimpleName() + " m where m.id in (:ids)");
- }
-
- /**
- * Delete SNAPSHOT_SOURCES table
- */
- public static void deleteSources(DatabaseSession session, List<Integer> snapshotIds) {
- executeQuery(session, "delete sources", snapshotIds, "delete from " + SnapshotSource.class.getSimpleName() + " e where e.snapshotId in (:ids)");
- }
-
- /**
- * Delete violations (RULE_FAILURES table)
- */
- public static void deleteViolations(DatabaseSession session, List<Integer> snapshotIds) {
- executeQuery(session, "delete violations", snapshotIds, "delete from " + RuleFailureModel.class.getSimpleName() + " e where e.snapshotId in (:ids)");
- }
-
- /**
- * Delete SNAPSHOTS table
- */
- public static void deleteSnapshots(DatabaseSession session, List<Integer> snapshotIds) {
- executeQuery(session, "delete snapshots", snapshotIds, "delete from " + Snapshot.class.getSimpleName() + " s where s.id in (:ids)");
- }
-
- /**
- * Paginate execution of SQL requests to avoid exceeding size of rollback segment
- */
- public static void executeQuery(DatabaseSession session, String description, List<Integer> ids, String hql) {
- if (ids == null || ids.isEmpty()) {
- return;
- }
-
- TimeProfiler profiler = new TimeProfiler().setLevelToDebug().start("Execute " + description);
-
- int index = 0;
- while (index < ids.size()) {
- Query query = session.createQuery(hql);
- List<Integer> paginedSids = ids.subList(index, Math.min(ids.size(), index + MAX_IN_ELEMENTS));
- query.setParameter("ids", paginedSids);
- query.executeUpdate();
- index += MAX_IN_ELEMENTS;
- session.commit();
- }
-
- profiler.stop();
- }
-
-}
--- /dev/null
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2009 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+ */
+package org.sonar.plugins.dbcleaner.api;
+
+import org.apache.commons.configuration.PropertiesConfiguration;
+import org.junit.Test;
+import org.sonar.jpa.test.AbstractDbUnitTestCase;
+import org.sonar.plugins.dbcleaner.api.PurgeUtils;
+
+import java.sql.SQLException;
+import java.util.Arrays;
+
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
+
+public class PurgeUtilsTest extends AbstractDbUnitTestCase {
+
+ @Test
+ public void shouldReturnDefaultMinimumPeriod() {
+ assertThat(PurgeUtils.getMinimumPeriodInHours(new PropertiesConfiguration()), is(PurgeUtils.DEFAULT_MINIMUM_PERIOD_IN_HOURS));
+ }
+
+ @Test
+ public void shouldReturnMinimumPeriod() {
+ PropertiesConfiguration conf = new PropertiesConfiguration();
+ conf.setProperty(PurgeUtils.PROP_KEY_MINIMUM_PERIOD_IN_HOURS, "9");
+ assertThat(PurgeUtils.getMinimumPeriodInHours(conf), is(9));
+ }
+
+ @Test
+ public void purgeSnapshots() throws SQLException {
+ setupData("purgeSnapshots");
+
+ PurgeUtils.deleteSnapshotsData(getSession(), Arrays.asList(3, 4));
+
+ checkTables("purgeSnapshots", "snapshots", "project_measures", "measure_data", "rule_failures", "snapshot_sources", "dependencies");
+ }
+}
+++ /dev/null
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.plugins.dbcleaner.util;
-
-import org.apache.commons.configuration.PropertiesConfiguration;
-import org.junit.Test;
-import org.sonar.jpa.test.AbstractDbUnitTestCase;
-
-import java.sql.SQLException;
-import java.util.Arrays;
-
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
-public class PurgeUtilsTest extends AbstractDbUnitTestCase {
-
- @Test
- public void shouldReturnDefaultMinimumPeriod() {
- assertThat(PurgeUtils.getMinimumPeriodInHours(new PropertiesConfiguration()), is(PurgeUtils.DEFAULT_MINIMUM_PERIOD_IN_HOURS));
- }
-
- @Test
- public void shouldReturnMinimumPeriod() {
- PropertiesConfiguration conf = new PropertiesConfiguration();
- conf.setProperty(PurgeUtils.PROP_KEY_MINIMUM_PERIOD_IN_HOURS, "9");
- assertThat(PurgeUtils.getMinimumPeriodInHours(conf), is(9));
- }
-
- @Test
- public void purgeSnapshots() throws SQLException {
- setupData("purgeSnapshots");
-
- PurgeUtils.deleteSnapshotsData(getSession(), Arrays.asList(3, 4));
-
- checkTables("purgeSnapshots", "snapshots", "project_measures", "measure_data", "rule_failures", "snapshot_sources", "dependencies");
- }
-}
--- /dev/null
+<dataset>
+ <rules_categories id="1" name="category one" description="[null]"/>
+ <rules id="1" name="foo" rules_category_id="1" plugin_config_key="checker/foo" plugin_rule_key="checkstyle.rule1"
+ plugin_name="maven-checkstyle-plugin" description="description" cardinality="SINGLE" parent_id="[null]" />
+
+ <metrics id="1" name="ncloc" val_type="INT" description="[null]" domain="[null]"
+ short_name="" qualitative="false" user_managed="false" enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
+
+ <!-- project -->
+ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="mygroup:myartifact" name="project"
+ root_id="[null]"
+ description="[null]"
+ enabled="true" language="java" copy_resource_id="[null]"/>
+
+ <!-- package -->
+ <projects long_name="[null]" id="2" scope="DIR" qualifier="PAC" kee="mygroup:myartifact:my.package" name="package"
+ root_id="1"
+ description="[null]"
+ enabled="true" language="java" copy_resource_id="[null]"/>
+
+ <!-- files -->
+ <projects long_name="[null]" id="3" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class1"
+ name="class" root_id="1"
+ description="[null]"
+ enabled="true" language="java" copy_resource_id="[null]"/>
+
+ <projects long_name="[null]" id="4" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class2"
+ name="class" root_id="1"
+ description="[null]"
+ enabled="true" language="java" copy_resource_id="[null]"/>
+
+
+ <snapshots depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" version="[null]"
+ project_id="1"
+ parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="false"
+ path="[null]"/>
+
+ <snapshots depth="[null]" id="2" scope="DIR" qualifier="PAC" created_at="2008-12-02 13:58:00.00" version="[null]"
+ project_id="2"
+ parent_snapshot_id="2" root_project_id="[null]" root_snapshot_id="1" status="P" islast="false"
+ path="[null]"/>
+
+
+ <!--<snapshots depth="[null]" id="3" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" version="[null]"-->
+ <!--project_id="3"-->
+ <!--parent_snapshot_id="2" root_project_id="[null]" root_snapshot_id="1" status="P" islast="false"-->
+ <!--path="[null]"/>-->
+
+ <!--<snapshots depth="[null]" id="4" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" version="[null]"-->
+ <!--project_id="4"-->
+ <!--parent_snapshot_id="2" root_project_id="[null]" root_snapshot_id="1" status="P" islast="false"-->
+ <!--path="[null]"/>-->
+
+
+ <SNAPSHOT_SOURCES ID="1" SNAPSHOT_ID="30" DATA="some sources"/>
+ <!--<SNAPSHOT_SOURCES ID="2" SNAPSHOT_ID="4" DATA="some sources"/>-->
+
+
+ <RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/>
+ <RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/>
+ <!--<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/>-->
+ <!--<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/>-->
+
+
+ <project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"
+ rule_priority="[null]"
+ alert_text="[null]" ID="1" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="1" RULES_CATEGORY_ID="1"
+ RULE_ID="1"
+ text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
+ alert_status="[null]" description="[null]"/>
+
+ <project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"
+ rule_priority="[null]"
+ alert_text="[null]" ID="2" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="2" RULES_CATEGORY_ID="1"
+ RULE_ID="1"
+ text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
+ alert_status="[null]" description="[null]"/>
+
+ <!--<project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"-->
+ <!--rule_priority="[null]"-->
+ <!--alert_text="[null]" ID="3" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="3" RULES_CATEGORY_ID="1"-->
+ <!--RULE_ID="1"-->
+ <!--text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"-->
+ <!--alert_status="[null]" description="[null]"/>-->
+
+ <!--<project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"-->
+ <!--rule_priority="[null]"-->
+ <!--alert_text="[null]" ID="4" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="4" RULES_CATEGORY_ID="1"-->
+ <!--RULE_ID="1"-->
+ <!--text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"-->
+ <!--alert_status="[null]" description="[null]"/>-->
+
+
+ <measure_data id="1" measure_id="1" snapshot_id="1" data="[null]"/>
+ <measure_data id="2" measure_id="2" snapshot_id="2" data="[null]"/>
+ <!--<measure_data id="3" measure_id="3" snapshot_id="3" data="[null]"/>-->
+ <!--<measure_data id="4" measure_id="4" snapshot_id="4" data="[null]"/>-->
+
+ <dependencies id="1" from_resource_id="1" from_snapshot_id="1" to_resource_id="30" to_snapshot_id="30"
+ parent_dependency_id="[null]" project_snapshot_id="1"
+ dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
+
+ <!--<dependencies id="2" from_resource_id="3" from_snapshot_id="3" to_resource_id="40" to_snapshot_id="40"-->
+ <!--parent_dependency_id="[null]" project_snapshot_id="1"-->
+ <!--dep_usage="INHERITS" dep_weight="1" from_scope="FIL" to_scope="FIL"/>-->
+
+ <!--<dependencies id="3" from_resource_id="50" from_snapshot_id="50" to_resource_id="3" to_snapshot_id="3"-->
+ <!--parent_dependency_id="[null]" project_snapshot_id="1"-->
+ <!--dep_usage="INHERITS" dep_weight="1" from_scope="FIL" to_scope="FIL"/>-->
+
+</dataset>
\ No newline at end of file
--- /dev/null
+<dataset>
+ <rules_categories id="1" name="category one" description="[null]"/>
+ <rules id="1" name="foo" rules_category_id="1" plugin_config_key="checker/foo" plugin_rule_key="checkstyle.rule1"
+ plugin_name="maven-checkstyle-plugin" description="description" cardinality="SINGLE" parent_id="[null]"/>
+
+ <metrics id="1" name="ncloc" val_type="INT" description="[null]" domain="[null]"
+ short_name="" qualitative="false" user_managed="false" enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
+
+ <!-- project -->
+ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="mygroup:myartifact" name="project"
+ root_id="[null]"
+ description="[null]"
+ enabled="true" language="java" copy_resource_id="[null]"/>
+
+ <!-- package -->
+ <projects long_name="[null]" id="2" scope="DIR" qualifier="PAC" kee="mygroup:myartifact:my.package" name="package"
+ root_id="1"
+ description="[null]"
+ enabled="true" language="java" copy_resource_id="[null]"/>
+
+ <!-- files -->
+ <projects long_name="[null]" id="3" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class1"
+ name="class" root_id="1"
+ description="[null]"
+ enabled="true" language="java" copy_resource_id="[null]"/>
+
+ <projects long_name="[null]" id="4" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class2"
+ name="class" root_id="1"
+ description="[null]"
+ enabled="true" language="java" copy_resource_id="[null]"/>
+
+
+ <snapshots depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" version="[null]"
+ project_id="1"
+ parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="false"
+ path="[null]"/>
+
+ <snapshots depth="[null]" id="2" scope="DIR" qualifier="PAC" created_at="2008-12-02 13:58:00.00" version="[null]"
+ project_id="2"
+ parent_snapshot_id="2" root_project_id="[null]" root_snapshot_id="1" status="P" islast="false"
+ path="[null]"/>
+
+
+ <snapshots depth="[null]" id="3" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" version="[null]"
+ project_id="3"
+ parent_snapshot_id="2" root_project_id="[null]" root_snapshot_id="1" status="P" islast="false"
+ path="[null]"/>
+
+ <snapshots depth="[null]" id="4" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" version="[null]"
+ project_id="4"
+ parent_snapshot_id="2" root_project_id="[null]" root_snapshot_id="1" status="P" islast="false"
+ path="[null]"/>
+
+
+ <SNAPSHOT_SOURCES ID="1" SNAPSHOT_ID="30" DATA="some sources"/>
+ <SNAPSHOT_SOURCES ID="2" SNAPSHOT_ID="4" DATA="some sources"/>
+
+
+ <RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/>
+ <RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/>
+ <RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/>
+ <RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/>
+
+
+ <project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"
+ rule_priority="[null]"
+ alert_text="[null]" ID="1" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="1" RULES_CATEGORY_ID="1"
+ RULE_ID="1"
+ text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
+ alert_status="[null]" description="[null]"/>
+
+ <project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"
+ rule_priority="[null]"
+ alert_text="[null]" ID="2" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="2" RULES_CATEGORY_ID="1"
+ RULE_ID="1"
+ text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
+ alert_status="[null]" description="[null]"/>
+
+ <project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"
+ rule_priority="[null]"
+ alert_text="[null]" ID="3" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="3" RULES_CATEGORY_ID="1"
+ RULE_ID="1"
+ text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
+ alert_status="[null]" description="[null]"/>
+
+ <project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"
+ rule_priority="[null]"
+ alert_text="[null]" ID="4" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="4" RULES_CATEGORY_ID="1"
+ RULE_ID="1"
+ text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
+ alert_status="[null]" description="[null]"/>
+
+
+ <measure_data id="1" measure_id="1" snapshot_id="1" data="[null]"/>
+ <measure_data id="2" measure_id="2" snapshot_id="2" data="[null]"/>
+ <measure_data id="3" measure_id="3" snapshot_id="3" data="[null]"/>
+ <measure_data id="4" measure_id="4" snapshot_id="4" data="[null]"/>
+
+ <dependencies id="1" from_resource_id="1" from_snapshot_id="1" to_resource_id="30" to_snapshot_id="30"
+ parent_dependency_id="[null]" project_snapshot_id="1"
+ dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
+
+ <dependencies id="2" from_resource_id="3" from_snapshot_id="3" to_resource_id="40" to_snapshot_id="40"
+ parent_dependency_id="[null]" project_snapshot_id="1"
+ dep_usage="INHERITS" dep_weight="1" from_scope="FIL" to_scope="FIL"/>
+
+ <dependencies id="3" from_resource_id="50" from_snapshot_id="50" to_resource_id="3" to_snapshot_id="3"
+ parent_dependency_id="[null]" project_snapshot_id="1"
+ dep_usage="INHERITS" dep_weight="1" from_scope="FIL" to_scope="FIL" />
+
+</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <rules_categories id="1" name="category one" description="[null]"/>
- <rules id="1" name="foo" rules_category_id="1" plugin_config_key="checker/foo" plugin_rule_key="checkstyle.rule1"
- plugin_name="maven-checkstyle-plugin" description="description" cardinality="SINGLE" parent_id="[null]" />
-
- <metrics id="1" name="ncloc" val_type="INT" description="[null]" domain="[null]"
- short_name="" qualitative="false" user_managed="false" enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <!-- project -->
- <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="mygroup:myartifact" name="project"
- root_id="[null]"
- description="[null]"
- enabled="true" language="java" copy_resource_id="[null]"/>
-
- <!-- package -->
- <projects long_name="[null]" id="2" scope="DIR" qualifier="PAC" kee="mygroup:myartifact:my.package" name="package"
- root_id="1"
- description="[null]"
- enabled="true" language="java" copy_resource_id="[null]"/>
-
- <!-- files -->
- <projects long_name="[null]" id="3" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class1"
- name="class" root_id="1"
- description="[null]"
- enabled="true" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="4" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class2"
- name="class" root_id="1"
- description="[null]"
- enabled="true" language="java" copy_resource_id="[null]"/>
-
-
- <snapshots depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="false"
- path="[null]"/>
-
- <snapshots depth="[null]" id="2" scope="DIR" qualifier="PAC" created_at="2008-12-02 13:58:00.00" version="[null]"
- project_id="2"
- parent_snapshot_id="2" root_project_id="[null]" root_snapshot_id="1" status="P" islast="false"
- path="[null]"/>
-
-
- <!--<snapshots depth="[null]" id="3" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" version="[null]"-->
- <!--project_id="3"-->
- <!--parent_snapshot_id="2" root_project_id="[null]" root_snapshot_id="1" status="P" islast="false"-->
- <!--path="[null]"/>-->
-
- <!--<snapshots depth="[null]" id="4" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" version="[null]"-->
- <!--project_id="4"-->
- <!--parent_snapshot_id="2" root_project_id="[null]" root_snapshot_id="1" status="P" islast="false"-->
- <!--path="[null]"/>-->
-
-
- <SNAPSHOT_SOURCES ID="1" SNAPSHOT_ID="30" DATA="some sources"/>
- <!--<SNAPSHOT_SOURCES ID="2" SNAPSHOT_ID="4" DATA="some sources"/>-->
-
-
- <RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/>
- <RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/>
- <!--<RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/>-->
- <!--<RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/>-->
-
-
- <project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"
- rule_priority="[null]"
- alert_text="[null]" ID="1" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="1" RULES_CATEGORY_ID="1"
- RULE_ID="1"
- text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"
- rule_priority="[null]"
- alert_text="[null]" ID="2" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="2" RULES_CATEGORY_ID="1"
- RULE_ID="1"
- text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-
- <!--<project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"-->
- <!--rule_priority="[null]"-->
- <!--alert_text="[null]" ID="3" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="3" RULES_CATEGORY_ID="1"-->
- <!--RULE_ID="1"-->
- <!--text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"-->
- <!--alert_status="[null]" description="[null]"/>-->
-
- <!--<project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"-->
- <!--rule_priority="[null]"-->
- <!--alert_text="[null]" ID="4" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="4" RULES_CATEGORY_ID="1"-->
- <!--RULE_ID="1"-->
- <!--text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"-->
- <!--alert_status="[null]" description="[null]"/>-->
-
-
- <measure_data id="1" measure_id="1" snapshot_id="1" data="[null]"/>
- <measure_data id="2" measure_id="2" snapshot_id="2" data="[null]"/>
- <!--<measure_data id="3" measure_id="3" snapshot_id="3" data="[null]"/>-->
- <!--<measure_data id="4" measure_id="4" snapshot_id="4" data="[null]"/>-->
-
- <dependencies id="1" from_resource_id="1" from_snapshot_id="1" to_resource_id="30" to_snapshot_id="30"
- parent_dependency_id="[null]" project_snapshot_id="1"
- dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
-
- <!--<dependencies id="2" from_resource_id="3" from_snapshot_id="3" to_resource_id="40" to_snapshot_id="40"-->
- <!--parent_dependency_id="[null]" project_snapshot_id="1"-->
- <!--dep_usage="INHERITS" dep_weight="1" from_scope="FIL" to_scope="FIL"/>-->
-
- <!--<dependencies id="3" from_resource_id="50" from_snapshot_id="50" to_resource_id="3" to_snapshot_id="3"-->
- <!--parent_dependency_id="[null]" project_snapshot_id="1"-->
- <!--dep_usage="INHERITS" dep_weight="1" from_scope="FIL" to_scope="FIL"/>-->
-
-</dataset>
\ No newline at end of file
+++ /dev/null
-<dataset>
- <rules_categories id="1" name="category one" description="[null]"/>
- <rules id="1" name="foo" rules_category_id="1" plugin_config_key="checker/foo" plugin_rule_key="checkstyle.rule1"
- plugin_name="maven-checkstyle-plugin" description="description" cardinality="SINGLE" parent_id="[null]"/>
-
- <metrics id="1" name="ncloc" val_type="INT" description="[null]" domain="[null]"
- short_name="" qualitative="false" user_managed="false" enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/>
-
- <!-- project -->
- <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="mygroup:myartifact" name="project"
- root_id="[null]"
- description="[null]"
- enabled="true" language="java" copy_resource_id="[null]"/>
-
- <!-- package -->
- <projects long_name="[null]" id="2" scope="DIR" qualifier="PAC" kee="mygroup:myartifact:my.package" name="package"
- root_id="1"
- description="[null]"
- enabled="true" language="java" copy_resource_id="[null]"/>
-
- <!-- files -->
- <projects long_name="[null]" id="3" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class1"
- name="class" root_id="1"
- description="[null]"
- enabled="true" language="java" copy_resource_id="[null]"/>
-
- <projects long_name="[null]" id="4" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class2"
- name="class" root_id="1"
- description="[null]"
- enabled="true" language="java" copy_resource_id="[null]"/>
-
-
- <snapshots depth="[null]" id="1" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" version="[null]"
- project_id="1"
- parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="false"
- path="[null]"/>
-
- <snapshots depth="[null]" id="2" scope="DIR" qualifier="PAC" created_at="2008-12-02 13:58:00.00" version="[null]"
- project_id="2"
- parent_snapshot_id="2" root_project_id="[null]" root_snapshot_id="1" status="P" islast="false"
- path="[null]"/>
-
-
- <snapshots depth="[null]" id="3" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" version="[null]"
- project_id="3"
- parent_snapshot_id="2" root_project_id="[null]" root_snapshot_id="1" status="P" islast="false"
- path="[null]"/>
-
- <snapshots depth="[null]" id="4" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" version="[null]"
- project_id="4"
- parent_snapshot_id="2" root_project_id="[null]" root_snapshot_id="1" status="P" islast="false"
- path="[null]"/>
-
-
- <SNAPSHOT_SOURCES ID="1" SNAPSHOT_ID="30" DATA="some sources"/>
- <SNAPSHOT_SOURCES ID="2" SNAPSHOT_ID="4" DATA="some sources"/>
-
-
- <RULE_FAILURES ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg1" LINE="[null]" COST="[null]"/>
- <RULE_FAILURES ID="2" SNAPSHOT_ID="2" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg2" LINE="[null]" COST="[null]"/>
- <RULE_FAILURES ID="3" SNAPSHOT_ID="3" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg3" LINE="[null]" COST="[null]"/>
- <RULE_FAILURES ID="4" SNAPSHOT_ID="4" RULE_ID="1" FAILURE_LEVEL="2" MESSAGE="msg4" LINE="[null]" COST="[null]"/>
-
-
- <project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"
- rule_priority="[null]"
- alert_text="[null]" ID="1" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="1" RULES_CATEGORY_ID="1"
- RULE_ID="1"
- text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"
- rule_priority="[null]"
- alert_text="[null]" ID="2" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="2" RULES_CATEGORY_ID="1"
- RULE_ID="1"
- text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"
- rule_priority="[null]"
- alert_text="[null]" ID="3" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="3" RULES_CATEGORY_ID="1"
- RULE_ID="1"
- text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-
- <project_measures characteristic_id="[null]" url="[null]" diff_value_1="[null]" diff_value_2="[null]" diff_value_3="[null]"
- rule_priority="[null]"
- alert_text="[null]" ID="4" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="4" RULES_CATEGORY_ID="1"
- RULE_ID="1"
- text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]"/>
-
-
- <measure_data id="1" measure_id="1" snapshot_id="1" data="[null]"/>
- <measure_data id="2" measure_id="2" snapshot_id="2" data="[null]"/>
- <measure_data id="3" measure_id="3" snapshot_id="3" data="[null]"/>
- <measure_data id="4" measure_id="4" snapshot_id="4" data="[null]"/>
-
- <dependencies id="1" from_resource_id="1" from_snapshot_id="1" to_resource_id="30" to_snapshot_id="30"
- parent_dependency_id="[null]" project_snapshot_id="1"
- dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
-
- <dependencies id="2" from_resource_id="3" from_snapshot_id="3" to_resource_id="40" to_snapshot_id="40"
- parent_dependency_id="[null]" project_snapshot_id="1"
- dep_usage="INHERITS" dep_weight="1" from_scope="FIL" to_scope="FIL"/>
-
- <dependencies id="3" from_resource_id="50" from_snapshot_id="50" to_resource_id="3" to_snapshot_id="3"
- parent_dependency_id="[null]" project_snapshot_id="1"
- dep_usage="INHERITS" dep_weight="1" from_scope="FIL" to_scope="FIL" />
-
-</dataset>
\ No newline at end of file