@Override public Fault findByName(String name) { // TODO Auto-generated method stub List<Fault> list = faultRepository.findByName(name); if (list != null && !list.isEmpty()) { Fault r = new Fault(); for (Fault f : list) { if (f.getFlag() != null && f.getFlag().toString().equals("0")) { r = f; break; } } return r; } else { return null; } }
@Override public List<Fault> findByStatus(Short status) { // TODO Auto-generated method stub return faultRepository.findByStatus(status); }