1 package fr.ifremer.dali.dao.referential.pmfm; 2 3 /* 4 * #%L 5 * Dali :: Core 6 * $Id:$ 7 * $HeadURL:$ 8 * %% 9 * Copyright (C) 2014 - 2015 Ifremer 10 * %% 11 * This program is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Affero General Public License as published by 13 * the Free Software Foundation, either version 3 of the License, or 14 * (at your option) any later version. 15 * 16 * This program is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU Affero General Public License 22 * along with this program. If not, see <http://www.gnu.org/licenses/>. 23 * #L% 24 */ 25 26 27 import fr.ifremer.dali.dto.referential.pmfm.MethodDTO; 28 import org.springframework.cache.annotation.Cacheable; 29 30 import java.util.List; 31 32 /** 33 * Created by Ludovic on 29/07/2015. 34 */ 35 public interface DaliMethodDao { 36 37 /** Constant <code>ALL_METHODS_CACHE="allMethods"</code> */ 38 String ALL_METHODS_CACHE = "all_methods"; 39 /** Constant <code>METHOD_BY_ID_CACHE="methodById"</code> */ 40 String METHOD_BY_ID_CACHE = "method_by_id"; 41 42 /** 43 * <p>getAllMethods.</p> 44 * 45 * @param statusCodes a {@link java.util.List} object. 46 * @return a {@link java.util.List} object. 47 */ 48 @Cacheable(value = ALL_METHODS_CACHE) 49 List<MethodDTO> getAllMethods(List<String> statusCodes); 50 51 /** 52 * <p>getMethodById.</p> 53 * 54 * @param methodId a int. 55 * @return a {@link fr.ifremer.dali.dto.referential.pmfm.MethodDTO} object. 56 */ 57 @Cacheable(value = METHOD_BY_ID_CACHE) 58 MethodDTO getMethodById(int methodId); 59 60 /** 61 * <p>findMethods.</p> 62 * 63 * @param methodId a {@link java.lang.Integer} object. 64 * @param statusCodes a {@link java.util.List} object. 65 * @return a {@link java.util.List} object. 66 */ 67 List<MethodDTO> findMethods(Integer methodId, List<String> statusCodes); 68 69 }