1 package net.sumaris.core.dao.referential.taxon;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 import net.sumaris.core.dao.cache.CacheNames;
26 import net.sumaris.core.dao.technical.SortDirection;
27 import net.sumaris.core.model.referential.taxon.TaxonName;
28 import net.sumaris.core.vo.filter.TaxonNameFilterVO;
29 import net.sumaris.core.vo.referential.TaxonNameVO;
30 import org.springframework.cache.annotation.Cacheable;
31
32 import java.util.Collection;
33 import java.util.List;
34 import java.util.stream.Stream;
35
36 public interface TaxonNameDao {
37
38 List<TaxonNameVO> findByFilter(TaxonNameFilterVO filter, int offset, int size, String sortAttribute, SortDirection sortDirection);
39
40 List<TaxonNameVO> getAll(boolean withSynonyms);
41
42 @Cacheable(cacheNames = CacheNames.TAXON_NAME_BY_TAXON_REFERENCE_ID, unless = "#result == null")
43 TaxonNameVO getTaxonNameReferent(Integer referenceTaxonId);
44
45 List<TaxonName> getAllTaxonNameByParentIds(Collection<Integer> taxonNameParentIds);
46
47 @Cacheable(cacheNames = CacheNames.TAXON_NAMES_BY_TAXON_GROUP_ID, unless = "#result == null")
48 List<TaxonNameVO> getAllByTaxonGroupId(Integer taxonGroupId);
49
50
51 }