* @see net.sf.pmr.core.service.BasicProjectService#addOrUpdate(int, java.lang.String, java.lang.String, int, long)
*/
public Errors addOrUpdate(final int id, final String code, final String name, final int defaultMemberId, final long persistanceVersion) {
// First call for a project instance
BasicProject basicProject = CoreObjectFactory.getBasicProject();
// populate the instance
basicProject.setId(id);
basicProject.setCode(code);
basicProject.setName(name);
basicProject.setPersistanceVersion(persistanceVersion);
// then find the default member in the user repository
User user = userRepository.findUserById(defaultMemberId);
// add the user to the set of members
Set members = new HashSet();
members.add(user);
basicProject.setMembers(members);
// validation of the basicProject
Errors errors = basicProjectValidator.validate(basicProject);
if (!errors.hasErrors()) {