public Boolean isStale(TriageNotesRefVo triageNote) { if(triageNote == null) return false; DomainFactory factory = getDomainFactory(); List<?> notes = factory.find("select tr.id from TriageNotes as tr where tr.id = :TriageNoteId and tr.version > :TriageNoteVersion", new String[] {"TriageNoteId", "TriageNoteVersion"}, new Object[] {triageNote.getID_TriageNotes(), triageNote.getVersion_TriageNotes()}); if(notes != null && notes.size() > 0) return true; return false; }