1 package fr.ifremer.quadrige3.core.dao.technical.csv;
2
3 /*-
4 * #%L
5 * Quadrige3 Core :: Client API
6 * %%
7 * Copyright (C) 2017 - 2018 Ifremer
8 * %%
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU Affero General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU Affero General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * #L%
22 */
23
24 import java.io.File;
25 import java.io.IOException;
26 import java.util.List;
27 import java.util.Map;
28
29 /**
30 * @author peck7 on 28/11/2017.
31 */
32 public interface CSVDao {
33
34 /**
35 * Constant <code>UTF8_BOM=0xFEFF</code>
36 */
37 int UTF8_BOM = 0xFEFF;
38
39 /**
40 * <p>dumpQueryToCSV.</p>
41 *
42 * @param file the output file
43 * @param query the query string
44 * @param fieldNamesByAlias map the output column name by aliased field name
45 * @param dateFormats map the output format for dates by aliased field name
46 * @param decimalFormats map the output format for decimals by aliased field name
47 * @param ignoredFields list of fields to ignore
48 */
49 void dumpQueryToCSV(File file,
50 String query,
51 Map<String, String> fieldNamesByAlias,
52 Map<String, String> dateFormats,
53 Map<String, String> decimalFormats,
54 List<String> ignoredFields) throws IOException;
55
56 }