searchType = SEARCH_STARTFROM;
}
if (StringUtil.equals(searchType, SEARCH_MATCH)) {
ViewEntryCollection vc = view.getAllEntriesByKey(key);
ViewEntry ve = start > 0 ? vc.getNthEntry(start) : vc.getFirstEntry();
for (int i = 0; i < count && ve != null; i++) {
entries.add(meta.createEntry(ve));
ve = vc.getNextEntry(ve);
}
int nEntries = vc.getCount();
return new Result(entries, nEntries);
}
if (StringUtil.equals(searchType, SEARCH_FTSEARCH)) {
applyFTSearch(options, view, key);
ViewEntryCollection vc = view.getAllEntries();
ViewEntry ve = start > 0 ? vc.getNthEntry(start) : vc.getFirstEntry();
for (int i = 0; i < count && ve != null; i++) {
entries.add(meta.createEntry(ve));
ve = vc.getNextEntry(ve);
}
int nEntries = vc.getCount();
return new Result(entries, nEntries);
} else {
ViewNavigator nav = view.createViewNav();
try {
ViewEntry ve = null;
if (key != null) {
int searchOptions = DominoUtils.FIND_GREATER_THAN | DominoUtils.FIND_EQUAL | DominoUtils.FIND_PARTIAL
| DominoUtils.FIND_CASE_INSENSITIVE;
// This is the one line that's different
ve = DominoUtils.getViewEntryByKeyWithOptions(Factory.toLotus(view), key, searchOptions);