public WorkInfoListModel getListModel() { if (baseList == null) { try { baseList = workInfoService.getAllList(condition.genQuery()); listModel = new WorkInfoListModel(baseList); } catch (IOException e) { throw new RuntimeException(e); } } return baseList == null ? new WorkInfoListModel(new ArrayList<WorkInfoDto>()) : listModel; }
public List<String> completeEmployeeName(String query) { ArrayList<String> filterList = new ArrayList<String>(); if (baseList == null) { try { baseList = workInfoService.getAllList(condition.genQuery()); listModel = new WorkInfoListModel(baseList); } catch (IOException e) { throw new RuntimeException(e); } } for (WorkInfoDto dto : baseList) { if (dto.getName().toLowerCase().contains(query.toLowerCase())) filterList.add(dto.getName()); } return filterList; }