* <code>optional int32 conditions = 2;</code>
*
* <pre>
- * Number of conditions to cover (never 0)
+ * Number of conditions to cover (if set, the value must be greater than 0)
* </pre>
*/
boolean hasConditions();
* <code>optional int32 conditions = 2;</code>
*
* <pre>
- * Number of conditions to cover (never 0)
+ * Number of conditions to cover (if set, the value must be greater than 0)
* </pre>
*/
int getConditions();
/**
* <code>optional bool ut_hits = 3;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
boolean hasUtHits();
/**
* <code>optional bool ut_hits = 3;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
boolean getUtHits();
/**
* <code>optional bool it_hits = 4;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
boolean hasItHits();
/**
* <code>optional bool it_hits = 4;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
boolean getItHits();
/**
* <code>optional int32 ut_covered_conditions = 5;</code>
+ *
+ * <pre>
+ * Number of conditions covered by unit tests
+ * </pre>
*/
boolean hasUtCoveredConditions();
/**
* <code>optional int32 ut_covered_conditions = 5;</code>
+ *
+ * <pre>
+ * Number of conditions covered by unit tests
+ * </pre>
*/
int getUtCoveredConditions();
/**
* <code>optional int32 it_covered_conditions = 6;</code>
+ *
+ * <pre>
+ * Number of conditions covered by integration tests
+ * </pre>
*/
boolean hasItCoveredConditions();
/**
* <code>optional int32 it_covered_conditions = 6;</code>
+ *
+ * <pre>
+ * Number of conditions covered by integration tests
+ * </pre>
*/
int getItCoveredConditions();
/**
* <code>optional int32 overall_covered_conditions = 7;</code>
+ *
+ * <pre>
+ * Number of conditions covered by overall tests
+ * </pre>
*/
boolean hasOverallCoveredConditions();
/**
* <code>optional int32 overall_covered_conditions = 7;</code>
+ *
+ * <pre>
+ * Number of conditions covered by overall tests
+ * </pre>
*/
int getOverallCoveredConditions();
}
* Protobuf type {@code Coverage}
*
* <pre>
- * Only FILE component has coverage information
+ * Only FILE component has coverage information, and only executable lines should contains this information.
* TODO rename it LineCoverage ?
* </pre>
*/
* <code>optional int32 conditions = 2;</code>
*
* <pre>
- * Number of conditions to cover (never 0)
+ * Number of conditions to cover (if set, the value must be greater than 0)
* </pre>
*/
public boolean hasConditions() {
* <code>optional int32 conditions = 2;</code>
*
* <pre>
- * Number of conditions to cover (never 0)
+ * Number of conditions to cover (if set, the value must be greater than 0)
* </pre>
*/
public int getConditions() {
private boolean utHits_;
/**
* <code>optional bool ut_hits = 3;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
public boolean hasUtHits() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* <code>optional bool ut_hits = 3;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
public boolean getUtHits() {
return utHits_;
private boolean itHits_;
/**
* <code>optional bool it_hits = 4;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
public boolean hasItHits() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* <code>optional bool it_hits = 4;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
public boolean getItHits() {
return itHits_;
private int utCoveredConditions_;
/**
* <code>optional int32 ut_covered_conditions = 5;</code>
+ *
+ * <pre>
+ * Number of conditions covered by unit tests
+ * </pre>
*/
public boolean hasUtCoveredConditions() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* <code>optional int32 ut_covered_conditions = 5;</code>
+ *
+ * <pre>
+ * Number of conditions covered by unit tests
+ * </pre>
*/
public int getUtCoveredConditions() {
return utCoveredConditions_;
private int itCoveredConditions_;
/**
* <code>optional int32 it_covered_conditions = 6;</code>
+ *
+ * <pre>
+ * Number of conditions covered by integration tests
+ * </pre>
*/
public boolean hasItCoveredConditions() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* <code>optional int32 it_covered_conditions = 6;</code>
+ *
+ * <pre>
+ * Number of conditions covered by integration tests
+ * </pre>
*/
public int getItCoveredConditions() {
return itCoveredConditions_;
private int overallCoveredConditions_;
/**
* <code>optional int32 overall_covered_conditions = 7;</code>
+ *
+ * <pre>
+ * Number of conditions covered by overall tests
+ * </pre>
*/
public boolean hasOverallCoveredConditions() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* <code>optional int32 overall_covered_conditions = 7;</code>
+ *
+ * <pre>
+ * Number of conditions covered by overall tests
+ * </pre>
*/
public int getOverallCoveredConditions() {
return overallCoveredConditions_;
* Protobuf type {@code Coverage}
*
* <pre>
- * Only FILE component has coverage information
+ * Only FILE component has coverage information, and only executable lines should contains this information.
* TODO rename it LineCoverage ?
* </pre>
*/
* <code>optional int32 conditions = 2;</code>
*
* <pre>
- * Number of conditions to cover (never 0)
+ * Number of conditions to cover (if set, the value must be greater than 0)
* </pre>
*/
public boolean hasConditions() {
* <code>optional int32 conditions = 2;</code>
*
* <pre>
- * Number of conditions to cover (never 0)
+ * Number of conditions to cover (if set, the value must be greater than 0)
* </pre>
*/
public int getConditions() {
* <code>optional int32 conditions = 2;</code>
*
* <pre>
- * Number of conditions to cover (never 0)
+ * Number of conditions to cover (if set, the value must be greater than 0)
* </pre>
*/
public Builder setConditions(int value) {
* <code>optional int32 conditions = 2;</code>
*
* <pre>
- * Number of conditions to cover (never 0)
+ * Number of conditions to cover (if set, the value must be greater than 0)
* </pre>
*/
public Builder clearConditions() {
private boolean utHits_ ;
/**
* <code>optional bool ut_hits = 3;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
public boolean hasUtHits() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* <code>optional bool ut_hits = 3;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
public boolean getUtHits() {
return utHits_;
}
/**
* <code>optional bool ut_hits = 3;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
public Builder setUtHits(boolean value) {
bitField0_ |= 0x00000004;
}
/**
* <code>optional bool ut_hits = 3;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a unit test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
public Builder clearUtHits() {
bitField0_ = (bitField0_ & ~0x00000004);
private boolean itHits_ ;
/**
* <code>optional bool it_hits = 4;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
public boolean hasItHits() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* <code>optional bool it_hits = 4;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
public boolean getItHits() {
return itHits_;
}
/**
* <code>optional bool it_hits = 4;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
public Builder setItHits(boolean value) {
bitField0_ |= 0x00000008;
}
/**
* <code>optional bool it_hits = 4;</code>
+ *
+ * <pre>
+ * Is the line has been touched by a integration test ? Returning false means that no test has touched this executable line.
+ * </pre>
*/
public Builder clearItHits() {
bitField0_ = (bitField0_ & ~0x00000008);
private int utCoveredConditions_ ;
/**
* <code>optional int32 ut_covered_conditions = 5;</code>
+ *
+ * <pre>
+ * Number of conditions covered by unit tests
+ * </pre>
*/
public boolean hasUtCoveredConditions() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* <code>optional int32 ut_covered_conditions = 5;</code>
+ *
+ * <pre>
+ * Number of conditions covered by unit tests
+ * </pre>
*/
public int getUtCoveredConditions() {
return utCoveredConditions_;
}
/**
* <code>optional int32 ut_covered_conditions = 5;</code>
+ *
+ * <pre>
+ * Number of conditions covered by unit tests
+ * </pre>
*/
public Builder setUtCoveredConditions(int value) {
bitField0_ |= 0x00000010;
}
/**
* <code>optional int32 ut_covered_conditions = 5;</code>
+ *
+ * <pre>
+ * Number of conditions covered by unit tests
+ * </pre>
*/
public Builder clearUtCoveredConditions() {
bitField0_ = (bitField0_ & ~0x00000010);
private int itCoveredConditions_ ;
/**
* <code>optional int32 it_covered_conditions = 6;</code>
+ *
+ * <pre>
+ * Number of conditions covered by integration tests
+ * </pre>
*/
public boolean hasItCoveredConditions() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* <code>optional int32 it_covered_conditions = 6;</code>
+ *
+ * <pre>
+ * Number of conditions covered by integration tests
+ * </pre>
*/
public int getItCoveredConditions() {
return itCoveredConditions_;
}
/**
* <code>optional int32 it_covered_conditions = 6;</code>
+ *
+ * <pre>
+ * Number of conditions covered by integration tests
+ * </pre>
*/
public Builder setItCoveredConditions(int value) {
bitField0_ |= 0x00000020;
}
/**
* <code>optional int32 it_covered_conditions = 6;</code>
+ *
+ * <pre>
+ * Number of conditions covered by integration tests
+ * </pre>
*/
public Builder clearItCoveredConditions() {
bitField0_ = (bitField0_ & ~0x00000020);
private int overallCoveredConditions_ ;
/**
* <code>optional int32 overall_covered_conditions = 7;</code>
+ *
+ * <pre>
+ * Number of conditions covered by overall tests
+ * </pre>
*/
public boolean hasOverallCoveredConditions() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* <code>optional int32 overall_covered_conditions = 7;</code>
+ *
+ * <pre>
+ * Number of conditions covered by overall tests
+ * </pre>
*/
public int getOverallCoveredConditions() {
return overallCoveredConditions_;
}
/**
* <code>optional int32 overall_covered_conditions = 7;</code>
+ *
+ * <pre>
+ * Number of conditions covered by overall tests
+ * </pre>
*/
public Builder setOverallCoveredConditions(int value) {
bitField0_ |= 0x00000040;
}
/**
* <code>optional int32 overall_covered_conditions = 7;</code>
+ *
+ * <pre>
+ * Number of conditions covered by overall tests
+ * </pre>
*/
public Builder clearOverallCoveredConditions() {
bitField0_ = (bitField0_ & ~0x00000040);
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube 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.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.core.dependency;
-
-public final class DependencyDto {
- private Long id;
- private Long fromSnapshotId;
- private Long toSnapshotId;
- private String usage;
-
- public Long getId() {
- return id;
- }
-
- public DependencyDto setId(Long id) {
- this.id = id;
- return this;
- }
-
- public Long getFromSnapshotId() {
- return fromSnapshotId;
- }
-
- public DependencyDto setFromSnapshotId(Long fromSnapshotId) {
- this.fromSnapshotId = fromSnapshotId;
- return this;
- }
-
- public Long getToSnapshotId() {
- return toSnapshotId;
- }
-
- public DependencyDto setToSnapshotId(Long toSnapshotId) {
- this.toSnapshotId = toSnapshotId;
- return this;
- }
-
- public String getUsage() {
- return usage;
- }
-
- public DependencyDto setUsage(String usage) {
- this.usage = usage;
- return this;
- }
-}
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube 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.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.core.dependency;
-
-import org.apache.ibatis.session.ResultHandler;
-
-public interface DependencyMapper {
- void selectAll(ResultHandler handler);
-}
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube 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.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.core.dependency;
-
-public final class ResourceSnapshotDto {
- private Long id;
- private Long projectId;
- private String version;
-
- public Long getId() {
- return id;
- }
-
- public ResourceSnapshotDto setId(Long id) {
- this.id = id;
- return this;
- }
-
- public Long getProjectId() {
- return projectId;
- }
-
- public ResourceSnapshotDto setProjectId(Long projectId) {
- this.projectId = projectId;
- return this;
- }
-
- public String getVersion() {
- return version;
- }
-
- public ResourceSnapshotDto setVersion(String version) {
- this.version = version;
- return this;
- }
-}
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube 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.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.core.dependency;
-
-import org.apache.ibatis.session.ResultHandler;
-
-public interface ResourceSnapshotMapper {
- void selectAll(ResultHandler handler);
-}
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube 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.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-@ParametersAreNonnullByDefault
-package org.sonar.core.dependency;
-
-import javax.annotation.ParametersAreNonnullByDefault;
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.core.design;
+
+public final class DependencyDto {
+ private Long id;
+ private Long fromSnapshotId;
+ private Long toSnapshotId;
+ private String usage;
+
+ public Long getId() {
+ return id;
+ }
+
+ public DependencyDto setId(Long id) {
+ this.id = id;
+ return this;
+ }
+
+ public Long getFromSnapshotId() {
+ return fromSnapshotId;
+ }
+
+ public DependencyDto setFromSnapshotId(Long fromSnapshotId) {
+ this.fromSnapshotId = fromSnapshotId;
+ return this;
+ }
+
+ public Long getToSnapshotId() {
+ return toSnapshotId;
+ }
+
+ public DependencyDto setToSnapshotId(Long toSnapshotId) {
+ this.toSnapshotId = toSnapshotId;
+ return this;
+ }
+
+ public String getUsage() {
+ return usage;
+ }
+
+ public DependencyDto setUsage(String usage) {
+ this.usage = usage;
+ return this;
+ }
+}
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.core.design;
+
+import org.apache.ibatis.session.ResultHandler;
+
+public interface DependencyMapper {
+ void selectAll(ResultHandler handler);
+}
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.core.design;
+
+import javax.annotation.ParametersAreNonnullByDefault;
import org.apache.ibatis.builder.xml.XMLMapperBuilder;
import org.apache.ibatis.logging.LogFactory;
import org.apache.ibatis.mapping.Environment;
-import org.apache.ibatis.session.*;
+import org.apache.ibatis.session.Configuration;
+import org.apache.ibatis.session.ExecutorType;
+import org.apache.ibatis.session.SqlSession;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory;
import org.apache.ibatis.type.JdbcType;
import org.slf4j.LoggerFactory;
import org.sonar.core.activity.db.ActivityDto;
import org.sonar.core.activity.db.ActivityMapper;
import org.sonar.core.cluster.WorkQueue;
-import org.sonar.core.component.*;
+import org.sonar.core.component.ComponentDto;
+import org.sonar.core.component.ComponentLinkDto;
+import org.sonar.core.component.FilePathWithHashDto;
+import org.sonar.core.component.SnapshotDto;
+import org.sonar.core.component.UuidWithProjectUuidDto;
import org.sonar.core.component.db.ComponentIndexMapper;
import org.sonar.core.component.db.ComponentLinkMapper;
import org.sonar.core.component.db.ComponentMapper;
import org.sonar.core.computation.db.AnalysisReportDto;
import org.sonar.core.computation.db.AnalysisReportMapper;
import org.sonar.core.config.Logback;
-import org.sonar.core.dashboard.*;
-import org.sonar.core.dependency.DependencyDto;
-import org.sonar.core.dependency.DependencyMapper;
-import org.sonar.core.dependency.ResourceSnapshotDto;
-import org.sonar.core.dependency.ResourceSnapshotMapper;
+import org.sonar.core.dashboard.ActiveDashboardDto;
+import org.sonar.core.dashboard.ActiveDashboardMapper;
+import org.sonar.core.dashboard.DashboardDto;
+import org.sonar.core.dashboard.DashboardMapper;
+import org.sonar.core.dashboard.WidgetDto;
+import org.sonar.core.dashboard.WidgetMapper;
+import org.sonar.core.dashboard.WidgetPropertyDto;
+import org.sonar.core.dashboard.WidgetPropertyMapper;
+import org.sonar.core.design.DependencyDto;
+import org.sonar.core.design.DependencyMapper;
import org.sonar.core.duplication.DuplicationMapper;
import org.sonar.core.duplication.DuplicationUnitDto;
import org.sonar.core.event.EventDto;
import org.sonar.core.event.db.EventMapper;
import org.sonar.core.graph.jdbc.GraphDto;
import org.sonar.core.graph.jdbc.GraphDtoMapper;
-import org.sonar.core.issue.db.*;
-import org.sonar.core.measure.db.*;
+import org.sonar.core.issue.db.ActionPlanDto;
+import org.sonar.core.issue.db.ActionPlanMapper;
+import org.sonar.core.issue.db.ActionPlanStatsDto;
+import org.sonar.core.issue.db.ActionPlanStatsMapper;
+import org.sonar.core.issue.db.IssueChangeDto;
+import org.sonar.core.issue.db.IssueChangeMapper;
+import org.sonar.core.issue.db.IssueDto;
+import org.sonar.core.issue.db.IssueFilterDto;
+import org.sonar.core.issue.db.IssueFilterFavouriteDto;
+import org.sonar.core.issue.db.IssueFilterFavouriteMapper;
+import org.sonar.core.issue.db.IssueFilterMapper;
+import org.sonar.core.issue.db.IssueMapper;
+import org.sonar.core.measure.db.MeasureDto;
+import org.sonar.core.measure.db.MeasureFilterDto;
+import org.sonar.core.measure.db.MeasureFilterMapper;
+import org.sonar.core.measure.db.MeasureMapper;
+import org.sonar.core.measure.db.MetricMapper;
import org.sonar.core.notification.db.NotificationQueueDto;
import org.sonar.core.notification.db.NotificationQueueMapper;
-import org.sonar.core.permission.*;
+import org.sonar.core.permission.GroupWithPermissionDto;
+import org.sonar.core.permission.PermissionTemplateDto;
+import org.sonar.core.permission.PermissionTemplateGroupDto;
+import org.sonar.core.permission.PermissionTemplateMapper;
+import org.sonar.core.permission.PermissionTemplateUserDto;
+import org.sonar.core.permission.UserWithPermissionDto;
import org.sonar.core.persistence.dialect.Dialect;
import org.sonar.core.persistence.migration.v44.Migration44Mapper;
import org.sonar.core.persistence.migration.v45.Migration45Mapper;
import org.sonar.core.purge.IdUuidPair;
import org.sonar.core.purge.PurgeMapper;
import org.sonar.core.purge.PurgeableSnapshotDto;
-import org.sonar.core.qualitygate.db.*;
-import org.sonar.core.qualityprofile.db.*;
-import org.sonar.core.resource.*;
+import org.sonar.core.qualitygate.db.ProjectQgateAssociationDto;
+import org.sonar.core.qualitygate.db.ProjectQgateAssociationMapper;
+import org.sonar.core.qualitygate.db.QualityGateConditionDto;
+import org.sonar.core.qualitygate.db.QualityGateConditionMapper;
+import org.sonar.core.qualitygate.db.QualityGateDto;
+import org.sonar.core.qualitygate.db.QualityGateMapper;
+import org.sonar.core.qualityprofile.db.ActiveRuleDto;
+import org.sonar.core.qualityprofile.db.ActiveRuleMapper;
+import org.sonar.core.qualityprofile.db.ActiveRuleParamDto;
+import org.sonar.core.qualityprofile.db.QualityProfileDto;
+import org.sonar.core.qualityprofile.db.QualityProfileMapper;
+import org.sonar.core.resource.ResourceDto;
+import org.sonar.core.resource.ResourceIndexDto;
+import org.sonar.core.resource.ResourceIndexerMapper;
+import org.sonar.core.resource.ResourceKeyUpdaterMapper;
+import org.sonar.core.resource.ResourceMapper;
import org.sonar.core.rule.RuleDto;
import org.sonar.core.rule.RuleMapper;
import org.sonar.core.rule.RuleParamDto;
import org.sonar.core.technicaldebt.db.RequirementMigrationDto;
import org.sonar.core.template.LoadedTemplateDto;
import org.sonar.core.template.LoadedTemplateMapper;
-import org.sonar.core.user.*;
+import org.sonar.core.user.AuthorDto;
+import org.sonar.core.user.AuthorMapper;
+import org.sonar.core.user.GroupDto;
+import org.sonar.core.user.GroupMapper;
+import org.sonar.core.user.GroupMembershipDto;
+import org.sonar.core.user.GroupMembershipMapper;
+import org.sonar.core.user.GroupRoleDto;
+import org.sonar.core.user.RoleMapper;
+import org.sonar.core.user.UserDto;
+import org.sonar.core.user.UserGroupDto;
+import org.sonar.core.user.UserGroupMapper;
+import org.sonar.core.user.UserMapper;
+import org.sonar.core.user.UserRoleDto;
import javax.annotation.Nullable;
loadAlias(conf, "ProjectQgateAssociation", ProjectQgateAssociationDto.class);
loadAlias(conf, "Resource", ResourceDto.class);
loadAlias(conf, "ResourceIndex", ResourceIndexDto.class);
- loadAlias(conf, "ResourceSnapshot", ResourceSnapshotDto.class);
loadAlias(conf, "Rule", RuleDto.class);
loadAlias(conf, "RuleParam", RuleParamDto.class);
loadAlias(conf, "Snapshot", SnapshotDto.class);
DependencyMapper.class, DuplicationMapper.class, GraphDtoMapper.class,
IssueMapper.class, IssueChangeMapper.class, IssueFilterMapper.class, IssueFilterFavouriteMapper.class,
LoadedTemplateMapper.class, MeasureFilterMapper.class, Migration44Mapper.class, PermissionTemplateMapper.class, PropertiesMapper.class, PurgeMapper.class,
- ResourceKeyUpdaterMapper.class, ResourceIndexerMapper.class, ResourceSnapshotMapper.class, RoleMapper.class, RuleMapper.class,
+ ResourceKeyUpdaterMapper.class, ResourceIndexerMapper.class, RoleMapper.class, RuleMapper.class,
SchemaMigrationMapper.class, SemaphoreMapper.class, UserMapper.class, GroupMapper.class, UserGroupMapper.class, WidgetMapper.class, WidgetPropertyMapper.class,
FileSourceMapper.class, ActionPlanMapper.class,
ActionPlanStatsMapper.class,
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="org.sonar.core.dependency.DependencyMapper">
-
- <select id="selectAll" resultType="dependency" >
- SELECT id, from_snapshot_id as fromSnapshotId, to_snapshot_id as toSnapshotId, dep_usage as "usage" FROM dependencies
- </select>
-
-</mapper>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="org.sonar.core.dependency.ResourceSnapshotMapper">
-
- <select id="selectAll" resultType="ResourceSnapshot" >
- SELECT id, project_id as projectId, version FROM snapshots
- </select>
-
-</mapper>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="org.sonar.core.design.DependencyMapper">
+
+ <select id="selectAll" resultType="dependency" >
+ SELECT id, from_snapshot_id as fromSnapshotId, to_snapshot_id as toSnapshotId, dep_usage as "usage" FROM dependencies
+ </select>
+
+</mapper>
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube 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.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.core.dependency;
-
-import com.google.common.collect.Lists;
-import org.apache.ibatis.session.ResultContext;
-import org.apache.ibatis.session.ResultHandler;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.sonar.core.persistence.DbSession;
-import org.sonar.core.persistence.DbTester;
-
-import java.util.List;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class DependencyMapperTest {
-
- @ClassRule
- public static DbTester dbtester = new DbTester();
-
- DbSession session;
-
- @Before
- public void setUp() throws Exception {
- dbtester.truncateTables();
- session = dbtester.myBatis().openSession(false);
- }
-
- @After
- public void tearDown() throws Exception {
- session.close();
- }
-
- @Test
- public void select_all_dependencies() {
- dbtester.prepareDbUnit(getClass(), "fixture.xml");
-
- final List<DependencyDto> dependencies = Lists.newArrayList();
-
- session.getMapper(DependencyMapper.class).selectAll(new ResultHandler() {
- public void handleResult(ResultContext context) {
- dependencies.add((DependencyDto) context.getResultObject());
- }
- });
-
- assertThat(dependencies).hasSize(2);
-
- DependencyDto dep = dependencies.get(0);
- assertThat(dep.getId()).isEqualTo(1L);
- assertThat(dep.getFromSnapshotId()).isEqualTo(1000L);
- assertThat(dep.getToSnapshotId()).isEqualTo(1001L);
- assertThat(dep.getUsage()).isEqualTo("compile");
- }
-}
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube 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.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.core.dependency;
-
-import com.google.common.collect.Lists;
-import org.apache.ibatis.session.ResultContext;
-import org.apache.ibatis.session.ResultHandler;
-import org.apache.ibatis.session.SqlSession;
-import org.junit.Test;
-import org.sonar.core.persistence.AbstractDaoTestCase;
-import org.sonar.core.persistence.MyBatis;
-
-import java.util.List;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class ResourceSnapshotMapperTest extends AbstractDaoTestCase {
- @Test
- public void should_find_all() {
- setupData("fixture");
-
- final List<ResourceSnapshotDto> snapshots = Lists.newArrayList();
-
- SqlSession session = getMyBatis().openSession();
- try {
- session.getMapper(ResourceSnapshotMapper.class).selectAll(new ResultHandler() {
- public void handleResult(ResultContext context) {
- snapshots.add((ResourceSnapshotDto) context.getResultObject());
- }
- });
- } finally {
- MyBatis.closeQuietly(session);
- }
-
- assertThat(snapshots).hasSize(2);
-
- ResourceSnapshotDto dep = snapshots.get(0);
- assertThat(dep.getId()).isEqualTo(1L);
- assertThat(dep.getProjectId()).isEqualTo(1000L);
- assertThat(dep.getVersion()).isEqualTo("1.0");
- }
-}
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.core.design;
+
+import com.google.common.collect.Lists;
+import org.apache.ibatis.session.ResultContext;
+import org.apache.ibatis.session.ResultHandler;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.sonar.core.persistence.DbSession;
+import org.sonar.core.persistence.DbTester;
+
+import java.util.List;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class DependencyMapperTest {
+
+ @ClassRule
+ public static DbTester dbtester = new DbTester();
+
+ DbSession session;
+
+ @Before
+ public void setUp() throws Exception {
+ dbtester.truncateTables();
+ session = dbtester.myBatis().openSession(false);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ session.close();
+ }
+
+ @Test
+ public void select_all_dependencies() {
+ dbtester.prepareDbUnit(getClass(), "fixture.xml");
+
+ final List<DependencyDto> dependencies = Lists.newArrayList();
+
+ session.getMapper(DependencyMapper.class).selectAll(new ResultHandler() {
+ public void handleResult(ResultContext context) {
+ dependencies.add((DependencyDto) context.getResultObject());
+ }
+ });
+
+ assertThat(dependencies).hasSize(2);
+
+ DependencyDto dep = dependencies.get(0);
+ assertThat(dep.getId()).isEqualTo(1L);
+ assertThat(dep.getFromSnapshotId()).isEqualTo(1000L);
+ assertThat(dep.getToSnapshotId()).isEqualTo(1001L);
+ assertThat(dep.getUsage()).isEqualTo("compile");
+ }
+}
+++ /dev/null
-<dataset>
- <dependencies id="1" from_component_uuid="ABCD" to_component_uuid="EFGH" from_snapshot_id="1000" to_snapshot_id="1001" dep_usage="compile" dep_weight="1" />
- <dependencies id="2" from_component_uuid="DCBA" to_component_uuid="HGFE" from_snapshot_id="2000" to_snapshot_id="2001" dep_usage="provided" dep_weight="1" />
-</dataset>
+++ /dev/null
-<dataset>
- <snapshots id="1" project_id="1000" version="1.0" />
- <snapshots id="2" project_id="1001" version="2.0-SNAPSHOT" />
-</dataset>
\ No newline at end of file
--- /dev/null
+<dataset>
+ <dependencies id="1" from_component_uuid="ABCD" to_component_uuid="EFGH" from_snapshot_id="1000" to_snapshot_id="1001" dep_usage="compile" dep_weight="1" />
+ <dependencies id="2" from_component_uuid="DCBA" to_component_uuid="HGFE" from_snapshot_id="2000" to_snapshot_id="2001" dep_usage="provided" dep_weight="1" />
+</dataset>