]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5329 - Integrate ChangeLog (Activity) into Synchronizer
authorStephane Gamard <stephane.gamard@searchbox.com>
Wed, 18 Jun 2014 13:08:00 +0000 (15:08 +0200)
committerStephane Gamard <stephane.gamard@searchbox.com>
Wed, 18 Jun 2014 13:25:39 +0000 (15:25 +0200)
sonar-server/src/main/java/org/sonar/server/activity/db/ActivityDao.java

index 14be50ca3b71573c5c560f80489eaf0c55bb4a20..80c471929ffa1a90d7e7ed4950cf6e4668752910 100644 (file)
@@ -27,6 +27,8 @@ import org.sonar.core.activity.db.ActivityMapper;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.server.db.BaseDao;
 import org.sonar.server.search.IndexDefinition;
+import org.sonar.server.search.action.DtoIndexAction;
+import org.sonar.server.search.action.IndexAction;
 
 import java.util.Date;
 import java.util.List;
@@ -72,6 +74,9 @@ public class ActivityDao extends BaseDao<ActivityMapper, ActivityDto, ActivityKe
 
   @Override
   public void synchronizeAfter(DbSession session, Date time) {
-
+    for(ActivityDto activity:this.findAll(session)){
+      session.enqueue(new DtoIndexAction<ActivityDto>(this.getIndexType(), IndexAction.Method.UPSERT, activity));
+    }
+    session.commit();
   }
 }