1 package org.itracker.persistence.dao; 2 3 import org.itracker.model.Language; 4 5 import java.util.List; 6 7 public interface LanguageDAO extends BaseDAO<Language> { 8 9 Language findById(Integer id); 10 11 /** 12 * Finds all language items with the given key and locale. 13 * 14 * @param key resource key 15 * @return language items for the given locale 16 */ 17 Language findByKeyAndLocale(String key, String locale); 18 19 /** 20 * Finds all language items with a particular key. 21 * 22 * @param key resource key 23 * @return language items with the given key for all available locales 24 */ 25 List<Language> findByKey(String key); 26 27 /** 28 * Finds all language items with a given locale. 29 * 30 * @return language items for the given locale 31 */ 32 List<Language> findByLocale(String locale); 33 34 }