private void createOrUpdatePersonalContactInfo(final ExportedUser user, final long userId) throws SIdentityException, SUserCreationException { SContactInfo persoContactInfo = identityService.getUserContactInfo(userId, true); if (persoContactInfo == null) { persoContactInfo = BuilderFactory.get(SContactInfoBuilderFactory.class).createNewInstance(userId, true).done(); identityService.createUserContactInfo(persoContactInfo); } final EntityUpdateDescriptor personalDataDesc = getUserContactInfoDescriptor(user, true); identityService.updateUserContactInfo(persoContactInfo, personalDataDesc); }
private void createOrUpdatePersonalContactInfo(final ExportedUser user, final long userId) throws SIdentityException, SUserCreationException { SContactInfo persoContactInfo = identityService.getUserContactInfo(userId, true); if (persoContactInfo == null) { persoContactInfo = BuilderFactory.get(SContactInfoBuilderFactory.class).createNewInstance(userId, true).done(); identityService.createUserContactInfo(persoContactInfo); } final EntityUpdateDescriptor personalDataDesc = getUserContactInfoDescriptor(user, true); identityService.updateUserContactInfo(persoContactInfo, personalDataDesc); }
private void createOrUpdateProfessionalContactInfo(final ExportedUser user, final long userId) throws SIdentityException, SUserCreationException { SContactInfo professContactInfo = identityService.getUserContactInfo(userId, false); if (professContactInfo == null) { professContactInfo = BuilderFactory.get(SContactInfoBuilderFactory.class).createNewInstance(userId, false).done(); identityService.createUserContactInfo(professContactInfo); } final EntityUpdateDescriptor professionalDataDesc = getUserContactInfoDescriptor(user, false); identityService.updateUserContactInfo(professContactInfo, professionalDataDesc); }
contactInfoBuilder.setZipCode(zipCode); return contactInfoBuilder.done();
private void createOrUpdateProfessionalContactInfo(final ExportedUser user, final long userId) throws SIdentityException, SUserCreationException { SContactInfo professContactInfo = identityService.getUserContactInfo(userId, false); if (professContactInfo == null) { professContactInfo = BuilderFactory.get(SContactInfoBuilderFactory.class).createNewInstance(userId, false).done(); identityService.createUserContactInfo(professContactInfo); } final EntityUpdateDescriptor professionalDataDesc = getUserContactInfoDescriptor(user, false); identityService.updateUserContactInfo(professContactInfo, professionalDataDesc); }
contactInfoBuilder.setZipCode(zipCode); return contactInfoBuilder.done();
SContactInfo persoContactInfo = getUserContactInfo(userId, true); if (persoContactInfo == null) { persoContactInfo = BuilderFactory.get(SContactInfoBuilderFactory.class).createNewInstance(userId, true).done(); createUserContactInfo(persoContactInfo); SContactInfo professContactInfo = getUserContactInfo(userId, false); if (professContactInfo == null) { professContactInfo = BuilderFactory.get(SContactInfoBuilderFactory.class).createNewInstance(userId, false).done(); createUserContactInfo(professContactInfo);
SContactInfo persoContactInfo = getUserContactInfo(userId, true); if (persoContactInfo == null) { persoContactInfo = BuilderFactory.get(SContactInfoBuilderFactory.class).createNewInstance(userId, true).done(); createUserContactInfo(persoContactInfo); SContactInfo professContactInfo = getUserContactInfo(userId, false); if (professContactInfo == null) { professContactInfo = BuilderFactory.get(SContactInfoBuilderFactory.class).createNewInstance(userId, false).done(); createUserContactInfo(professContactInfo);
@Override public SUser createUser(SUser sUser, SContactInfo personalContactInfo, SContactInfo proContactInfo, String iconFilename, byte[] iconContent) throws SUserCreationException { if (iconFilename != null && iconContent != null) { try { SIcon icon = createIcon(iconFilename, iconContent); ((SUserImpl) sUser).setIconId(icon.getId()); } catch (SRecorderException e) { throw new SUserCreationException(e); } } SUser user = createUser(sUser); if (personalContactInfo != null) { createUserContactInfo(BuilderFactory.get(SContactInfoBuilderFactory.class).createNewInstance(personalContactInfo).setUserId(user.getId()).done()); } if (proContactInfo != null) { createUserContactInfo(BuilderFactory.get(SContactInfoBuilderFactory.class).createNewInstance(proContactInfo).setUserId(user.getId()).done()); } return user; }
@Override public SUser createUser(SUser sUser, SContactInfo personalContactInfo, SContactInfo proContactInfo, String iconFilename, byte[] iconContent) throws SUserCreationException { if (iconFilename != null && iconContent != null) { try { SIcon icon = createIcon(iconFilename, iconContent); ((SUserImpl) sUser).setIconId(icon.getId()); } catch (SRecorderException e) { throw new SUserCreationException(e); } } SUser user = createUser(sUser); if (personalContactInfo != null) { createUserContactInfo(BuilderFactory.get(SContactInfoBuilderFactory.class).createNewInstance(personalContactInfo).setUserId(user.getId()).done()); } if (proContactInfo != null) { createUserContactInfo(BuilderFactory.get(SContactInfoBuilderFactory.class).createNewInstance(proContactInfo).setUserId(user.getId()).done()); } return user; }
contactInfoBuilder.setZipCode(user.getProfessionalZipCode()); return contactInfoBuilder.done();
contactInfoBuilder.setZipCode(user.getProfessionalZipCode()); return contactInfoBuilder.done();