return Boolean.FALSE;
}
}
public void editScienceProject(CreateScienceProjectVo vo, Boolean isadmin) {
ScienceProject sp = projectDao.findById(vo.getProjId());
this.checkEditBusinessRules(vo);
if(sp != null){
sp.setName(vo.getName());
sp.setDescription(vo.getDescription());
sp.setScienceProjectCategoryType(TypeUtil.forKey(ScienceProjectCategoryType.class,
vo.getCategory()));
if(isadmin){
Set<SeteUser> students = sp.getStudents();
sp.getStudents().removeAll(students);
sp.setSponsor(userDao.findById(Integer.valueOf(vo.getSponsor())));
if(StringUtils.isNotBlank(vo.getCreator())) {
sp.getStudents().add(userDao.findById(Integer.valueOf(vo.getCreator())));
}
if(StringUtils.isNotBlank(vo.getPartner())) {
sp.getStudents().add(userDao.findById(Integer.valueOf(vo.getPartner())));
}
}
projectDao.saveScienceProject(sp);
}
}