View Javadoc
1   package fr.ifremer.dali.dao.system.extraction;
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.pmfm.PmfmDTO;
27  import fr.ifremer.dali.dto.referential.pmfm.QualitativeValueDTO;
28  import fr.ifremer.quadrige3.core.dao.technical.csv.CSVDao;
29  import org.springframework.jdbc.core.RowMapper;
30  
31  import java.util.List;
32  import java.util.Map;
33  
34  /**
35   * Dao for extraction with JDBC access on spring data source
36   * <p/>
37   * Created by Ludovic on 11/12/2015.
38   */
39  public interface DaliExtractionResultDao extends CSVDao {
40  
41      /**
42       * <p>queryCount.</p>
43       *
44       * @param query a {@link String} object.
45       * @return a {@link java.lang.Long} object.
46       */
47      long queryCount(String query);
48  
49      /**
50       * <p>queryCount with jdbc bindings</p>
51       *
52       * @param query         a {@link String} object.
53       * @param queryBindings a {@link Map} object.
54       * @return a {@link java.lang.Long} object.
55       */
56      long queryCount(String query, Map<String, Object> queryBindings);
57  
58      /**
59       * <p>query.</p>
60       *
61       * @param sql           a {@link java.lang.String} object.
62       * @param queryBindings a {@link java.util.Map} object.
63       * @param rowMapper     a {@link org.springframework.jdbc.core.RowMapper} object.
64       * @param <T>           a T object.
65       * @return a {@link java.util.List} object.
66       */
67      <T> List<T> query(String sql, Map<String, Object> queryBindings, RowMapper<T> rowMapper);
68  
69      /**
70       * <p>queryUpdate</p>
71       *
72       * @param query a {@link java.lang.String} object.
73       * @return a int.
74       */
75      int queryUpdate(String query);
76  
77      /**
78       * <p>queryUpdate with jdbc bindings</p>
79       *
80       * @param query         a {@link java.lang.String} object.
81       * @param queryBindings a {@link java.util.Map} object.
82       * @return a int.
83       */
84      int queryUpdate(String query, Map<String, Object> queryBindings);
85  
86      String getPmfmNameForExtraction(PmfmDTO pmfm);
87  
88      String getPmfmUnitNameForExtraction(PmfmDTO pmfm);
89  
90      String getQualitativeValueNameForExtraction(QualitativeValueDTO qualitativeValue);
91  
92  }