public Specialty update(Specialty bean, Integer parentId) { bean = (Specialty) this.dao.update(bean); if (parentId != null) bean.setParent(findById(parentId)); else { bean.setParent(null); } return bean; }
public Specialty save(Specialty bean, Integer parentId) { if (parentId != null) { bean.setParent(findById(parentId)); } this.dao.save(bean); return bean; }