if (language.getSiteProfileClass().getSiteProfileClassId().equals(siteProfileClass.getSiteProfileClassId())) {
itemLanguage = language;
break;
}
}
ItemDescSearch itemDescSearch = new ItemDescSearch();
if (itemLanguage == null || itemLanguage.getItemShortDesc() == null) {
itemDescSearch.setItemShortDesc(itemLanguageDefault.getItemShortDesc());
}
else {
itemDescSearch.setItemShortDesc(itemLanguage.getItemShortDesc());
}
itemDescSearch.setRecUpdateBy(adminBean.getUser().getUserId());
itemDescSearch.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
itemDescSearch.setRecCreateBy(adminBean.getUser().getUserId());
itemDescSearch.setRecCreateDatetime(new Date(System.currentTimeMillis()));
itemDescSearch.setSiteProfileClass(siteProfileClass);
itemDescSearch.setItem(item);
em.persist(itemDescSearch);
item.getItemDescSearches().add(itemDescSearch);
}
}