View Javadoc
1   package fr.ifremer.dali.dao.referential.taxon;
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.TaxonGroupDTO;
27  import org.springframework.cache.annotation.Cacheable;
28  
29  import java.util.List;
30  
31  /**
32   * <p>DaliTaxonGroupDao interface.</p>
33   *
34   */
35  public interface DaliTaxonGroupDao {
36  
37      String ALL_TAXON_GROUPS_CACHE = "all_taxon_groups";
38      String TAXON_GROUP_BY_ID_CACHE = "taxon_group_by_id";
39      String TAXON_GROUPS_BY_IDS_CACHE = "taxon_groups_by_ids";
40  
41      /**
42       * <p>getAllTaxonGroups.</p>
43       *
44       * @return a {@link java.util.List} object.
45       */
46      @Cacheable(value = ALL_TAXON_GROUPS_CACHE)
47      List<TaxonGroupDTO> getAllTaxonGroups();
48  
49      /**
50       * <p>getTaxonGroupById.</p>
51       *
52       * @param taxonGroupId a int.
53       * @return a {@link fr.ifremer.dali.dto.referential.TaxonGroupDTO} object.
54       */
55      @Cacheable(value = TAXON_GROUP_BY_ID_CACHE)
56      TaxonGroupDTO getTaxonGroupById(int taxonGroupId);
57  
58      /**
59       * <p>getTaxonGroupsByIds.</p>
60       *
61       * @param taxonGroupIds a {@link java.util.List} object.
62       * @return a {@link java.util.List} object.
63       */
64      @Cacheable(value = TAXON_GROUPS_BY_IDS_CACHE)
65      List<TaxonGroupDTO> getTaxonGroupsByIds(List<Integer> taxonGroupIds);
66  
67      /**
68       * <p>findTaxonGroups.</p>
69       *
70       * @param parentTaxonGroupId a {@link java.lang.Integer} object.
71       * @param label a {@link java.lang.String} object.
72       * @param name a {@link java.lang.String} object.
73       * @param isStrictName a boolean.
74       * @param statusCodes a {@link java.util.List} object.
75       * @return a {@link java.util.List} object.
76       */
77      List<TaxonGroupDTO> findTaxonGroups(Integer parentTaxonGroupId, String label, String name, boolean isStrictName, List<String> statusCodes);
78  
79  }