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;
} 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);
}
}
}
}
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());
}
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());
}
- 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);
@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);
@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);
}
- 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);