private void searchById() { SystemLogVoCollection entries = new SystemLogVoCollection(); if(form.lyrSearch().tabSearchById().intEventId().getValue() != null) { entries.add(domain.getEntry(form.lyrSearch().tabSearchById().intEventId().getValue())); } populate(entries); if(form.grdDetails().getRows().size() > 0) { form.grdDetails().setValue(form.grdDetails().getRows().get(0).getValue()); updateContextMenuState(); displayDetails(); } }
private void populate(SystemLogVoCollection entries) { form.grdDetails().getRows().clear(); form.grdDetails().resetScrollPosition(); form.ctnDetails().setCollapsed(true); clearDetails(); if(entries == null) return; for(int x = 0; x < entries.size(); x++) { populate(entries.get(x)); } updateContextMenuState(); }
@SuppressWarnings("unchecked") public SystemLogVoCollection getEntries(String sessionId) { if(sessionId == null || sessionId.trim().length() == 0) return new SystemLogVoCollection(); DomainFactory factory = getDomainFactory(); String hql = " from SystemLog sl where sl.sessionId = '" + sessionId + "' order by sl.id desc"; List entries = factory.find(hql); return SystemLogVoAssembler.createSystemLogVoCollectionFromSystemLog(entries); }