public void createNewScienceProject(CreateScienceProjectVo vo) {
Set<SeteUser> students = new HashSet<SeteUser>();
if(projectDao.isStudentInAnotherProject(Integer.valueOf(vo.getCreator()))) {
BusinessRuleException bre = new BusinessRuleException();
bre.addCodedMessage("scienceProject.error.student.already.projectMember",
new String[] {"You"});
throw bre;
}
students.add(userDao.findById(Integer.valueOf(vo.getCreator())));
if(StringUtils.isNotBlank(vo.getPartner())) {
if(projectDao.isStudentInAnotherProject(Integer.valueOf(vo.getPartner()))) {
BusinessRuleException bre = new BusinessRuleException();
bre.addCodedMessage("scienceProject.error.student.already.projectMember",
new String[]{"Partner"});
throw bre;
}
if(vo.getPartner().equals(vo.getCreator())) {
BusinessRuleException bre = new BusinessRuleException();
bre.addCodedMessage("scienceProject.error.adding.student.moreThanOnce");
throw bre;
}
students.add(userDao.findById(Integer.valueOf(vo.getPartner())));
}