import org.hibernate.Session;
import org.hibernate.Transaction;
+import org.splat.service.SearchService;
+import org.splat.service.SearchServiceImpl;
import org.splat.simer.Action;
-import org.splat.som.Database;
-import org.splat.som.Study;
+import org.splat.dal.dao.som.Database;
+import org.splat.dal.bo.som.Study;
public class DatabaseIndexingAction extends Action {
private List<ImportedStudy> newstudies;
private String indices;
+ private SearchService _searchService;
+ private ImportedStudy _importedStudy;
private static final long serialVersionUID = 4194268823457749655L;
Session connex = Database.getSession();
Transaction transax = connex.beginTransaction();
- newstudies = ImportedStudy.selectAll();
+ newstudies = getImportedStudy().selectAll();
indices = "";
transax.commit();
for (int i=0; i<ridlist.length; i++) {
int index = Integer.valueOf(ridlist[i].trim());
Study study = Database.selectStudy(index);
- Database.indexStudy(study);
+ getSearchService().indexStudy(study);
}
filter.put("owner", "all"); // Just in case of 1st study search
// ---------------------------------------
this.indices = indices;
}
+
+ /**
+ * Get the searchService.
+ * @return the searchService
+ */
+ public SearchService getSearchService() {
+ return _searchService;
+ }
+
+ /**
+ * Set the searchService.
+ * @param searchService the searchService to set
+ */
+ public void setSearchService(SearchService searchService) {
+ _searchService = searchService;
+ }
+
+ /**
+ * Get the importedStudy.
+ * @return the importedStudy
+ */
+ public ImportedStudy getImportedStudy() {
+ return _importedStudy;
+ }
+
+ /**
+ * Set the importedStudy.
+ * @param importedStudy the importedStudy to set
+ */
+ public void setImportedStudy(ImportedStudy importedStudy) {
+ _importedStudy = importedStudy;
+ }
}
\ No newline at end of file