1 package net.sumaris.core.extraction.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 General Public License as 11 * published by the Free Software Foundation, either version 3 of the 12 * License, or (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 General Public 20 * License along with this program. If not, see 21 * <http://www.gnu.org/licenses/gpl-3.0.html>. 22 * #L% 23 */ 24 25 import javax.annotation.Nullable; 26 import java.io.File; 27 import java.io.IOException; 28 import java.util.Map; 29 import java.util.Set; 30 31 /** 32 * @author Ludovic Pecquot <ludovic.pecquot> 33 * @author Benoit Lavenier <benoit.lavenier@e-is.pro> 34 */ 35 public interface ExtractionCsvDao { 36 37 /** 38 * Constant <code>UTF8_BOM=0xFEFF</code> 39 */ 40 int UTF8_BOM = 0xFEFF; 41 42 /** 43 * <p>dumpQueryToCSV.</p> 44 * 45 * @param file the output file 46 * @param query the query string 47 * @param aliasByColumnMap output column alias, by column name 48 * @param dateFormats output format, by column name 49 * @param decimalFormats output decimal format, by column name 50 * @param excludeColumnNames set of columns to exclude 51 */ 52 void dumpQueryToCSV(File file, 53 String query, 54 @Nullable Map<String, String> aliasByColumnMap, 55 @Nullable Map<String, String> dateFormats, 56 @Nullable Map<String, String> decimalFormats, 57 @Nullable Set<String> excludeColumnNames) throws IOException; 58 59 }