public Encounter getSpecificEncounter(int index) { init(); if (index < 0) { index = 0; } if (index > (data.size() - 1)) { index = data.size() - 1; } Encounter obj = data.get(index); Long id = obj.getId(); return encounterService.findEncounter(id); }
public Encounter getRandomEncounter() { init(); Encounter obj = data.get(rnd.nextInt(data.size())); Long id = obj.getId(); return encounterService.findEncounter(id); }