private ChangeRequest getChangeRequest(Label label) { int crNumber = getCRNumber(label); Server server = currentView.getServer(); QueryInfo query = buildQuery(server, crType, crNumber); Items items = ilm.selectByQuery(query); if (items.size() == 0) { throw new NoSuchChangeRequestException("Change Request #" + crNumber + " not found."); } return (ChangeRequest) items.getAt(0); }
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()); }