/*
 * Copyright
 *   2009 axYus - www.axyus.com
 *   2009 C.Marchand - christophe.marchand@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 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 General Public License for more details.
 *
 * You should have received a copy of the GNU 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.web.imports;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author chm
 */
public class ImportFile {
    public static final String SELECT = "SELECT IMPORT_ID,SUB_FILE_NAME,FILE_TYPE,STATUS,COLLECTIVITE,BUDGET,COLLECTIVITE_LIB,BUDGET_LIB,ERROR_MESSAGE FROM XEM_IMPORTS_FILES";
    private String importId;
    private String fileName;
    private String fileType;
    private int status;
    private String collectiviteId;
    private String collectiviteLib;
    private String budgetId;
    private String budgetLib;
    private String errorMessage;

    public ImportFile() {
        super();
    }
    public ImportFile(ResultSet rs) throws SQLException {
        int i=1;
        importId = rs.getString(i++);
        fileName=rs.getString(i++);
        fileType=rs.getString(i++);
        status=rs.getInt(i++);
        collectiviteId=rs.getString(i++);
        budgetId=rs.getString(i++);
        collectiviteLib=rs.getString(i++);
        budgetLib=rs.getString(i++);
        errorMessage=rs.getString(i++);
    }

    public String getBudgetId() {
        return budgetId;
    }

    public void setBudgetId(String budgetId) {
        this.budgetId = budgetId;
    }

    public String getBudgetLib() {
        return budgetLib;
    }

    public void setBudgetLib(String budgetLib) {
        this.budgetLib = budgetLib;
    }

    public String getCollectiviteId() {
        return collectiviteId;
    }

    public void setCollectiviteId(String collectiviteId) {
        this.collectiviteId = collectiviteId;
    }

    public String getCollectiviteLib() {
        return collectiviteLib;
    }

    public void setCollectiviteLib(String collectiviteLib) {
        this.collectiviteLib = collectiviteLib;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public String getImportId() {
        return importId;
    }

    public void setImportId(String importId) {
        this.importId = importId;
    }
    
}
