List of usage examples for com.liferay.portal.kernel.util StringPool COMMA
String COMMA
To view the source code for com.liferay.portal.kernel.util StringPool COMMA.
Click Source Link
From source file:com.sky.skyseries.apm.service.persistence.impl.RoomPersistenceImpl.java
License:Open Source License
@Override public Map<Serializable, Room> fetchByPrimaryKeys(Set<Serializable> primaryKeys) { if (primaryKeys.isEmpty()) { return Collections.emptyMap(); }//from ww w. jav a 2s .c o m Map<Serializable, Room> map = new HashMap<Serializable, Room>(); if (primaryKeys.size() == 1) { Iterator<Serializable> iterator = primaryKeys.iterator(); Serializable primaryKey = iterator.next(); Room room = fetchByPrimaryKey(primaryKey); if (room != null) { map.put(primaryKey, room); } return map; } Set<Serializable> uncachedPrimaryKeys = null; for (Serializable primaryKey : primaryKeys) { Serializable serializable = entityCache.getResult(RoomModelImpl.ENTITY_CACHE_ENABLED, RoomImpl.class, primaryKey); if (serializable != nullModel) { if (serializable == null) { if (uncachedPrimaryKeys == null) { uncachedPrimaryKeys = new HashSet<Serializable>(); } uncachedPrimaryKeys.add(primaryKey); } else { map.put(primaryKey, (Room) serializable); } } } if (uncachedPrimaryKeys == null) { return map; } StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) + 1); query.append(_SQL_SELECT_ROOM_WHERE_PKS_IN); for (Serializable primaryKey : uncachedPrimaryKeys) { query.append(String.valueOf(primaryKey)); query.append(StringPool.COMMA); } query.setIndex(query.index() - 1); query.append(StringPool.CLOSE_PARENTHESIS); String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); for (Room room : (List<Room>) q.list()) { map.put(room.getPrimaryKeyObj(), room); cacheResult(room); uncachedPrimaryKeys.remove(room.getPrimaryKeyObj()); } for (Serializable primaryKey : uncachedPrimaryKeys) { entityCache.putResult(RoomModelImpl.ENTITY_CACHE_ENABLED, RoomImpl.class, primaryKey, nullModel); } } catch (Exception e) { throw processException(e); } finally { closeSession(session); } return map; }
From source file:com.sky.skyseries.apm.service.persistence.impl.RoomStatusPersistenceImpl.java
License:Open Source License
@Override public Map<Serializable, RoomStatus> fetchByPrimaryKeys(Set<Serializable> primaryKeys) { if (primaryKeys.isEmpty()) { return Collections.emptyMap(); }//from www. j a va 2s. co m Map<Serializable, RoomStatus> map = new HashMap<Serializable, RoomStatus>(); if (primaryKeys.size() == 1) { Iterator<Serializable> iterator = primaryKeys.iterator(); Serializable primaryKey = iterator.next(); RoomStatus roomStatus = fetchByPrimaryKey(primaryKey); if (roomStatus != null) { map.put(primaryKey, roomStatus); } return map; } Set<Serializable> uncachedPrimaryKeys = null; for (Serializable primaryKey : primaryKeys) { Serializable serializable = entityCache.getResult(RoomStatusModelImpl.ENTITY_CACHE_ENABLED, RoomStatusImpl.class, primaryKey); if (serializable != nullModel) { if (serializable == null) { if (uncachedPrimaryKeys == null) { uncachedPrimaryKeys = new HashSet<Serializable>(); } uncachedPrimaryKeys.add(primaryKey); } else { map.put(primaryKey, (RoomStatus) serializable); } } } if (uncachedPrimaryKeys == null) { return map; } StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) + 1); query.append(_SQL_SELECT_ROOMSTATUS_WHERE_PKS_IN); for (Serializable primaryKey : uncachedPrimaryKeys) { query.append(String.valueOf(primaryKey)); query.append(StringPool.COMMA); } query.setIndex(query.index() - 1); query.append(StringPool.CLOSE_PARENTHESIS); String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); for (RoomStatus roomStatus : (List<RoomStatus>) q.list()) { map.put(roomStatus.getPrimaryKeyObj(), roomStatus); cacheResult(roomStatus); uncachedPrimaryKeys.remove(roomStatus.getPrimaryKeyObj()); } for (Serializable primaryKey : uncachedPrimaryKeys) { entityCache.putResult(RoomStatusModelImpl.ENTITY_CACHE_ENABLED, RoomStatusImpl.class, primaryKey, nullModel); } } catch (Exception e) { throw processException(e); } finally { closeSession(session); } return map; }
From source file:com.sky.skyseries.apm.service.persistence.impl.RoomTypePersistenceImpl.java
License:Open Source License
@Override public Map<Serializable, RoomType> fetchByPrimaryKeys(Set<Serializable> primaryKeys) { if (primaryKeys.isEmpty()) { return Collections.emptyMap(); }//from w ww . j a va2s . c om Map<Serializable, RoomType> map = new HashMap<Serializable, RoomType>(); if (primaryKeys.size() == 1) { Iterator<Serializable> iterator = primaryKeys.iterator(); Serializable primaryKey = iterator.next(); RoomType roomType = fetchByPrimaryKey(primaryKey); if (roomType != null) { map.put(primaryKey, roomType); } return map; } Set<Serializable> uncachedPrimaryKeys = null; for (Serializable primaryKey : primaryKeys) { Serializable serializable = entityCache.getResult(RoomTypeModelImpl.ENTITY_CACHE_ENABLED, RoomTypeImpl.class, primaryKey); if (serializable != nullModel) { if (serializable == null) { if (uncachedPrimaryKeys == null) { uncachedPrimaryKeys = new HashSet<Serializable>(); } uncachedPrimaryKeys.add(primaryKey); } else { map.put(primaryKey, (RoomType) serializable); } } } if (uncachedPrimaryKeys == null) { return map; } StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) + 1); query.append(_SQL_SELECT_ROOMTYPE_WHERE_PKS_IN); for (Serializable primaryKey : uncachedPrimaryKeys) { query.append(String.valueOf(primaryKey)); query.append(StringPool.COMMA); } query.setIndex(query.index() - 1); query.append(StringPool.CLOSE_PARENTHESIS); String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); for (RoomType roomType : (List<RoomType>) q.list()) { map.put(roomType.getPrimaryKeyObj(), roomType); cacheResult(roomType); uncachedPrimaryKeys.remove(roomType.getPrimaryKeyObj()); } for (Serializable primaryKey : uncachedPrimaryKeys) { entityCache.putResult(RoomTypeModelImpl.ENTITY_CACHE_ENABLED, RoomTypeImpl.class, primaryKey, nullModel); } } catch (Exception e) { throw processException(e); } finally { closeSession(session); } return map; }
From source file:com.sohlman.liferay.bffss.service.persistence.impl.FileDataPersistenceImpl.java
License:Open Source License
@Override public Map<Serializable, FileData> fetchByPrimaryKeys(Set<Serializable> primaryKeys) { if (primaryKeys.isEmpty()) { return Collections.emptyMap(); }/*from ww w. ja va2s . c o m*/ Map<Serializable, FileData> map = new HashMap<Serializable, FileData>(); if (primaryKeys.size() == 1) { Iterator<Serializable> iterator = primaryKeys.iterator(); Serializable primaryKey = iterator.next(); FileData fileData = fetchByPrimaryKey(primaryKey); if (fileData != null) { map.put(primaryKey, fileData); } return map; } Set<Serializable> uncachedPrimaryKeys = null; for (Serializable primaryKey : primaryKeys) { FileData fileData = (FileData) entityCache.getResult(FileDataModelImpl.ENTITY_CACHE_ENABLED, FileDataImpl.class, primaryKey); if (fileData == null) { if (uncachedPrimaryKeys == null) { uncachedPrimaryKeys = new HashSet<Serializable>(); } uncachedPrimaryKeys.add(primaryKey); } else { map.put(primaryKey, fileData); } } if (uncachedPrimaryKeys == null) { return map; } StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) + 1); query.append(_SQL_SELECT_FILEDATA_WHERE_PKS_IN); for (Serializable primaryKey : uncachedPrimaryKeys) { query.append(String.valueOf(primaryKey)); query.append(StringPool.COMMA); } query.setIndex(query.index() - 1); query.append(StringPool.CLOSE_PARENTHESIS); String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); for (FileData fileData : (List<FileData>) q.list()) { map.put(fileData.getPrimaryKeyObj(), fileData); cacheResult(fileData); uncachedPrimaryKeys.remove(fileData.getPrimaryKeyObj()); } for (Serializable primaryKey : uncachedPrimaryKeys) { entityCache.putResult(FileDataModelImpl.ENTITY_CACHE_ENABLED, FileDataImpl.class, primaryKey, _nullFileData); } } catch (Exception e) { throw processException(e); } finally { closeSession(session); } return map; }
From source file:com.sohlman.liferay.bffss.service.persistence.impl.FileInfoPersistenceImpl.java
License:Open Source License
@Override public Map<Serializable, FileInfo> fetchByPrimaryKeys(Set<Serializable> primaryKeys) { if (primaryKeys.isEmpty()) { return Collections.emptyMap(); }//from w ww. j a va 2 s.c o m Map<Serializable, FileInfo> map = new HashMap<Serializable, FileInfo>(); if (primaryKeys.size() == 1) { Iterator<Serializable> iterator = primaryKeys.iterator(); Serializable primaryKey = iterator.next(); FileInfo fileInfo = fetchByPrimaryKey(primaryKey); if (fileInfo != null) { map.put(primaryKey, fileInfo); } return map; } Set<Serializable> uncachedPrimaryKeys = null; for (Serializable primaryKey : primaryKeys) { FileInfo fileInfo = (FileInfo) entityCache.getResult(FileInfoModelImpl.ENTITY_CACHE_ENABLED, FileInfoImpl.class, primaryKey); if (fileInfo == null) { if (uncachedPrimaryKeys == null) { uncachedPrimaryKeys = new HashSet<Serializable>(); } uncachedPrimaryKeys.add(primaryKey); } else { map.put(primaryKey, fileInfo); } } if (uncachedPrimaryKeys == null) { return map; } StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) + 1); query.append(_SQL_SELECT_FILEINFO_WHERE_PKS_IN); for (Serializable primaryKey : uncachedPrimaryKeys) { query.append(String.valueOf(primaryKey)); query.append(StringPool.COMMA); } query.setIndex(query.index() - 1); query.append(StringPool.CLOSE_PARENTHESIS); String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); for (FileInfo fileInfo : (List<FileInfo>) q.list()) { map.put(fileInfo.getPrimaryKeyObj(), fileInfo); cacheResult(fileInfo); uncachedPrimaryKeys.remove(fileInfo.getPrimaryKeyObj()); } for (Serializable primaryKey : uncachedPrimaryKeys) { entityCache.putResult(FileInfoModelImpl.ENTITY_CACHE_ENABLED, FileInfoImpl.class, primaryKey, _nullFileInfo); } } catch (Exception e) { throw processException(e); } finally { closeSession(session); } return map; }
From source file:com.sohlman.liferay.perm.integ.service.persistence.impl.IntegrationInfoPersistenceImpl.java
License:Open Source License
@Override public Map<Serializable, IntegrationInfo> fetchByPrimaryKeys(Set<Serializable> primaryKeys) { if (primaryKeys.isEmpty()) { return Collections.emptyMap(); }/* www .j a va2s . c o m*/ Map<Serializable, IntegrationInfo> map = new HashMap<Serializable, IntegrationInfo>(); if (primaryKeys.size() == 1) { Iterator<Serializable> iterator = primaryKeys.iterator(); Serializable primaryKey = iterator.next(); IntegrationInfo integrationInfo = fetchByPrimaryKey(primaryKey); if (integrationInfo != null) { map.put(primaryKey, integrationInfo); } return map; } Set<Serializable> uncachedPrimaryKeys = null; for (Serializable primaryKey : primaryKeys) { Serializable serializable = entityCache.getResult(IntegrationInfoModelImpl.ENTITY_CACHE_ENABLED, IntegrationInfoImpl.class, primaryKey); if (serializable != nullModel) { if (serializable == null) { if (uncachedPrimaryKeys == null) { uncachedPrimaryKeys = new HashSet<Serializable>(); } uncachedPrimaryKeys.add(primaryKey); } else { map.put(primaryKey, (IntegrationInfo) serializable); } } } if (uncachedPrimaryKeys == null) { return map; } StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) + 1); query.append(_SQL_SELECT_INTEGRATIONINFO_WHERE_PKS_IN); for (Serializable primaryKey : uncachedPrimaryKeys) { query.append(String.valueOf(primaryKey)); query.append(StringPool.COMMA); } query.setIndex(query.index() - 1); query.append(StringPool.CLOSE_PARENTHESIS); String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); for (IntegrationInfo integrationInfo : (List<IntegrationInfo>) q.list()) { map.put(integrationInfo.getPrimaryKeyObj(), integrationInfo); cacheResult(integrationInfo); uncachedPrimaryKeys.remove(integrationInfo.getPrimaryKeyObj()); } for (Serializable primaryKey : uncachedPrimaryKeys) { entityCache.putResult(IntegrationInfoModelImpl.ENTITY_CACHE_ENABLED, IntegrationInfoImpl.class, primaryKey, nullModel); } } catch (Exception e) { throw processException(e); } finally { closeSession(session); } return map; }
From source file:com.startarget.portlet.service.persistence.ProjectPK.java
License:Open Source License
@Override public String toString() { StringBundler sb = new StringBundler(10); sb.append(StringPool.OPEN_CURLY_BRACE); sb.append("projectId"); sb.append(StringPool.EQUAL);//from www . ja v a2 s.co m sb.append(projectId); sb.append(StringPool.COMMA); sb.append(StringPool.SPACE); sb.append("projectName"); sb.append(StringPool.EQUAL); sb.append(projectName); sb.append(StringPool.CLOSE_CURLY_BRACE); return sb.toString(); }
From source file:com.stoxx.portlet.accountdetails.controller.AccountDetailsController.java
@RenderMapping public String showHomePage(final RenderRequest request, final RenderResponse response, final Model model) { try {/* w w w .j a v a 2 s.co m*/ ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); User user = themeDisplay.getUser(); long stoxxnetGroupId = Long.parseLong(PropsUtil.get("site.stoxxnet.groupid")); log.info("themeDisplay.getUser()>>>>>>>>>>>>>" + themeDisplay.getUser()); accountDetails = accountDetailsDelegate.getSalesForceDetails(user.getEmailAddress()); if (null != accountDetails) { accountDetails.setKeyAccHolderName(user.getFullName()); accountDetails.setContactEmail(user.getEmailAddress()); companyName = accountDetails.getCompanyName(); if (StringUtils.isNotBlank(accountDetails.getPackageName())) { List<PackageModel> packageModels = new ArrayList<PackageModel>(); for (String pkgname : accountDetails.getPackageName().split(StringPool.COMMA)) { PackageModel packageModel = new PackageModel(); String articleId = StringPool.BLANK; JournalArticle journalArticle; log.info("pkgname>>>>>>>>>>>>>" + pkgname); log.info( "accountDetails.getSalesEntryId()>>>>>>>>>>>>>" + accountDetails.getSalesEntryId()); try { journalArticle = JournalArticleLocalServiceUtil.getArticleByUrlTitle( Long.valueOf(PropsUtil.get(SITE_STOXXNET_GROUPID)).longValue(), AccountDetailsUtil.getUrlTitle(pkgname)); String articleText = JournalContentUtil.getContent( Long.valueOf(PropsUtil.get("site.stoxxnet.groupid")), journalArticle.getArticleId(), "VIEW", journalArticle.getUrlTitle(), themeDisplay); articleId = journalArticle.getArticleId(); packageModel.setArticleId(articleId); packageModel.setPackageText(articleText); log.info("articleId>>>>>>>>>>>>>" + articleId); } catch (Exception e) { log.error("Exception is >>>>>>>>>>>>>" + e.getMessage()); } packageModel.setDescription(pkgname); packageModel.setArticleId(articleId); packageModel.setIsBluePackage( packageDetailsService.getPackageCategoryByPackageName(pkgname.trim())); packageModel.setStoxxnetGroupId(stoxxnetGroupId); packageModels.add(packageModel); } accountDetails.setPackageList(packageModels); } } if (Validator.isNotNull(accountDetails)) { accessDetails = accountDetailsDelegate.getLicensedUsers(accountDetails.getSalesEntryId(), user.getEmailAddress()); } if (null != accessDetails && null != accountDetails && accessDetails.size() > 0) { log.info("accountDetails.getSalesEntryId() in side setting accesdetails >>>>>>>>>>>>>" + accountDetails.getSalesEntryId()); if (StringUtils.isNotBlank(accountDetails.getTotalUsers())) { int totalUsers = Integer.valueOf(accountDetails.getTotalUsers()).intValue(); log.info("totalUsers" + totalUsers); int usedUsers = accessDetails.size(); log.info("usedUsers>>>>>>>>>>>>>" + usedUsers); if (usedUsers == totalUsers) { unUsedUsers = 0; log.info("unUsedUsers>>>>>>>>>>>>>" + unUsedUsers); accountDetails.setUnUsedUsers(unUsedUsers + StringPool.BLANK); } else { unUsedUsers = totalUsers - usedUsers; accountDetails.setUnUsedUsers(unUsedUsers + StringPool.BLANK); } } } if (null != accessDetails && null != accountDetails && accessDetails.size() > 0) { model.addAttribute("accountDetails", accountDetails); model.addAttribute("accessDetails", accessDetails); } } catch (STOXXException e) { log.error("STOXXException in AccountDetailsController" + e); } catch (SystemException e) { log.error(e.getMessage() + e); } catch (NumberFormatException e) { log.error(e.getMessage() + e); } return SHOWHOMEPAGE; }
From source file:com.stoxx.portlet.accountdetails.controller.AccountDetailsController.java
private boolean checkCaptcha(PortletRequest request) throws PortletException { String enteredCaptchaText = StringPool.COMMA; if (StringUtils.isNotBlank(request.getParameter("captchaEntered"))) { enteredCaptchaText = request.getParameter("captchaEntered"); }//from w w w. ja v a 2 s . co m if (StringUtils.isNotBlank(request.getParameter("captchaEntered2"))) { enteredCaptchaText = request.getParameter("captchaEntered2"); } boolean isValid = true; PortletSession sessionCaptcha = request.getPortletSession(); String captchaText = getCaptchaValueFromSession(sessionCaptcha); if (Validator.isNull(captchaText)) { log.info("Internal Error! Captcha text not found in session"); isValid = false; } if (!captchaText.equals(enteredCaptchaText)) { log.info("Invalid captcha text. Please reenter."); isValid = false; } return isValid; }
From source file:com.stoxx.portlet.clientlist.delegate.ClientListInfoDelegator.java
@SuppressWarnings("unchecked") public ClientModel getClientListInfo(long companyId, Locale locale, String alphabet, ClientModel clientModel, long userId) { List<SalesEntry> salesEntryList = null; try {// w w w . ja v a2 s . co m if (alphabet.equalsIgnoreCase(ALL)) { salesEntryList = SalesEntryLocalServiceUtil.getSalesEntries(0, SalesEntryLocalServiceUtil.getSalesEntriesCount()); } else { salesEntryList = SalesEntryLocalServiceUtil.getSalesListByStartingAlphabet(alphabet); } List<ClientListVO> clientListVOList = new ArrayList<ClientListVO>(); if (Validator.isNotNull(salesEntryList) && salesEntryList.size() > 0) { for (SalesEntry salesEntry : salesEntryList) { ClientListVO clientListVO = new ClientListVO(); List<EmployeeVO> employeeList = new ArrayList<EmployeeVO>(); long salesEntryId = salesEntry.getSalesEntryId(); if (0 != salesEntryId) { String companyName = salesEntry.getCompanyName(); if (StringUtils.isNotBlank(companyName)) { companyName = companyName.trim(); clientListVO.setCompanyName(companyName); } Date endDate = salesEntry.getEndDate(); if (Validator.isNotNull(endDate)) { String salesEntryEndDate = STOXXDateUtil .convertDateToStringInStoxxApplicationDateFormat(salesEntry.getEndDate()); clientListVO.setEndDate(salesEntryEndDate); } else { clientListVO.setEndDate(NA); } clientListVO.setAllowedUsers(salesEntry.getUsersAllowed()); clientListVO.setPackagesSubscribed(salesEntry.getPackageNames()); List<UserProfileDetails> licensedUserDetails = userProfileService .getLicensedUsers(salesEntryId); if (Validator.isNotNull(licensedUserDetails) && licensedUserDetails.size() > 0) { int usedLicenses = licensedUserDetails.size(); clientListVO.setUsedLicenses(usedLicenses); } List<EmailDomain> emailDomainList = EmailDomainLocalServiceUtil .getEmailDomains(salesEntryId); String commaSeperatedEmailDomain = new String(); for (EmailDomain emailDomain : emailDomainList) { String domainName = emailDomain.getDomain(); commaSeperatedEmailDomain += domainName + StringPool.COMMA; } if (commaSeperatedEmailDomain.endsWith(StringPool.COMMA)) { commaSeperatedEmailDomain = commaSeperatedEmailDomain.substring(0, commaSeperatedEmailDomain.length() - 1); } if (StringUtils.isNotBlank(commaSeperatedEmailDomain)) { clientListVO.setDomainName(commaSeperatedEmailDomain); } else { clientListVO.setDomainName(LanguageUtil.get(locale, "stoxx-client-no-domain-present")); } List<String> emailAddressList = userProfileService .getLicensedUsersEmailAddress(salesEntryId); if (Validator.isNotNull(emailAddressList) && emailAddressList.size() > 0) { for (String emailAddress : emailAddressList) { if (StringUtils.isNotBlank(emailAddress)) { EmployeeVO employeeVO = new EmployeeVO(); User user = UserLocalServiceUtil.fetchUserByEmailAddress(companyId, emailAddress.toLowerCase()); UserProfileDetails userProfileDetails = userProfileService .getUserProfileData(emailAddress.toLowerCase()); if (Validator.isNotNull(userProfileDetails)) { Integer stoxxUserStatus = userProfileDetails.getStatus(); String statusFlag = null; if (Validator.isNotNull(user)) { String fullName = user.getFirstName() + StringPool.SPACE + user.getLastName(); employeeVO.setFullName(fullName); employeeVO.setEmailAddress(emailAddress); //PermissionChecker permissionChecker = setAnonymousUserPermission(UserLocalServiceUtil.getDefaultUserId(companyId)); List<Address> addressList = AddressServiceUtil .getAddresses(Contact.class.getName(), user.getContactId()); for (Address address : addressList) { if (address.getType().getName() .equals(STOXXConstants.ADDRESS_TYPE_BUSINESS)) { String street = address.getStreet1(); if (StringUtils.isNotBlank(address.getStreet2())) { street = street.concat( StringPool.COMMA + address.getStreet2().trim()); } long countryId = address.getCountryId(); String countryName = null; Country country = CountryServiceUtil.getCountry(countryId); if (Validator.isNotNull(country)) { countryName = country.getName(locale); } employeeVO.setCountry(countryName); employeeVO.setAddress(street); } } int liferayUserstatus = user.getStatus(); if (Validator.isNull(stoxxUserStatus)) { statusFlag = STOXXConstants.INTIATAED; } else { if (liferayUserstatus == 0 && stoxxUserStatus == 1) { statusFlag = STOXXConstants.ACTIVE; } else if (stoxxUserStatus == 3) { statusFlag = STOXXConstants.NOTREGISTERED; } else { statusFlag = STOXXConstants.SUSPENDED; } } employeeVO.setStatus(statusFlag); List<Phone> phoneList = PhoneServiceUtil .getPhones(Contact.class.getName(), user.getContactId()); if (Validator.isNotNull(phoneList) && phoneList.size() > 0) { for (Phone phone : phoneList) { if (phone.getType().getName() .equalsIgnoreCase(STOXXConstants.PHONE_TYPE_BUSINESS)) employeeVO.setPhoneNumber(phone.getNumber()); } } employeeList.add(employeeVO); } else { employeeVO.setFullName(NA); employeeVO.setEmailAddress(emailAddress); String location = userProfileDetails.getLocation(); if (StringUtils.isNotBlank(location)) { employeeVO.setEmailAddress(location); } employeeVO.setPhoneNumber(NA); if (Validator.isNull(stoxxUserStatus)) { statusFlag = STOXXConstants.INTIATAED; } else if (stoxxUserStatus.intValue() == 1 || stoxxUserStatus.intValue() == 0) { // if a user starts 1st step of registration process its staus=1, but its not updated in user_ table, so its status is Initiated. statusFlag = STOXXConstants.INTIATAED; // if user is created from sales entry page or account detail page by KAH, then status=null, so its Initiated. } else { statusFlag = "No Status Found"; } employeeVO.setStatus(statusFlag); employeeVO.setAddress(NA); employeeList.add(employeeVO); } } } } } } clientListVO.setEmployeeList(employeeList); clientListVOList.add(clientListVO); } } Collections.sort(clientListVOList); clientModel.setClientList(clientListVOList); } catch (Exception e) { log.error("Exception in getClientListInfo of ClientListInfoDelegator", e); } return clientModel; }