/* * (non-Javadoc) * * @see * org.openiam.idm.srvc.user.service.UserDataService#getEmailAddressMap( * java.lang.String) */ @Transactional(readOnly = true) public Map<String, EmailAddress> getEmailAddressMap(String userId) { if (userId == null) throw new NullPointerException("userId is null"); Map<String, EmailAddressEntity> emailAddressEntityMap = emailAddressDao.findByParent(userId, ContactConstants.PARENT_TYPE_USER); Map<String, EmailAddress> emailAddressMap = new HashMap<String, EmailAddress>(); for (Map.Entry<String, EmailAddressEntity> addressEntityEntry : emailAddressEntityMap.entrySet()) { emailAddressMap.put( addressEntityEntry.getKey(), emailAddressDozerConverter.convertToDTO(addressEntityEntry.getValue(), true)); } return emailAddressMap; }
/* * (non-Javadoc) * * @see * org.openiam.idm.srvc.user.service.UserDataService#getPhoneMap(java.lang * .String) */ @Transactional(readOnly = true) public Map<String, Phone> getPhoneMap(String userId) { if (userId == null) throw new NullPointerException("userId is null"); Map<String, Phone> phoneMap = null; Map<String, PhoneEntity> phoneEntityMap = phoneDao.findByParent(userId, ContactConstants.PARENT_TYPE_USER); if (phoneEntityMap != null) { phoneMap = new HashMap<String, Phone>(); for (Map.Entry<String, PhoneEntity> phoneEntityEntry : phoneEntityMap.entrySet()) { phoneMap.put( phoneEntityEntry.getKey(), phoneDozerConverter.convertToDTO(phoneEntityEntry.getValue(), true)); } } return phoneMap; }