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.quadrige3.core.dao.referential.pmfm.QualitativeValueDao; 28 import fr.ifremer.dali.dto.referential.pmfm.QualitativeValueDTO; 29 import org.springframework.cache.annotation.Cacheable; 30 31 import java.util.List; 32 33 /** 34 * Created by Ludovic on 22/09/2015. 35 */ 36 public interface DaliQualitativeValueDao extends QualitativeValueDao { 37 38 /** Constant <code>QUALITATIVE_VALUE_BY_ID_CACHE="qualitativeValueById"</code> */ 39 String QUALITATIVE_VALUE_BY_ID_CACHE = "qualitative_value_by_id"; 40 /** Constant <code>QUALITATIVE_VALUES_BY_PARAMETER_CODE_CACHE="qualitativeValuesByParameterCode"</code> */ 41 String QUALITATIVE_VALUES_BY_PARAMETER_CODE_CACHE = "qualitative_values_by_parameter_code"; 42 43 /** 44 * <p>getQualitativeValueById.</p> 45 * 46 * @param qualitativeValueId a int. 47 * @return a {@link fr.ifremer.dali.dto.referential.pmfm.QualitativeValueDTO} object. 48 */ 49 @Cacheable(value = QUALITATIVE_VALUE_BY_ID_CACHE) 50 QualitativeValueDTO getQualitativeValueById(int qualitativeValueId); 51 52 /** 53 * <p>getQualitativeValuesByPmfmId.</p> 54 * 55 * @param pmfmId a {@link java.lang.Integer} object. 56 * @return a {@link java.util.List} object. 57 */ 58 List<QualitativeValueDTO> getQualitativeValuesByPmfmId(Integer pmfmId); 59 60 /** 61 * <p>getQualitativeValuesByParameterCode.</p> 62 * 63 * @param parameterCode a {@link java.lang.String} object. 64 * @return a {@link java.util.List} object. 65 */ 66 @Cacheable(value = QUALITATIVE_VALUES_BY_PARAMETER_CODE_CACHE) 67 List<QualitativeValueDTO> getQualitativeValuesByParameterCode(String parameterCode); 68 69 }