X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.indexing%2Fsrc%2Forg%2Fsimantics%2Fdb%2Findexing%2FIndexedRelationsSearcher.java;fp=bundles%2Forg.simantics.db.indexing%2Fsrc%2Forg%2Fsimantics%2Fdb%2Findexing%2FIndexedRelationsSearcher.java;h=2e714b09a9c1d9cded563c6279011de70175c1c4;hb=b14aabb9b1160cbbadef994db5778a45a13f5533;hp=a535183f2cd7ce0289c82b1638264d4331ef95b8;hpb=f4b65f5afe961edc8d5e1696f32c8efbb8ea48f6;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcher.java b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcher.java index a535183f2..2e714b09a 100644 --- a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcher.java +++ b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcher.java @@ -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> 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 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 persistentCachedList(IProgressMonitor monitor, RequestProcessor processor) throws ParseException, IOException, DatabaseException { + List 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> doSearch(IProgressMonitor monitor, RequestProcessor processor, String search, - int maxResultCount) throws ParseException, IOException, DatabaseException { + int maxResultCount) throws ParseException, IOException, IndexingException { List> persistent = persistentCachedSearch(monitor, processor, search, maxResultCount); List> cached = cache.doSearch(monitor, processor, search, maxResultCount); @@ -213,7 +214,7 @@ public class IndexedRelationsSearcher extends IndexedRelationsSearcherBase { @Override List doSearchResources(IProgressMonitor monitor, RequestProcessor processor, String search, - int maxResultCount) throws ParseException, IOException, DatabaseException { + int maxResultCount) throws ParseException, IOException, IndexingException { List persistent = persistentCachedSearchResources(monitor, processor, search, maxResultCount); List cached = cache.doSearchResources(monitor, processor, search, maxResultCount); @@ -229,7 +230,7 @@ public class IndexedRelationsSearcher extends IndexedRelationsSearcherBase { } - List doList(IProgressMonitor monitor, RequestProcessor processor) throws ParseException, IOException, DatabaseException { + List doList(IProgressMonitor monitor, RequestProcessor processor) throws ParseException, IOException, IndexingException { List persistent = persistentCachedList(monitor, processor);