@Override public PersonDto getPersonById(Long personId) throws ApplicationException { Person person = personRepository.findOne(personId); return personConvertor.convertBean(person); }
@Override public List<PersonDto> searchPersonWithName(String name) throws ApplicationException { Collection<Person> searchResult = personRepository.searchPersonByName("name:*" + name + "*"); return personConvertor.convertBeanList(searchResult); }
@Override public PersonDto savePerson(PersonDto personDto) throws ApplicationException { Person person = personConvertor.convert(personDto); person = personRepository.save(person); return personConvertor.convertBean(person); }