aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-deprecated
diff options
context:
space:
mode:
authorGodin <mandrikov@gmail.com>2010-12-08 21:30:14 +0000
committerGodin <mandrikov@gmail.com>2010-12-08 21:30:14 +0000
commit8ea838b32e45f4fb08d1ac3aa8d480a2e0cef7af (patch)
treea363634e6c11e1602261efa14bf9499fa1adc55c /sonar-deprecated
parent85ad745aaee19225e0abbb11abd167e39a8b1e95 (diff)
downloadsonarqube-8ea838b32e45f4fb08d1ac3aa8d480a2e0cef7af.tar.gz
sonarqube-8ea838b32e45f4fb08d1ac3aa8d480a2e0cef7af.zip
* SONAR-1809: MetricFinder should be available on server side
* Fix javadocs
Diffstat (limited to 'sonar-deprecated')
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/batch/Purge.java9
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/database/daos/MeasuresDao.java4
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/database/daos/RulesDao.java4
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/core/purge/AbstractPurge.java25
4 files changed, 30 insertions, 12 deletions
diff --git a/sonar-deprecated/src/main/java/org/sonar/api/batch/Purge.java b/sonar-deprecated/src/main/java/org/sonar/api/batch/Purge.java
index d08323bb23a..b3562281dff 100644
--- a/sonar-deprecated/src/main/java/org/sonar/api/batch/Purge.java
+++ b/sonar-deprecated/src/main/java/org/sonar/api/batch/Purge.java
@@ -23,9 +23,10 @@ import org.sonar.api.BatchExtension;
/**
* Extension point to purge data.
- * <p/>
- * <p>It is executed when the batch finishes.
- *
+ * <p>
+ * It is executed when the batch finishes.
+ * </p>
+ *
* @since 1.10
* @deprecated since 2.5. The DBCleaner plugin implements all required purge taks.
*/
@@ -34,7 +35,7 @@ public interface Purge extends BatchExtension {
/**
* Snapshots include the current snapshot (flagged as last) and optionally the penultimate one.
- *
+ *
* @snapshots never null.
*/
void purge(PurgeContext context);
diff --git a/sonar-deprecated/src/main/java/org/sonar/api/database/daos/MeasuresDao.java b/sonar-deprecated/src/main/java/org/sonar/api/database/daos/MeasuresDao.java
index 383864d37c8..6c8ab6284f9 100644
--- a/sonar-deprecated/src/main/java/org/sonar/api/database/daos/MeasuresDao.java
+++ b/sonar-deprecated/src/main/java/org/sonar/api/database/daos/MeasuresDao.java
@@ -24,6 +24,9 @@ import org.sonar.api.measures.Metric;
import java.util.Collection;
import java.util.List;
+/**
+ * @deprecated since 2.3
+ */
@Deprecated
public class MeasuresDao {
@@ -32,6 +35,7 @@ public class MeasuresDao {
public MeasuresDao(org.sonar.jpa.dao.MeasuresDao target) {
this.target = target;
}
+
public Metric getMetric(Metric metric) {
return target.getMetric(metric);
}
diff --git a/sonar-deprecated/src/main/java/org/sonar/api/database/daos/RulesDao.java b/sonar-deprecated/src/main/java/org/sonar/api/database/daos/RulesDao.java
index cb7842f049d..bc47708c276 100644
--- a/sonar-deprecated/src/main/java/org/sonar/api/database/daos/RulesDao.java
+++ b/sonar-deprecated/src/main/java/org/sonar/api/database/daos/RulesDao.java
@@ -30,6 +30,9 @@ import org.sonar.api.rules.RulesCategory;
import java.util.Collections;
import java.util.List;
+/**
+ * @deprecated since 2.3
+ */
@Deprecated
public class RulesDao {
@@ -67,7 +70,6 @@ public class RulesDao {
return null;
}
-
public List<RuleParam> getRuleParams() {
return target.getRuleParams();
}
diff --git a/sonar-deprecated/src/main/java/org/sonar/core/purge/AbstractPurge.java b/sonar-deprecated/src/main/java/org/sonar/core/purge/AbstractPurge.java
index a0f46d286d1..8edba7288f5 100644
--- a/sonar-deprecated/src/main/java/org/sonar/core/purge/AbstractPurge.java
+++ b/sonar-deprecated/src/main/java/org/sonar/core/purge/AbstractPurge.java
@@ -25,9 +25,14 @@ 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;
+import javax.persistence.Query;
+
+/**
+ * @deprecated since 2.5. The DBCleaner plugin implements all required purge taks, but you can extend org.sonar.plugins.dbcleaner.api.Purge
+ */
+@Deprecated
public abstract class AbstractPurge implements Purge {
private static final int MAX_IN_ELEMENTS = 950;
@@ -56,23 +61,28 @@ public abstract class AbstractPurge implements Purge {
}
protected void deleteDependencies(List<Integer> snapshotIds) {
- executeQuery("delete dependencies", snapshotIds, "delete from " + DependencyDto.class.getSimpleName() + " d where d.fromSnapshotId in (:ids)");
- executeQuery("delete dependencies", snapshotIds, "delete from " + DependencyDto.class.getSimpleName() + " d where d.toSnapshotId in (:ids)");
+ executeQuery("delete dependencies", snapshotIds, "delete from " + DependencyDto.class.getSimpleName()
+ + " d where d.fromSnapshotId in (:ids)");
+ executeQuery("delete dependencies", snapshotIds, "delete from " + DependencyDto.class.getSimpleName()
+ + " d where d.toSnapshotId in (:ids)");
}
/**
* Delete all measures, including MEASURE_DATA
*/
protected void deleteMeasuresBySnapshotId(List<Integer> snapshotIds) {
- executeQuery("delete measures by snapshot id", snapshotIds, "delete from " + MeasureData.class.getSimpleName() + " m where m.snapshotId in (:ids)");
- executeQuery("delete measures by snapshot id", snapshotIds, "delete from " + MeasureModel.class.getSimpleName() + " m where m.snapshotId in (:ids)");
+ executeQuery("delete measures by snapshot id", snapshotIds, "delete from " + MeasureData.class.getSimpleName()
+ + " m where m.snapshotId in (:ids)");
+ executeQuery("delete measures by snapshot id", snapshotIds, "delete from " + MeasureModel.class.getSimpleName()
+ + " m where m.snapshotId in (:ids)");
}
/**
* Delete all measures, including MEASURE_DATA
*/
protected void deleteMeasuresById(List<Integer> measureIds) {
- executeQuery("delete measures by id", measureIds, "delete from " + MeasureData.class.getSimpleName() + " m where m.measure.id in (:ids)");
+ executeQuery("delete measures by id", measureIds, "delete from " + MeasureData.class.getSimpleName()
+ + " m where m.measure.id in (:ids)");
executeQuery("delete measures by id", measureIds, "delete from " + MeasureModel.class.getSimpleName() + " m where m.id in (:ids)");
}
@@ -87,7 +97,8 @@ public abstract class AbstractPurge implements Purge {
* Delete violations (RULE_FAILURES table)
*/
protected void deleteViolations(List<Integer> snapshotIds) {
- executeQuery("delete violations", snapshotIds, "delete from " + RuleFailureModel.class.getSimpleName() + " e where e.snapshotId in (:ids)");
+ executeQuery("delete violations", snapshotIds, "delete from " + RuleFailureModel.class.getSimpleName()
+ + " e where e.snapshotId in (:ids)");
}
/**