コード例 #1
0
 @Override
 @Transactional(readOnly = true)
 public Language getLanguageByCode(Store store, String languageCode) {
   Language language = languageDataAccess.getLanguageByCode(store.getId(), languageCode);
   if (language == null) {
     Language lang = getNewLanguage();
     lang.setCode(languageCode);
     lang.getStores().add(store);
     save(lang);
     return lang;
   }
   return language;
 }
コード例 #2
0
 @Override
 public Language getDefaultLanguage(Store store) {
   ServiceUtil.validateStore(store);
   Language language = languageDataAccess.getDefaultLanguage(store.getId());
   return language;
 }
コード例 #3
0
 @Override
 public List<Language> getLanguagesByCodes(Store store, List<String> languageCodes) {
   ServiceUtil.validateStore(store);
   return languageDataAccess.getLanguagesByCodes(store.getId(), languageCodes);
 }
コード例 #4
0
 @Override
 @Transactional(readOnly = true)
 public List<Language> getAvailableLanguages(Store store) {
   ServiceUtil.validateStore(store);
   return languageDataAccess.getAvailableLanguages(store.getId());
 }