public void addAddressSet(Set<Address> adrSet) { if (adrSet == null || adrSet.size() == 0) return; Iterator<Address> it = adrSet.iterator(); while (it.hasNext()) { Address adr = it.next(); addAddress(adr); } }
public void addPhoneSet(Set<Phone> phoneSet) { if (phoneSet == null || phoneSet.size() == 0) return; Iterator<Phone> it = phoneSet.iterator(); while (it.hasNext()) { Phone ph = it.next(); addPhone(ph); } }
@Transactional public void addEmailAddressSet(Set<EmailAddress> adrSet) { if (adrSet == null || adrSet.size() == 0) return; Iterator<EmailAddress> it = adrSet.iterator(); while (it.hasNext()) { EmailAddress adr = it.next(); addEmailAddress(adr); } }
private void validateEmailAddress(User user, Set<EmailAddress> emailSet) { if (emailSet == null || emailSet.isEmpty()) return; Iterator<EmailAddress> it = emailSet.iterator(); while (it.hasNext()) { EmailAddress emailAdr = it.next(); if (StringUtils.isEmpty(emailAdr.getParentId())) { emailAdr.setParentId(user.getUserId()); emailAdr.setParentType(ContactConstants.PARENT_TYPE_USER); } } }