01: package org.columba.core.search;
02:
03: import java.util.EventObject;
04: import java.util.List;
05:
06: import org.columba.core.search.api.IResultEvent;
07: import org.columba.core.search.api.ISearchCriteria;
08: import org.columba.core.search.api.ISearchResult;
09:
10: public class ResultEvent extends EventObject implements IResultEvent {
11:
12: private List<ISearchResult> result;
13:
14: private String searchTerm;
15:
16: private ISearchCriteria criteria;
17:
18: private int totalResultCount;
19:
20: private String name;
21:
22: public ResultEvent(Object source) {
23: super (source);
24: }
25:
26: public ResultEvent(Object source, String searchTerm) {
27: super (source);
28: this .searchTerm = searchTerm;
29: }
30:
31: public ResultEvent(Object source, String name,
32: List<ISearchResult> result, int totalResultCount) {
33: super (source);
34:
35: this .name = name;
36: this .result = result;
37: this .totalResultCount = totalResultCount;
38: }
39:
40: public ResultEvent(Object source, String searchTerm, String name,
41: ISearchCriteria criteria, List<ISearchResult> result,
42: int totalResultCount) {
43: super (source);
44:
45: this .searchTerm = searchTerm;
46: this .name = name;
47:
48: this .criteria = criteria;
49: this .result = result;
50: this .totalResultCount = totalResultCount;
51: }
52:
53: public List<ISearchResult> getSearchResults() {
54: return result;
55: }
56:
57: public String getSearchTerm() {
58: return searchTerm;
59: }
60:
61: public ISearchCriteria getSearchCriteria() {
62: return criteria;
63: }
64:
65: public int getTotalResultCount() {
66: return totalResultCount;
67: }
68:
69: public String getProviderName() {
70: return name;
71: }
72:
73: }
|