use of org.activityinfo.shared.command.handler.search.AllSearcher in project activityinfo by bedatadriven.
the class SearchHandler method searchAll.
/**
* Assumes the user typed a generic search term without specifying a
* dimension. Search using all possible searchers, and return a list of
* matched dimensions
*/
private void searchAll(final List<String> q, final ExecutionContext context, final AsyncCallback<SearchResult> callback) {
AllSearcher allSearcher = new AllSearcher(context.getTransaction());
allSearcher.searchAll(q, new AsyncCallback<Filter>() {
@Override
public void onFailure(Throwable caught) {
callback.onFailure(caught);
}
@Override
public void onSuccess(final Filter resultFilter) {
processFilter(context, callback, resultFilter);
}
});
}
use of org.activityinfo.shared.command.handler.search.AllSearcher in project activityinfo by bedatadriven.
the class SearchHandler method searchDimensions.
private void searchDimensions(QueryParser parser, final ExecutionContext context, final AsyncCallback<SearchResult> callback) {
AllSearcher allSearcher = new AllSearcher(context.getTransaction());
allSearcher.searchDimensions(parser.getUniqueDimensions(), new AsyncCallback<Filter>() {
@Override
public void onSuccess(Filter result) {
processFilter(context, callback, result);
}
@Override
public void onFailure(Throwable caught) {
callback.onFailure(caught);
}
});
}
Aggregations