if (language.getSiteProfileClass().getSiteProfileClassId().equals(siteProfileClass.getSiteProfileClassId())) {
contentLanguage = language;
break;
}
}
ContentDescSearch contentDescSearch = new ContentDescSearch();
if (contentLanguage == null || contentLanguage.getContentTitle() == null) {
contentDescSearch.setContentTitle(contentLanguageDefault.getContentTitle());
}
else {
contentDescSearch.setContentTitle(contentLanguage.getContentTitle());
}
contentDescSearch.setRecUpdateBy(adminBean.getUser().getUserId());
contentDescSearch.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
contentDescSearch.setRecCreateBy(adminBean.getUser().getUserId());
contentDescSearch.setRecCreateDatetime(new Date(System.currentTimeMillis()));
contentDescSearch.setSiteProfileClass(siteProfileClass);
contentDescSearch.setContent(content);
em.persist(contentDescSearch);
content.getContentDescSearches().add(contentDescSearch);
}
}