public View getView() {
   Database database = FrameworkUtils.getDatabase(server_, filePath_);
   View view = database.getView(viewName_);
   view.setAutoUpdate(false);
   view.setEnableNoteIDsForCategories(true);
   if (category_ == null) {
     if (getResortColumn() != null) {
       view.resortView(getResortColumn(), isAscending());
     } else {
       view.resortView();
     }
   }
   return view;
 }
 @SuppressWarnings("deprecation")
 @Override
 public E getByKey(final Object key) {
   View view = getView();
   ViewEntry entry;
   if (key instanceof List) {
     Vector<Object> keyVec = new Vector<Object>((List<?>) key);
     entry = view.getEntryByKey(keyVec, true);
   } else {
     entry = view.getEntryByKey(key, true);
   }
   if (entry != null) {
     return createFromViewEntry(entry, columnInfo_);
   }
   return null;
 }
  protected ViewEntryCollection getEntries() {
    final Map<String, Object> requestScope = getRequestScope();
    final String key = "viewentries-" + this.toString();
    if (!requestScope.containsKey(key)) {
      View view = getView();
      if (StringUtil.isNotEmpty(searchQuery_)) {
        if (getResortColumn() != null) {
          view.FTSearchSorted(
              searchQuery_, 0, getResortColumn(), isAscending(), false, false, false);
        } else {
          view.FTSearch(searchQuery_);
        }
      }

      if (category_ != null) {
        requestScope.put(key, view.getAllEntriesByKey(category_));
      } else {
        requestScope.put(key, view.getAllEntries());
      }
    }
    return (ViewEntryCollection) requestScope.get(key);
  }
  protected ViewNavigator getNewNavigator() {
    View view = getView();
    ViewNavigator nav = null;
    if (category_ == null) {
      nav = view.createViewNav();
    } else {
      nav = view.createViewNavFromCategory(category_);
    }
    nav.setBufferMaxEntries(50); // The most common use will likely be a paged view

    int[] expandedIds = new int[expandedIds_.size()];
    int i = 0;
    for (Integer id : expandedIds_) {
      expandedIds[i++] = id;
    }
    int[] collapsedIds = new int[collapsedIds_.size()];
    i = 0;
    for (Integer id : collapsedIds_) {
      collapsedIds[i++] = id;
    }
    nav.setAutoExpandGuidance(50, collapsedIds, expandedIds);

    return nav;
  }