--- /dev/null
+/*******************************************************************************
+ * Copyright
+ * 2013 axYus - www.axyus.com
+ * 2013 P.Renier - paul.renier@axyus.com
+ *
+ * This file is part of XEMELIOS.
+ *
+ * XEMELIOS is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * XEMELIOS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with XEMELIOS; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *******************************************************************************/
+package fr.gouv.finances.dgfip.xemelios.importers;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+/**
+ * @author paul.renier
+ *
+ */
+public class ImportJob {
+ public static enum Status {
+ ASKED(0), CANCELED(-1), RUNNING(1), ERROR(2), TERMINATED(3);
+
+ private int value;
+
+ private Status(final int value) {
+ this.value = value;
+ }
+
+ public int getValue() {
+ return this.value;
+ }
+
+ public static Status getFromValue(final int value) {
+ for (final Status s : values()) {
+ if (s.getValue() == value) {
+ return s;
+ }
+ }
+
+ return null;
+ }
+
+ }
+
+ private long importId;
+ private String archiveName;
+ private String exercice;
+ private String userLogin;
+ private String importScheme;
+
+ public ImportJob(final ResultSet rs) throws SQLException {
+ this.importId = rs.getLong("IMPORT_ID");
+ this.archiveName = rs.getString("ARCHIVE_NAME");
+ this.exercice = rs.getString("EXERCICE");
+ this.userLogin = rs.getString("USER_LOGIN");
+ this.importScheme = rs.getString("IMPORT_SCHEME");
+ }
+
+ public long getImportId() {
+ return this.importId;
+ }
+
+ public String getArchiveName() {
+ return this.archiveName;
+ }
+
+ public String getExercice() {
+ return this.exercice;
+ }
+
+ public String getUserLogin() {
+ return this.userLogin;
+ }
+
+ public String getImportScheme() {
+ return this.importScheme;
+ }
+
+}