Salome HOME
New study creation is fixed. Search page is also accessible now.
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / admin / DatabaseIndexingAction.java
index 303bde8a000d3788f010d98462f737199defbb3e..b3b00415ab399722e2d42658c726a29833e4defb 100644 (file)
@@ -7,6 +7,7 @@ import org.hibernate.Session;
 import org.hibernate.Transaction;
 import org.splat.service.SearchService;
 import org.splat.service.SearchServiceImpl;
+import org.splat.service.StudyService;
 import org.splat.simer.Action;
 import org.splat.dal.dao.som.Database;
 import org.splat.dal.bo.som.Study;
@@ -18,6 +19,7 @@ public class DatabaseIndexingAction extends Action {
     private String              indices;
        private SearchService _searchService;
        private ImportedStudy _importedStudy;
+       private StudyService _studyService;
 
     private static final long serialVersionUID = 4194268823457749655L;
 
@@ -47,7 +49,7 @@ public class DatabaseIndexingAction extends Action {
 
       for (int i=0; i<ridlist.length; i++) {
        int                 index = Integer.valueOf(ridlist[i].trim());
-       Study               study = Database.selectStudy(index);
+       Study               study = getStudyService().selectStudy(index);
         getSearchService().indexStudy(study);
       }
       filter.put("owner", "all");   // Just in case of 1st study search
@@ -105,4 +107,23 @@ public class DatabaseIndexingAction extends Action {
        public void setImportedStudy(ImportedStudy importedStudy) {
                _importedStudy = importedStudy;
        }
+
+       /**
+        * Get the studyService.
+        * 
+        * @return the studyService
+        */
+       public StudyService getStudyService() {
+               return _studyService;
+       }
+
+       /**
+        * Set the studyService.
+        * 
+        * @param studyService
+        *            the studyService to set
+        */
+       public void setStudyService(StudyService studyService) {
+               _studyService = studyService;
+       }
 }
\ No newline at end of file