1 package fr.ifremer.dali.dao.referential; 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 import fr.ifremer.dali.dto.referential.SamplingEquipmentDTO; 27 import org.springframework.cache.annotation.Cacheable; 28 29 import java.util.List; 30 31 /** 32 * Created by Ludovic on 17/07/2015. 33 */ 34 public interface DaliSamplingEquipmentDao { 35 36 /** Constant <code>SAMPLING_EQUIPMENT_BY_ID_CACHE="samplingEquipmentById"</code> */ 37 String SAMPLING_EQUIPMENT_BY_ID_CACHE = "sampling_equipment_by_id"; 38 /** Constant <code>ALL_SAMPLING_EQUIPMENTS_CACHE="allSamplingEquipments"</code> */ 39 String ALL_SAMPLING_EQUIPMENTS_CACHE = "all_sampling_equipments"; 40 /** Constant <code>SAMPLING_EQUIPMENTS_BY_IDS_CACHE="samplingEquipmentsByIds"</code> */ 41 String SAMPLING_EQUIPMENTS_BY_IDS_CACHE = "sampling_equipments_by_ids"; 42 43 /** 44 * <p>getAllSamplingEquipments.</p> 45 * 46 * @param statusCodes a {@link java.util.List} object. 47 * @return a {@link java.util.List} object. 48 */ 49 @Cacheable(value = ALL_SAMPLING_EQUIPMENTS_CACHE) 50 List<SamplingEquipmentDTO> getAllSamplingEquipments(List<String> statusCodes); 51 52 /** 53 * <p>getSamplingEquipmentById.</p> 54 * 55 * @param samplingEquipmentId a int. 56 * @return a {@link fr.ifremer.dali.dto.referential.SamplingEquipmentDTO} object. 57 */ 58 @Cacheable(value = SAMPLING_EQUIPMENT_BY_ID_CACHE) 59 SamplingEquipmentDTO getSamplingEquipmentById(int samplingEquipmentId); 60 61 /** 62 * <p>getSamplingEquipmentsByIds.</p> 63 * 64 * @param samplingEquipmentIds a {@link java.util.List} object. 65 * @return a {@link java.util.List} object. 66 */ 67 @Cacheable(value = SAMPLING_EQUIPMENTS_BY_IDS_CACHE) 68 List<SamplingEquipmentDTO> getSamplingEquipmentsByIds(List<Integer> samplingEquipmentIds); 69 70 /** 71 * <p>findSamplingEquipments.</p> 72 * 73 * @param statusCodes a {@link java.util.List} object. 74 * @param samplingEquipmentId a {@link java.lang.Integer} object. 75 * @param unitId a {@link java.lang.Integer} object. 76 * @return a {@link java.util.List} object. 77 */ 78 List<SamplingEquipmentDTO> findSamplingEquipments(List<String> statusCodes, Integer samplingEquipmentId, Integer unitId); 79 80 /** 81 * <p>findSamplingEquipmentsByName.</p> 82 * 83 * @param statusCodes a {@link java.util.List} object. 84 * @param samplingEquipmentName a {@link java.lang.String} object. 85 * @return a {@link java.util.List} object. 86 */ 87 List<SamplingEquipmentDTO> findSamplingEquipmentsByName(List<String> statusCodes, String samplingEquipmentName); 88 89 }