]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcher.java
Replace instantiations of DatabaseException in indexing
[simantics/platform.git] / bundles / org.simantics.db.indexing / src / org / simantics / db / indexing / IndexedRelationsSearcher.java
index a535183f2cd7ce0289c82b1638264d4331ef95b8..2e714b09a9c1d9cded563c6279011de70175c1c4 100644 (file)
@@ -25,6 +25,7 @@ import org.simantics.db.RequestProcessor;
 import org.simantics.db.Resource;
 import org.simantics.db.Session;
 import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.indexing.exception.IndexingException;
 import org.simantics.db.layer0.adapter.GenericRelation;
 import org.simantics.utils.datastructures.Pair;
 import org.slf4j.Logger;
@@ -102,7 +103,7 @@ public class IndexedRelationsSearcher extends IndexedRelationsSearcherBase {
                     } else if ("String".equals(fieldClass) || "Text".equals(fieldClass)) {
                         data[index++] = "";
                     } else {
-                        throw new DatabaseException("Can only index Long and String fields, encountered class " + fieldClass);
+                        throw new IndexingException("Can only index Long and String fields, encountered class " + fieldClass);
                     }
                 }
             }
@@ -126,7 +127,7 @@ public class IndexedRelationsSearcher extends IndexedRelationsSearcherBase {
     }
     
     List<Map<String, Object>> persistentCachedSearch(IProgressMonitor monitor, RequestProcessor processor, String search,
-            int maxResultCount) throws ParseException, IOException, DatabaseException {
+            int maxResultCount) throws ParseException, IOException, IndexingException {
         
        MemoryIndexing mem = MemoryIndexing.getInstance(session.getSession());
        
@@ -154,7 +155,7 @@ public class IndexedRelationsSearcher extends IndexedRelationsSearcherBase {
     }
 
     List<Resource> persistentCachedSearchResources(IProgressMonitor monitor, RequestProcessor processor, String search,
-            int maxResultCount) throws ParseException, IOException, DatabaseException {
+            int maxResultCount) throws ParseException, IOException, IndexingException {
         
        MemoryIndexing mem = MemoryIndexing.getInstance(session.getSession());
        
@@ -181,7 +182,7 @@ public class IndexedRelationsSearcher extends IndexedRelationsSearcherBase {
         
     }
     
-    List<Object> persistentCachedList(IProgressMonitor monitor, RequestProcessor processor) throws ParseException, IOException, DatabaseException {
+    List<Object> persistentCachedList(IProgressMonitor monitor, RequestProcessor processor) throws ParseException, IOException, IndexingException {
         
         startAccess(monitor, processor.getSession(), false);
 
@@ -193,7 +194,7 @@ public class IndexedRelationsSearcher extends IndexedRelationsSearcherBase {
     
     @Override
     List<Map<String, Object>> doSearch(IProgressMonitor monitor, RequestProcessor processor, String search,
-            int maxResultCount) throws ParseException, IOException, DatabaseException {
+            int maxResultCount) throws ParseException, IOException, IndexingException {
         
         List<Map<String,Object>> persistent = persistentCachedSearch(monitor, processor, search, maxResultCount);
         List<Map<String,Object>> cached = cache.doSearch(monitor, processor, search, maxResultCount);
@@ -213,7 +214,7 @@ public class IndexedRelationsSearcher extends IndexedRelationsSearcherBase {
     
     @Override
     List<Resource> doSearchResources(IProgressMonitor monitor, RequestProcessor processor, String search,
-               int maxResultCount) throws ParseException, IOException, DatabaseException {
+               int maxResultCount) throws ParseException, IOException, IndexingException {
 
         List<Resource> persistent = persistentCachedSearchResources(monitor, processor, search, maxResultCount);
         List<Resource> cached = cache.doSearchResources(monitor, processor, search, maxResultCount);
@@ -229,7 +230,7 @@ public class IndexedRelationsSearcher extends IndexedRelationsSearcherBase {
        
     }
     
-    List<Object> doList(IProgressMonitor monitor, RequestProcessor processor) throws ParseException, IOException, DatabaseException {
+    List<Object> doList(IProgressMonitor monitor, RequestProcessor processor) throws ParseException, IOException, IndexingException {
 
         List<Object> persistent = persistentCachedList(monitor, processor);