1 package net.sumaris.core.extraction.service;
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.technical.SortDirection;
26 import net.sumaris.core.extraction.vo.*;
27 import net.sumaris.core.extraction.vo.filter.AggregationTypeFilterVO;
28 import net.sumaris.core.vo.technical.extraction.ProductFetchOptions;
29 import net.sumaris.core.vo.technical.extraction.ExtractionProductColumnVO;
30 import org.springframework.transaction.annotation.Transactional;
31
32 import javax.annotation.Nullable;
33 import java.util.List;
34
35
36
37
38
39
40 @Transactional
41 public interface AggregationService {
42
43 @Transactional(readOnly = true)
44 List<AggregationTypeVO> findByFilter(@Nullable AggregationTypeFilterVO filter, ProductFetchOptions fetchOptions);
45
46 @Transactional(readOnly = true)
47 AggregationTypeVO get(int id, ProductFetchOptions fetchOptions);
48
49
50
51
52
53
54 @Transactional
55 AggregationContextVO execute(AggregationTypeVO type,
56 @Nullable ExtractionFilterVO filter);
57
58 @Transactional(readOnly = true)
59 AggregationResultVO read(AggregationTypeVO type,
60 @Nullable ExtractionFilterVO filter,
61 @Nullable AggregationStrataVO strata,
62 int offset, int size, String sort, SortDirection direction);
63
64 @Transactional(readOnly = true)
65 AggregationResultVO read(AggregationContextVO context,
66 @Nullable ExtractionFilterVO filter,
67 @Nullable AggregationStrataVO strata,
68 int offset, int size, String sort, SortDirection direction);
69
70 @Transactional(readOnly = true)
71 List<ExtractionProductColumnVO> getColumnsBySheetName(AggregationTypeVO type, String sheetName);
72
73 @Transactional
74 AggregationResultVO executeAndRead(AggregationTypeVO type,
75 @Nullable ExtractionFilterVO filter,
76 @Nullable AggregationStrataVO strata,
77 int offset, int size,
78 @Nullable String sort,
79 @Nullable SortDirection direction);
80
81 @Transactional
82 AggregationTypeVO../../../net/sumaris/core/extraction/vo/AggregationTypeVO.html#AggregationTypeVO">AggregationTypeVO save(AggregationTypeVO type, @Nullable ExtractionFilterVO filter);
83
84 @Transactional
85 void delete(int id);
86 }