@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; }
@Override public Language getDefaultLanguage(Store store) { ServiceUtil.validateStore(store); Language language = languageDataAccess.getDefaultLanguage(store.getId()); return language; }
@Override public List<Language> getLanguagesByCodes(Store store, List<String> languageCodes) { ServiceUtil.validateStore(store); return languageDataAccess.getLanguagesByCodes(store.getId(), languageCodes); }
@Override @Transactional(readOnly = true) public List<Language> getAvailableLanguages(Store store) { ServiceUtil.validateStore(store); return languageDataAccess.getAvailableLanguages(store.getId()); }