* @see ProjectService#add(String, String, int)
*/
public Errors add(final String code, final String name, final int defaultMemberPersistanceId) {
// First call for a project instance
Project basicProject = CoreObjectFactory.getProject();
// populate the instance
basicProject.setCode(code);
basicProject.setName(name);
// then find the default member in the user repository
User user = userRepository.findUserByPersistanceId(defaultMemberPersistanceId);
// add the user to the set of members
Set<User> members = new HashSet<User>();
members.add(user);
basicProject.setMembers(members);
// validation of the basicProject
Errors errors = projectValidator.validate(basicProject);
if (!errors.hasErrors()) {