public Map<String, String> getPersonMap(Company company, boolean withEmpty) { List<Person> persons = personDao.getAllPersonByCompany(company); Map<String, String> map = new TreeMap<String, String>(); map.clear(); if (withEmpty) { map.put("", null); } for (Person person : persons) { map.put(person.toString() == null ? "" : person.toString(), person.getId().toString()); } return map; }
public Person savePerson(Person person) { return personDao.savePerson(person); }
public void saveOrUpdate(Person person) { personDao.saveOrUpdate(person); }
public Person findPersonById(Company company, long id) { return personDao.findPersonById(company, id).get(0); }
public List<Person> getAllPersonByCompany(Company company) { return personDao.getAllPersonByCompany(company); }