public ChangeRequestsHelper(View view) {
    currentView = view;
    long start = System.nanoTime();
    flm = new FolderListManager(currentView);
    flm.includeFolders(currentView.getRootFolder(), -1);

    Server server = currentView.getServer();

    crType = server.typeForName(server.getTypeNames().CHANGEREQUEST);

    ilm = new ItemListManager(crType, flm);
    ilm.getItems(); // Fetch all CR from the current view so we can poke them
    // later.
    long duration = System.nanoTime() - start;
    Log.logf("Creating cache of CR took %dns for view %s", duration, currentView.getName());
  }
  private QueryInfo buildQuery(Server server, Type crType, int crNumber) {
    int propertyID = crType.propertyForName(server.getPropertyNames().CR_CHANGE_NUMBER).getID();

    QueryPart part = new QueryPart(propertyID, QueryPart.REL_EQUAL, crNumber);
    QueryNode node = new QueryNode(QueryNode.OP_AND);
    node.appendQueryPart(part);

    QueryInfo query = new QueryInfo(crType, false, "My Temporary Query", node);
    return query;
  }