// ============================================================================
//
// Copyright (c) 2005-2009, Talend Inc.
//
// This source code has been automatically generated by Talend Open Studio
// / JobDesigner (CodeGenerator version 3.2.3.r35442).
// You can find more information about Talend products at www.talend.com.
// You may distribute this code under the terms of the GNU LGPL license
// (http://www.gnu.org/licenses/lgpl.html).
//
// ============================================================================ 
package care.calcul_coefficient_progression_new_2_0;

import routines.FTP;
import routines.calculDates;
import routines.DataOperation;
import routines.Mathematical;
import routines.Numeric;
import routines.Relational;
import routines.StringHandling;
import routines.TalendDataGenerator;
import routines.TalendDate;
import routines.TalendString;
import routines.system.*;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.math.BigDecimal;
import java.io.ByteArrayOutputStream;
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectInputStream;
import java.io.IOException;
import java.util.Comparator;

//the import part of tJavaRow_1
//import java.util.List;

//the import part of tJavaRow_6
//import java.util.List;

//the import part of tJavaRow_7
//import java.util.List;

//the import part of tJavaRow_9
//import java.util.List;

//the import part of tJavaRow_11
//import java.util.List;

/**
 * Job: Calcul_coefficient_progression_new Purpose: Commandes<br>
 * Description: Recalcul automatique des coeficients de progression de vente
 * (sur base des quantités vendues entre 2 périodes de 6 mois glissants) pour
 * l'algorythme de commande Intec <br>
 * 
 * @author vivien.thiry@johanns-cie.lu
 * @version 3.2.3.r35442
 * @status TEST
 */
public class Calcul_coefficient_progression_new {

	public final Object obj = new Object();
	// create and load default properties
	private java.util.Properties defaultProps = new java.util.Properties();

	// create application properties with default
	private class ContextProperties extends java.util.Properties {

		public ContextProperties(java.util.Properties properties) {
			super(properties);
		}

		public ContextProperties() {
			super();
		}

		public void synchronizeContext() {

			if (Station != null) {

				this.setProperty("Station", Station.toString());

			}

			if (ShoppiID != null) {

				this.setProperty("ShoppiID", ShoppiID.toString());

			}

			if (ShoppiNom != null) {

				this.setProperty("ShoppiNom", ShoppiNom.toString());

			}

			if (SQLServeur != null) {

				this.setProperty("SQLServeur", SQLServeur.toString());

			}

			if (SQLUser != null) {

				this.setProperty("SQLUser", SQLUser.toString());

			}

			if (SQLPsw != null) {

				this.setProperty("SQLPsw", SQLPsw.toString());

			}

			if (Format != null) {

				this.setProperty("Format", Format.toString());

			}

			if (Periode != null) {

				this.setProperty("Periode", Periode.toString());

			}

			if (Debut_n != null) {

				this.setProperty("Debut_n", Debut_n.toString());

			}

			if (Debut_n1 != null) {

				this.setProperty("Debut_n1", Debut_n1.toString());

			}

			if (Fin_n != null) {

				this.setProperty("Fin_n", Fin_n.toString());

			}

			if (Fin_n1 != null) {

				this.setProperty("Fin_n1", Fin_n1.toString());

			}

			if (Markup != null) {

				this.setProperty("Markup", Markup.toString());

			}

			if (BD_0 != null) {

				this.setProperty("BD_0", BD_0.toString());

			}

			if (RepIni != null) {

				this.setProperty("RepIni", RepIni.toString());

			}

			if (RepData != null) {

				this.setProperty("RepData", RepData.toString());

			}

			if (To != null) {

				String pattern_To = "yyyy-MM-dd HH:mm:ss";
				String value_To = "";
				String[] parts_To = value_To.split(";");
				if (parts_To.length > 1) {
					pattern_To = parts_To[0];
					this.setProperty("To", pattern_To + ";"
							+ FormatterUtils.format_Date(To, pattern_To));
				} else {
					this.setProperty("To", FormatterUtils.format_Date(To,
							pattern_To));
				}

			}

			if (FL_1 != null) {

				this.setProperty("FL_1", FL_1.toString());

			}

			if (coef_limit != null) {

				this.setProperty("coef_limit", coef_limit.toString());

			}

			if (current_Art != null) {

				this.setProperty("current_Art", current_Art.toString());

			}

			if (current_Art2 != null) {

				this.setProperty("current_Art2", current_Art2.toString());

			}

			if (BigBang != null) {

				String pattern_BigBang = "yyyy-MM-dd HH:mm:ss";
				String value_BigBang = "yyyy-MM-dd HH:mm:ss;2000-01-01 00:00:00";
				String[] parts_BigBang = value_BigBang.split(";");
				if (parts_BigBang.length > 1) {
					pattern_BigBang = parts_BigBang[0];
					this.setProperty("BigBang", pattern_BigBang
							+ ";"
							+ FormatterUtils.format_Date(BigBang,
									pattern_BigBang));
				} else {
					this.setProperty("BigBang", FormatterUtils.format_Date(
							BigBang, pattern_BigBang));
				}

			}

			if (BD_1 != null) {

				this.setProperty("BD_1", BD_1.toString());

			}

			if (Long_1 != null) {

				this.setProperty("Long_1", Long_1.toString());

			}

			if (min_life != null) {

				this.setProperty("min_life", min_life.toString());

			}

			if (BD_105 != null) {

				this.setProperty("BD_105", BD_105.toString());

			}

			if (Long_0 != null) {

				this.setProperty("Long_0", Long_0.toString());

			}

		}

		public String Station;
		public String ShoppiID;
		public String ShoppiNom;
		public String SQLServeur;
		public String SQLUser;
		public String SQLPsw;
		public String Format;
		public String Periode;
		public String Debut_n;
		public String Debut_n1;
		public String Fin_n;
		public String Fin_n1;
		public BigDecimal Markup;
		public BigDecimal BD_0;
		public String RepIni;
		public String RepData;
		public java.util.Date To;
		public Float FL_1;
		public BigDecimal coef_limit;
		public Long current_Art;
		public String current_Art2;
		public java.util.Date BigBang;
		public BigDecimal BD_1;
		public Long Long_1;
		public Long min_life;
		public BigDecimal BD_105;
		public Long Long_0;
	}

	private ContextProperties context = new ContextProperties();
	private final String jobVersion = "2.0";
	private final String jobName = "Calcul_coefficient_progression_new";
	private final String projectName = "CARE";
	public Integer errorCode = null;
	private String currentComponent = "";
	private final java.util.Map<String, Long> start_Hash = new java.util.HashMap<String, Long>();
	private final java.util.Map<String, Long> end_Hash = new java.util.HashMap<String, Long>();
	private final java.util.Map<String, Boolean> ok_Hash = new java.util.HashMap<String, Boolean>();
	private final java.util.Map<String, Object> globalMap = new java.util.HashMap<String, Object>();
	public final java.util.List<String[]> globalBuffer = new java.util.ArrayList<String[]>();

	LogCatcherUtils tLogCatcher_1 = new LogCatcherUtils();
	StatCatcherUtils tStatCatcher_1 = new StatCatcherUtils(
			"_GwcJUPE6EeO4ZLnhfg70Mg", "2.0");

	private final java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
	private final java.io.PrintStream errorMessagePS = new java.io.PrintStream(
			new java.io.BufferedOutputStream(baos));

	public String getExceptionStackTrace() {
		errorMessagePS.flush();
		return baos.toString();
	}

	private class TalendException extends Exception {
		private java.util.Map<String, Object> globalMap = null;
		private Exception e = null;
		private String currentComponent = null;

		private TalendException(Exception e, String errorComponent,
				final java.util.Map<String, Object> globalMap) {
			this.currentComponent = errorComponent;
			this.globalMap = globalMap;
			this.e = e;
		}

		@Override
		public void printStackTrace() {
			if (!(e instanceof TalendException || e instanceof TDieException)) {
				globalMap.put(currentComponent + "_ERROR_MESSAGE", e
						.getMessage());
				System.err
						.println("Exception in component " + currentComponent);
			}
			if (!(e instanceof TDieException)) {
				if (e instanceof TalendException) {
					e.printStackTrace();
				} else {
					e.printStackTrace();
					e.printStackTrace(errorMessagePS);
				}
			}
			if (!(e instanceof TalendException)) {
				try {
					for (java.lang.reflect.Method m : this.getClass()
							.getEnclosingClass().getMethods()) {
						if (m.getName().compareTo(currentComponent + "_error") == 0) {
							m.invoke(Calcul_coefficient_progression_new.this,
									new Object[] { e, currentComponent,
											globalMap });
							break;
						}
					}

					if (!(e instanceof TDieException)) {
						tLogCatcher_1.addMessage("Java Exception",
								currentComponent, 6, e.getClass().getName()
										+ ":" + e.getMessage(), 1);
						tLogCatcher_1Process(globalMap);
					}
				} catch (java.lang.SecurityException e) {
					this.e.printStackTrace();
				} catch (java.lang.IllegalArgumentException e) {
					this.e.printStackTrace();
				} catch (java.lang.IllegalAccessException e) {
					this.e.printStackTrace();
				} catch (java.lang.reflect.InvocationTargetException e) {
					this.e.printStackTrace();
				} catch (TalendException e) {
					// do nothing
				}

			}
		}
	}

	public void tMSSqlInput_1_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tMSSqlInput_1", System.currentTimeMillis());
		tMSSqlInput_1_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFilterRow_1_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tFilterRow_1", System.currentTimeMillis());
		tMSSqlInput_1_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tJavaRow_1_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tJavaRow_1", System.currentTimeMillis());
		tMSSqlInput_1_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFlowToIterate_1_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tFlowToIterate_1", System.currentTimeMillis());
		tMSSqlInput_1_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tMSSqlConnection_1_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tMSSqlConnection_1", System.currentTimeMillis());
		tMSSqlInput_1_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tMSSqlInput_4_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tMSSqlInput_4", System.currentTimeMillis());
		tMSSqlInput_4_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileOutputDelimited_9_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tFileOutputDelimited_9", System.currentTimeMillis());
		tMSSqlInput_4_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tMSSqlInput_6_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tMSSqlInput_6", System.currentTimeMillis());
		tMSSqlInput_6_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileOutputDelimited_6_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tFileOutputDelimited_6", System.currentTimeMillis());
		tMSSqlInput_6_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileInputDelimited_1_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tFileInputDelimited_1", System.currentTimeMillis());
		tFileInputDelimited_1_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tJavaRow_6_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tJavaRow_6", System.currentTimeMillis());
		tFileInputDelimited_1_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tFlowToIterate_2_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tFlowToIterate_2", System.currentTimeMillis());
		tFileInputDelimited_1_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tMSSqlInput_2_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tMSSqlInput_2", System.currentTimeMillis());
		tFileInputDelimited_1_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tJavaRow_7_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tJavaRow_7", System.currentTimeMillis());
		tFileInputDelimited_1_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tJavaRow_9_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tJavaRow_9", System.currentTimeMillis());
		tFileInputDelimited_1_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tJavaRow_11_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tJavaRow_11", System.currentTimeMillis());
		tFileInputDelimited_1_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tFileOutputDelimited_4_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tFileOutputDelimited_4", System.currentTimeMillis());
		tFileInputDelimited_1_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tFileInputDelimited_2_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tFileInputDelimited_2", System.currentTimeMillis());
		tFileInputDelimited_2_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tMap_6_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tMap_6", System.currentTimeMillis());
		tFileInputDelimited_2_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tReplicate_1_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tReplicate_1", System.currentTimeMillis());
		tFileInputDelimited_2_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tFileOutputDelimited_8_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tFileOutputDelimited_8", System.currentTimeMillis());
		tFileInputDelimited_2_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tMSSqlOutput_1_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tMSSqlOutput_1", System.currentTimeMillis());
		tFileInputDelimited_2_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tStatCatcher_1_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tStatCatcher_1", System.currentTimeMillis());
		tStatCatcher_1_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileOutputDelimited_2_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tFileOutputDelimited_2", System.currentTimeMillis());
		tStatCatcher_1_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tLogCatcher_1_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tLogCatcher_1", System.currentTimeMillis());
		tLogCatcher_1_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileOutputDelimited_3_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tFileOutputDelimited_3", System.currentTimeMillis());
		tLogCatcher_1_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tPostjob_1_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tPostjob_1", System.currentTimeMillis());
		tPostjob_1_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileDelete_1_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tFileDelete_1", System.currentTimeMillis());
		tFileDelete_1_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tFileDelete_2_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tFileDelete_2", System.currentTimeMillis());
		tFileDelete_2_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tSendMail_1_error(Exception exception, String errorComponent,
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tSendMail_1", System.currentTimeMillis());
		tSendMail_1_onSubJobError(exception, errorComponent, globalMap);
	}

	public void tSortRow_1_SortOut_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tSortRow_1_SortOut", System.currentTimeMillis());
		tFileInputDelimited_1_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tSortRow_1_SortIn_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tSortRow_1_SortIn", System.currentTimeMillis());
		tFileInputDelimited_1_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tAggregateRow_2_AGGOUT_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tAggregateRow_2_AGGOUT", System.currentTimeMillis());
		tFileInputDelimited_1_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tAggregateRow_2_AGGIN_error(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {
		end_Hash.put("tAggregateRow_2_AGGIN", System.currentTimeMillis());
		tFileInputDelimited_1_onSubJobError(exception, errorComponent,
				globalMap);
	}

	public void tMSSqlInput_1_onSubJobError(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {

		resumeUtil.addLog("SYSTEM_LOG", "NODE:" + errorComponent, "", Thread
				.currentThread().getId()
				+ "", "FATAL", "", exception.getMessage(), ResumeUtil
				.getExceptionStackTrace(exception));

	}

	public void tMSSqlInput_4_onSubJobError(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {

		resumeUtil.addLog("SYSTEM_LOG", "NODE:" + errorComponent, "", Thread
				.currentThread().getId()
				+ "", "FATAL", "", exception.getMessage(), ResumeUtil
				.getExceptionStackTrace(exception));

	}

	public void tMSSqlInput_6_onSubJobError(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {

		resumeUtil.addLog("SYSTEM_LOG", "NODE:" + errorComponent, "", Thread
				.currentThread().getId()
				+ "", "FATAL", "", exception.getMessage(), ResumeUtil
				.getExceptionStackTrace(exception));

	}

	public void tFileInputDelimited_1_onSubJobError(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {

		resumeUtil.addLog("SYSTEM_LOG", "NODE:" + errorComponent, "", Thread
				.currentThread().getId()
				+ "", "FATAL", "", exception.getMessage(), ResumeUtil
				.getExceptionStackTrace(exception));

	}

	public void tFileInputDelimited_2_onSubJobError(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {

		resumeUtil.addLog("SYSTEM_LOG", "NODE:" + errorComponent, "", Thread
				.currentThread().getId()
				+ "", "FATAL", "", exception.getMessage(), ResumeUtil
				.getExceptionStackTrace(exception));

	}

	public void tStatCatcher_1_onSubJobError(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {

		resumeUtil.addLog("SYSTEM_LOG", "NODE:" + errorComponent, "", Thread
				.currentThread().getId()
				+ "", "FATAL", "", exception.getMessage(), ResumeUtil
				.getExceptionStackTrace(exception));

	}

	public void tLogCatcher_1_onSubJobError(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {

		resumeUtil.addLog("SYSTEM_LOG", "NODE:" + errorComponent, "", Thread
				.currentThread().getId()
				+ "", "FATAL", "", exception.getMessage(), ResumeUtil
				.getExceptionStackTrace(exception));

	}

	public void tPostjob_1_onSubJobError(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {

		resumeUtil.addLog("SYSTEM_LOG", "NODE:" + errorComponent, "", Thread
				.currentThread().getId()
				+ "", "FATAL", "", exception.getMessage(), ResumeUtil
				.getExceptionStackTrace(exception));

	}

	public void tFileDelete_1_onSubJobError(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {

		resumeUtil.addLog("SYSTEM_LOG", "NODE:" + errorComponent, "", Thread
				.currentThread().getId()
				+ "", "FATAL", "", exception.getMessage(), ResumeUtil
				.getExceptionStackTrace(exception));

	}

	public void tFileDelete_2_onSubJobError(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {

		resumeUtil.addLog("SYSTEM_LOG", "NODE:" + errorComponent, "", Thread
				.currentThread().getId()
				+ "", "FATAL", "", exception.getMessage(), ResumeUtil
				.getExceptionStackTrace(exception));

	}

	public void tSendMail_1_onSubJobError(Exception exception,
			String errorComponent, final java.util.Map<String, Object> globalMap)
			throws TalendException {

		resumeUtil.addLog("SYSTEM_LOG", "NODE:" + errorComponent, "", Thread
				.currentThread().getId()
				+ "", "FATAL", "", exception.getMessage(), ResumeUtil
				.getExceptionStackTrace(exception));

	}

	public static class row13Struct implements
			routines.system.IPersistableRow<row13Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

				}

				finally {
				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

			}

			finally {
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row13Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class row12Struct implements
			routines.system.IPersistableRow<row12Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public String TFirm_Cod;

		public String getTFirm_Cod() {
			return this.TFirm_Cod;
		}

		public String Nom;

		public String getNom() {
			return this.Nom;
		}

		public String IPServeurSQL;

		public String getIPServeurSQL() {
			return this.IPServeurSQL;
		}

		public String CareYN;

		public String getCareYN() {
			return this.CareYN;
		}

		public String PetrolianaYN;

		public String getPetrolianaYN() {
			return this.PetrolianaYN;
		}

		public String JobVPN;

		public String getJobVPN() {
			return this.JobVPN;
		}

		public String ListeCarburant;

		public String getListeCarburant() {
			return this.ListeCarburant;
		}

		public String SQLUser;

		public String getSQLUser() {
			return this.SQLUser;
		}

		public String SQLPsw;

		public String getSQLPsw() {
			return this.SQLPsw;
		}

		public String FormatDate;

		public String getFormatDate() {
			return this.FormatDate;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readInt();
					if (length == -1) {
						this.TFirm_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TFirm_Cod = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.Nom = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.Nom = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.IPServeurSQL = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.IPServeurSQL = new String(commonByteArray, 0,
								length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.CareYN = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.CareYN = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.PetrolianaYN = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.PetrolianaYN = new String(commonByteArray, 0,
								length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.JobVPN = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.JobVPN = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.ListeCarburant = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.ListeCarburant = new String(commonByteArray, 0,
								length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.SQLUser = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.SQLUser = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.SQLPsw = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.SQLPsw = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.FormatDate = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.FormatDate = new String(commonByteArray, 0, length);
					}

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				if (this.TFirm_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TFirm_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.Nom == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.Nom.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.IPServeurSQL == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.IPServeurSQL.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.CareYN == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.CareYN.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.PetrolianaYN == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.PetrolianaYN.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.JobVPN == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.JobVPN.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.ListeCarburant == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.ListeCarburant.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.SQLUser == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.SQLUser.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.SQLPsw == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.SQLPsw.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.FormatDate == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.FormatDate.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TFirm_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TFirm_Cod));

			sb.append(", ");

			sb.append("Nom");
			sb.append("=");
			sb.append(String.valueOf(this.Nom));

			sb.append(", ");

			sb.append("IPServeurSQL");
			sb.append("=");
			sb.append(String.valueOf(this.IPServeurSQL));

			sb.append(", ");

			sb.append("CareYN");
			sb.append("=");
			sb.append(String.valueOf(this.CareYN));

			sb.append(", ");

			sb.append("PetrolianaYN");
			sb.append("=");
			sb.append(String.valueOf(this.PetrolianaYN));

			sb.append(", ");

			sb.append("JobVPN");
			sb.append("=");
			sb.append(String.valueOf(this.JobVPN));

			sb.append(", ");

			sb.append("ListeCarburant");
			sb.append("=");
			sb.append(String.valueOf(this.ListeCarburant));

			sb.append(", ");

			sb.append("SQLUser");
			sb.append("=");
			sb.append(String.valueOf(this.SQLUser));

			sb.append(", ");

			sb.append("SQLPsw");
			sb.append("=");
			sb.append(String.valueOf(this.SQLPsw));

			sb.append(", ");

			sb.append("FormatDate");
			sb.append("=");
			sb.append(String.valueOf(this.FormatDate));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row12Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class row11Struct implements
			routines.system.IPersistableRow<row11Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];
		private static final int DEFAULT_HASHCODE = 1;
		private static final int PRIME = 31;
		private int hashCode = DEFAULT_HASHCODE;
		public boolean hashCodeDirty = true;

		public String TFirm_Cod;

		public String getTFirm_Cod() {
			return this.TFirm_Cod;
		}

		public String Nom;

		public String getNom() {
			return this.Nom;
		}

		public String IPServeurSQL;

		public String getIPServeurSQL() {
			return this.IPServeurSQL;
		}

		public String FormatDate;

		public String getFormatDate() {
			return this.FormatDate;
		}

		public String SQLUser;

		public String getSQLUser() {
			return this.SQLUser;
		}

		public String SQLPsw;

		public String getSQLPsw() {
			return this.SQLPsw;
		}

		public String JobVPN;

		public String getJobVPN() {
			return this.JobVPN;
		}

		public String CareYN;

		public String getCareYN() {
			return this.CareYN;
		}

		public String PetrolianaYN;

		public String getPetrolianaYN() {
			return this.PetrolianaYN;
		}

		public String GroupeReiff;

		public String getGroupeReiff() {
			return this.GroupeReiff;
		}

		public String ListeCarburant;

		public String getListeCarburant() {
			return this.ListeCarburant;
		}

		public String L11;

		public String getL11() {
			return this.L11;
		}

		public String L12;

		public String getL12() {
			return this.L12;
		}

		public String L13;

		public String getL13() {
			return this.L13;
		}

		public String L2;

		public String getL2() {
			return this.L2;
		}

		public String L3;

		public String getL3() {
			return this.L3;
		}

		public String L4;

		public String getL4() {
			return this.L4;
		}

		public String L7;

		public String getL7() {
			return this.L7;
		}

		public String L8;

		public String getL8() {
			return this.L8;
		}

		@Override
		public int hashCode() {
			if (this.hashCodeDirty) {
				final int prime = PRIME;
				int result = DEFAULT_HASHCODE;

				result = prime
						* result
						+ ((this.TFirm_Cod == null) ? 0 : this.TFirm_Cod
								.hashCode());

				this.hashCode = result;
				this.hashCodeDirty = false;
			}
			return this.hashCode;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			final row11Struct other = (row11Struct) obj;

			if (this.TFirm_Cod == null) {
				if (other.TFirm_Cod != null)
					return false;
			} else if (!this.TFirm_Cod.equals(other.TFirm_Cod))
				return false;

			return true;
		}

		public void copyDataTo(row11Struct other) {

			other.TFirm_Cod = this.TFirm_Cod;
			other.Nom = this.Nom;
			other.IPServeurSQL = this.IPServeurSQL;
			other.FormatDate = this.FormatDate;
			other.SQLUser = this.SQLUser;
			other.SQLPsw = this.SQLPsw;
			other.JobVPN = this.JobVPN;
			other.CareYN = this.CareYN;
			other.PetrolianaYN = this.PetrolianaYN;
			other.GroupeReiff = this.GroupeReiff;
			other.ListeCarburant = this.ListeCarburant;
			other.L11 = this.L11;
			other.L12 = this.L12;
			other.L13 = this.L13;
			other.L2 = this.L2;
			other.L3 = this.L3;
			other.L4 = this.L4;
			other.L7 = this.L7;
			other.L8 = this.L8;

		}

		public void copyKeysDataTo(row11Struct other) {

			other.TFirm_Cod = this.TFirm_Cod;

		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readInt();
					if (length == -1) {
						this.TFirm_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TFirm_Cod = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.Nom = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.Nom = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.IPServeurSQL = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.IPServeurSQL = new String(commonByteArray, 0,
								length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.FormatDate = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.FormatDate = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.SQLUser = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.SQLUser = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.SQLPsw = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.SQLPsw = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.JobVPN = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.JobVPN = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.CareYN = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.CareYN = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.PetrolianaYN = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.PetrolianaYN = new String(commonByteArray, 0,
								length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.GroupeReiff = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.GroupeReiff = new String(commonByteArray, 0,
								length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.ListeCarburant = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.ListeCarburant = new String(commonByteArray, 0,
								length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.L11 = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.L11 = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.L12 = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.L12 = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.L13 = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.L13 = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.L2 = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.L2 = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.L3 = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.L3 = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.L4 = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.L4 = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.L7 = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.L7 = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.L8 = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.L8 = new String(commonByteArray, 0, length);
					}

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				if (this.TFirm_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TFirm_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.Nom == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.Nom.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.IPServeurSQL == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.IPServeurSQL.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.FormatDate == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.FormatDate.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.SQLUser == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.SQLUser.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.SQLPsw == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.SQLPsw.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.JobVPN == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.JobVPN.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.CareYN == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.CareYN.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.PetrolianaYN == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.PetrolianaYN.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.GroupeReiff == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.GroupeReiff.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.ListeCarburant == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.ListeCarburant.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.L11 == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.L11.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.L12 == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.L12.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.L13 == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.L13.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.L2 == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.L2.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.L3 == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.L3.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.L4 == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.L4.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.L7 == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.L7.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.L8 == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.L8.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TFirm_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TFirm_Cod));

			sb.append(", ");

			sb.append("Nom");
			sb.append("=");
			sb.append(String.valueOf(this.Nom));

			sb.append(", ");

			sb.append("IPServeurSQL");
			sb.append("=");
			sb.append(String.valueOf(this.IPServeurSQL));

			sb.append(", ");

			sb.append("FormatDate");
			sb.append("=");
			sb.append(String.valueOf(this.FormatDate));

			sb.append(", ");

			sb.append("SQLUser");
			sb.append("=");
			sb.append(String.valueOf(this.SQLUser));

			sb.append(", ");

			sb.append("SQLPsw");
			sb.append("=");
			sb.append(String.valueOf(this.SQLPsw));

			sb.append(", ");

			sb.append("JobVPN");
			sb.append("=");
			sb.append(String.valueOf(this.JobVPN));

			sb.append(", ");

			sb.append("CareYN");
			sb.append("=");
			sb.append(String.valueOf(this.CareYN));

			sb.append(", ");

			sb.append("PetrolianaYN");
			sb.append("=");
			sb.append(String.valueOf(this.PetrolianaYN));

			sb.append(", ");

			sb.append("GroupeReiff");
			sb.append("=");
			sb.append(String.valueOf(this.GroupeReiff));

			sb.append(", ");

			sb.append("ListeCarburant");
			sb.append("=");
			sb.append(String.valueOf(this.ListeCarburant));

			sb.append(", ");

			sb.append("L11");
			sb.append("=");
			sb.append(String.valueOf(this.L11));

			sb.append(", ");

			sb.append("L12");
			sb.append("=");
			sb.append(String.valueOf(this.L12));

			sb.append(", ");

			sb.append("L13");
			sb.append("=");
			sb.append(String.valueOf(this.L13));

			sb.append(", ");

			sb.append("L2");
			sb.append("=");
			sb.append(String.valueOf(this.L2));

			sb.append(", ");

			sb.append("L3");
			sb.append("=");
			sb.append(String.valueOf(this.L3));

			sb.append(", ");

			sb.append("L4");
			sb.append("=");
			sb.append(String.valueOf(this.L4));

			sb.append(", ");

			sb.append("L7");
			sb.append("=");
			sb.append(String.valueOf(this.L7));

			sb.append(", ");

			sb.append("L8");
			sb.append("=");
			sb.append(String.valueOf(this.L8));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row11Struct other) {

			int returnValue = -1;

			returnValue = checkNullsAndCompare(this.TFirm_Cod, other.TFirm_Cod);
			if (returnValue != 0) {
				return returnValue;
			}

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tMSSqlInput_1Process(
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		globalMap.put("tMSSqlInput_1_SUBPROCESS_STATE", 0);

		String currentComponent = "";

		try {

			String currentMethodName = new Exception().getStackTrace()[0]
					.getMethodName();
			boolean resumeIt = currentMethodName.equals(resumeEntryMethodName);
			if (resumeEntryMethodName == null || resumeIt || globalResumeTicket) {// start
																					// the
																					// resume

				row11Struct row11 = new row11Struct();
				row12Struct row12 = new row12Struct();
				row13Struct row13 = new row13Struct();

				/**
				 * [tFlowToIterate_1 begin ] start
				 */

				int NB_ITERATE_tMSSqlConnection_1 = 0; // for statistics

				ok_Hash.put("tFlowToIterate_1", false);
				start_Hash.put("tFlowToIterate_1", System.currentTimeMillis());
				currentComponent = "tFlowToIterate_1";

				int tos_count_tFlowToIterate_1 = 0;

				int nb_line_tFlowToIterate_1 = 0;

				/**
				 * [tFlowToIterate_1 begin ] stop
				 */

				/**
				 * [tJavaRow_1 begin ] start
				 */

				ok_Hash.put("tJavaRow_1", false);
				start_Hash.put("tJavaRow_1", System.currentTimeMillis());
				currentComponent = "tJavaRow_1";

				int tos_count_tJavaRow_1 = 0;

				int nb_line_tJavaRow_1 = 0;

				/**
				 * [tJavaRow_1 begin ] stop
				 */

				/**
				 * [tFilterRow_1 begin ] start
				 */

				ok_Hash.put("tFilterRow_1", false);
				start_Hash.put("tFilterRow_1", System.currentTimeMillis());
				currentComponent = "tFilterRow_1";

				int tos_count_tFilterRow_1 = 0;

				int nb_line_tFilterRow_1 = 0;
				int nb_line_ok_tFilterRow_1 = 0;
				int nb_line_reject_tFilterRow_1 = 0;

				/**
				 * [tFilterRow_1 begin ] stop
				 */

				/**
				 * [tMSSqlInput_1 begin ] start
				 */

				ok_Hash.put("tMSSqlInput_1", false);
				start_Hash.put("tMSSqlInput_1", System.currentTimeMillis());
				currentComponent = "tMSSqlInput_1";

				int tos_count_tMSSqlInput_1 = 0;

				int nb_line_tMSSqlInput_1 = 0;
				String dbschema_tMSSqlInput_1 = "";

				dbschema_tMSSqlInput_1 = "dbo";
				java.lang.Class.forName("net.sourceforge.jtds.jdbc.Driver");
				String port_tMSSqlInput_1 = "1433";
				String dbname_tMSSqlInput_1 = "Talend";
				String url_tMSSqlInput_1 = "jdbc:jtds:sqlserver://"
						+ "10.0.0.4";
				if (!"".equals(port_tMSSqlInput_1)) {
					url_tMSSqlInput_1 += ":" + "1433";
				}
				if (!"".equals(dbname_tMSSqlInput_1)) {
					url_tMSSqlInput_1 += "//" + "Talend";
				}
				url_tMSSqlInput_1 += ";appName=" + projectName + ";"
						+ "instance=INTEC";
				String dbUser_tMSSqlInput_1 = "Talend";
				String dbPwd_tMSSqlInput_1 = "Care2010";
				java.sql.Connection conn_tMSSqlInput_1 = java.sql.DriverManager
						.getConnection(url_tMSSqlInput_1, dbUser_tMSSqlInput_1,
								dbPwd_tMSSqlInput_1);
				java.sql.Statement stmt_tMSSqlInput_1 = conn_tMSSqlInput_1
						.createStatement();

				java.sql.ResultSet rs_tMSSqlInput_1 = stmt_tMSSqlInput_1
						.executeQuery("SELECT dbo.TStations.TFirm_Cod, 		dbo.TStations.Nom, 		dbo.TStations.IPServeurSQL, 		dbo.TStations.FormatDate, 		dbo.TStations.SQLUser, 		dbo.TStations.SQLPsw, 		dbo.TStations.JobVPN, 		dbo.TStations.CareYN, 		dbo.TStations.PetrolianaYN, 		dbo.TStations.GroupeReiff, 		dbo.TStations.ListeCarburant, 		dbo.TStations.L11, 		dbo.TStations.L12, 		dbo.TStations.L13, 		dbo.TStations.L2, 		dbo.TStations.L3, 		dbo.TStations.L4, 		dbo.TStations.L7, 		dbo.TStations.L8 FROM	dbo.TStations");
				java.sql.ResultSetMetaData rsmd_tMSSqlInput_1 = rs_tMSSqlInput_1
						.getMetaData();
				int colQtyInRs_tMSSqlInput_1 = rsmd_tMSSqlInput_1
						.getColumnCount();
				globalMap
						.put(
								"tMSSqlInput_1_QUERY",
								"SELECT dbo.TStations.TFirm_Cod, 		dbo.TStations.Nom, 		dbo.TStations.IPServeurSQL, 		dbo.TStations.FormatDate, 		dbo.TStations.SQLUser, 		dbo.TStations.SQLPsw, 		dbo.TStations.JobVPN, 		dbo.TStations.CareYN, 		dbo.TStations.PetrolianaYN, 		dbo.TStations.GroupeReiff, 		dbo.TStations.ListeCarburant, 		dbo.TStations.L11, 		dbo.TStations.L12, 		dbo.TStations.L13, 		dbo.TStations.L2, 		dbo.TStations.L3, 		dbo.TStations.L4, 		dbo.TStations.L7, 		dbo.TStations.L8 FROM	dbo.TStations");

				String tmpContent_tMSSqlInput_1 = null;
				while (rs_tMSSqlInput_1.next()) {
					nb_line_tMSSqlInput_1++;

					if (colQtyInRs_tMSSqlInput_1 < 1) {
						row11.TFirm_Cod = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(1);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.TFirm_Cod = tmpContent_tMSSqlInput_1;
						} else {
							row11.TFirm_Cod = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 2) {
						row11.Nom = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(2);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.Nom = tmpContent_tMSSqlInput_1;
						} else {
							row11.Nom = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 3) {
						row11.IPServeurSQL = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(3);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.IPServeurSQL = tmpContent_tMSSqlInput_1;
						} else {
							row11.IPServeurSQL = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 4) {
						row11.FormatDate = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(4);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.FormatDate = tmpContent_tMSSqlInput_1;
						} else {
							row11.FormatDate = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 5) {
						row11.SQLUser = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(5);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.SQLUser = tmpContent_tMSSqlInput_1;
						} else {
							row11.SQLUser = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 6) {
						row11.SQLPsw = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(6);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.SQLPsw = tmpContent_tMSSqlInput_1;
						} else {
							row11.SQLPsw = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 7) {
						row11.JobVPN = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(7);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.JobVPN = tmpContent_tMSSqlInput_1;
						} else {
							row11.JobVPN = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 8) {
						row11.CareYN = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(8);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.CareYN = tmpContent_tMSSqlInput_1;
						} else {
							row11.CareYN = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 9) {
						row11.PetrolianaYN = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(9);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.PetrolianaYN = tmpContent_tMSSqlInput_1;
						} else {
							row11.PetrolianaYN = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 10) {
						row11.GroupeReiff = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(10);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.GroupeReiff = tmpContent_tMSSqlInput_1;
						} else {
							row11.GroupeReiff = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 11) {
						row11.ListeCarburant = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(11);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.ListeCarburant = tmpContent_tMSSqlInput_1;
						} else {
							row11.ListeCarburant = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 12) {
						row11.L11 = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(12);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.L11 = tmpContent_tMSSqlInput_1;
						} else {
							row11.L11 = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 13) {
						row11.L12 = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(13);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.L12 = tmpContent_tMSSqlInput_1;
						} else {
							row11.L12 = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 14) {
						row11.L13 = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(14);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.L13 = tmpContent_tMSSqlInput_1;
						} else {
							row11.L13 = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 15) {
						row11.L2 = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(15);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.L2 = tmpContent_tMSSqlInput_1;
						} else {
							row11.L2 = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 16) {
						row11.L3 = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(16);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.L3 = tmpContent_tMSSqlInput_1;
						} else {
							row11.L3 = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 17) {
						row11.L4 = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(17);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.L4 = tmpContent_tMSSqlInput_1;
						} else {
							row11.L4 = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 18) {
						row11.L7 = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(18);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.L7 = tmpContent_tMSSqlInput_1;
						} else {
							row11.L7 = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_1 < 19) {
						row11.L8 = null;
					} else {

						tmpContent_tMSSqlInput_1 = rs_tMSSqlInput_1
								.getString(19);
						if (tmpContent_tMSSqlInput_1 != null) {
							row11.L8 = tmpContent_tMSSqlInput_1;
						} else {
							row11.L8 = null;
						}

					}

					/**
					 * [tMSSqlInput_1 begin ] stop
					 */
					/**
					 * [tMSSqlInput_1 main ] start
					 */

					currentComponent = "tMSSqlInput_1";

					tos_count_tMSSqlInput_1++;

					/**
					 * [tMSSqlInput_1 main ] stop
					 */

					/**
					 * [tFilterRow_1 main ] start
					 */

					currentComponent = "tFilterRow_1";

					row12 = null;

					if (

					(row11.JobVPN == null ? false
							: row11.JobVPN.matches("4") == true)

					)

					{
						if (row12 == null) {
							row12 = new row12Struct();
						}
						row12.TFirm_Cod = row11.TFirm_Cod;
						row12.Nom = row11.Nom;
						row12.IPServeurSQL = row11.IPServeurSQL;
						row12.CareYN = row11.CareYN;
						row12.PetrolianaYN = row11.PetrolianaYN;
						row12.JobVPN = row11.JobVPN;
						row12.ListeCarburant = row11.ListeCarburant;
						row12.SQLUser = row11.SQLUser;
						row12.SQLPsw = row11.SQLPsw;
						row12.FormatDate = row11.FormatDate;
						nb_line_ok_tFilterRow_1++;
					} else {
						nb_line_reject_tFilterRow_1++;
					}
					nb_line_tFilterRow_1++;

					tos_count_tFilterRow_1++;

					/**
					 * [tFilterRow_1 main ] stop
					 */
					// Start of branch "row12"
					if (row12 != null) {

						/**
						 * [tJavaRow_1 main ] start
						 */

						currentComponent = "tJavaRow_1";

						// données de la station en cours
						context.ShoppiID = row12.TFirm_Cod;
						System.out.println("Station  : " + context.ShoppiID);
						context.ShoppiNom = row12.Nom;
						context.SQLServeur = row12.IPServeurSQL;
						context.SQLUser = row12.SQLUser;
						context.SQLPsw = row12.SQLPsw;
						context.Format = row12.FormatDate;

						Date Periode;
						Periode = TalendDate.parseDate("MM/yyyy",
								context.Periode);
						Date Periode_1;
						Date Periode_6;
						Date Periode_13;
						Date Periode_18;

						Periode_1 = TalendDate.addDate(Periode, -1, "MM");
						Periode_6 = TalendDate.addDate(Periode, -6, "MM");
						Periode_13 = TalendDate.addDate(Periode, -13, "MM");
						Periode_18 = TalendDate.addDate(Periode, -18, "MM");

						String sPeriode_1;
						String sPeriode_6;
						String sPeriode_13;
						String sPeriode_18;

						sPeriode_1 = "01/"
								+ TalendDate.formatDate("MM/yyyy", Periode_1);
						sPeriode_6 = "01/"
								+ TalendDate.formatDate("MM/yyyy", Periode_6)
								+ " 00:00:00";
						sPeriode_13 = "01/"
								+ TalendDate.formatDate("MM/yyyy", Periode_13);
						sPeriode_18 = "01/"
								+ TalendDate.formatDate("MM/yyyy", Periode_18)
								+ " 00:00:00";

						Date FinPeriode_1;
						Date FinPeriode_13;

						FinPeriode_1 = TalendDate.getLastDayOfMonth(TalendDate
								.parseDate("dd/MM/yyyy", sPeriode_1));
						FinPeriode_13 = TalendDate.getLastDayOfMonth(TalendDate
								.parseDate("dd/MM/yyyy", sPeriode_13));

						sPeriode_1 = TalendDate.formatDate("dd/MM/yyyy",
								FinPeriode_1)
								+ " 23:59:59";
						sPeriode_13 = TalendDate.formatDate("dd/MM/yyyy",
								FinPeriode_13)
								+ " 23:59:59";

						context.Debut_n = sPeriode_6;
						context.Debut_n1 = sPeriode_18;
						context.Fin_n = sPeriode_1;
						context.Fin_n1 = sPeriode_13;

						System.out
								.println("Calcul progression de vente sur base des ventes de la période du "
										+ sPeriode_6
										+ " au "
										+ sPeriode_1
										+ " par rapport à la période du "
										+ sPeriode_18 + " au " + sPeriode_13);
						nb_line_tJavaRow_1++;

						tos_count_tJavaRow_1++;

						/**
						 * [tJavaRow_1 main ] stop
						 */

						/**
						 * [tFlowToIterate_1 main ] start
						 */

						currentComponent = "tFlowToIterate_1";

						tos_count_tFlowToIterate_1++;

						/**
						 * [tFlowToIterate_1 main ] stop
						 */
						NB_ITERATE_tMSSqlConnection_1++;

						/**
						 * [tMSSqlConnection_1 begin ] start
						 */

						ok_Hash.put("tMSSqlConnection_1", false);
						start_Hash.put("tMSSqlConnection_1", System
								.currentTimeMillis());
						currentComponent = "tMSSqlConnection_1";

						int tos_count_tMSSqlConnection_1 = 0;

						String url_tMSSqlConnection_1 = "jdbc:jtds:sqlserver://"
								+ context.SQLServeur;
						String port_tMSSqlConnection_1 = "1433";
						String dbname_tMSSqlConnection_1 = "WinLF1_"
								+ context.ShoppiID;
						if (!"".equals(port_tMSSqlConnection_1)) {
							url_tMSSqlConnection_1 += ":" + "1433";
						}
						if (!"".equals(dbname_tMSSqlConnection_1)) {
							url_tMSSqlConnection_1 += "//" + "WinLF1_"
									+ context.ShoppiID;
						}
						url_tMSSqlConnection_1 += ";appName=" + projectName
								+ ";" + "instance=INTEC";

						String userName_tMSSqlConnection_1 = context.SQLUser;

						String password_tMSSqlConnection_1 = context.SQLPsw;

						java.sql.Connection conn_tMSSqlConnection_1 = null;

						java.lang.Class
								.forName("net.sourceforge.jtds.jdbc.Driver");
						conn_tMSSqlConnection_1 = java.sql.DriverManager
								.getConnection(url_tMSSqlConnection_1,
										userName_tMSSqlConnection_1,
										password_tMSSqlConnection_1);

						conn_tMSSqlConnection_1.setAutoCommit(false);

						globalMap.put("dbschema_tMSSqlConnection_1", "");

						globalMap.put("db_tMSSqlConnection_1", "WinLF1_"
								+ context.ShoppiID);

						globalMap.put("conn_tMSSqlConnection_1",
								conn_tMSSqlConnection_1);

						/**
						 * [tMSSqlConnection_1 begin ] stop
						 */
						/**
						 * [tMSSqlConnection_1 main ] start
						 */

						currentComponent = "tMSSqlConnection_1";

						tos_count_tMSSqlConnection_1++;

						/**
						 * [tMSSqlConnection_1 main ] stop
						 */
						/**
						 * [tMSSqlConnection_1 end ] start
						 */

						currentComponent = "tMSSqlConnection_1";

						ok_Hash.put("tMSSqlConnection_1", true);
						end_Hash.put("tMSSqlConnection_1", System
								.currentTimeMillis());

						tMSSqlInput_4Process(globalMap);

						/**
						 * [tMSSqlConnection_1 end ] stop
						 */

					} // End of branch "row12"

					/**
					 * [tMSSqlInput_1 end ] start
					 */

					currentComponent = "tMSSqlInput_1";

				}
				stmt_tMSSqlInput_1.close();

				conn_tMSSqlInput_1.close();

				globalMap.put("tMSSqlInput_1_NB_LINE", nb_line_tMSSqlInput_1);

				ok_Hash.put("tMSSqlInput_1", true);
				end_Hash.put("tMSSqlInput_1", System.currentTimeMillis());

				/**
				 * [tMSSqlInput_1 end ] stop
				 */

				/**
				 * [tFilterRow_1 end ] start
				 */

				currentComponent = "tFilterRow_1";

				globalMap.put("tFilterRow_1_NB_LINE", nb_line_tFilterRow_1);
				globalMap.put("tFilterRow_1_NB_LINE_OK",
						nb_line_ok_tFilterRow_1);
				globalMap.put("tFilterRow_1_NB_LINE_REJECT",
						nb_line_reject_tFilterRow_1);

				ok_Hash.put("tFilterRow_1", true);
				end_Hash.put("tFilterRow_1", System.currentTimeMillis());

				/**
				 * [tFilterRow_1 end ] stop
				 */

				/**
				 * [tJavaRow_1 end ] start
				 */

				currentComponent = "tJavaRow_1";

				globalMap.put("tJavaRow_1_NB_LINE", nb_line_tJavaRow_1);

				ok_Hash.put("tJavaRow_1", true);
				end_Hash.put("tJavaRow_1", System.currentTimeMillis());

				/**
				 * [tJavaRow_1 end ] stop
				 */

				/**
				 * [tFlowToIterate_1 end ] start
				 */

				currentComponent = "tFlowToIterate_1";

				globalMap.put("tFlowToIterate_1_NB_LINE",
						nb_line_tFlowToIterate_1);

				ok_Hash.put("tFlowToIterate_1", true);
				end_Hash.put("tFlowToIterate_1", System.currentTimeMillis());

				/**
				 * [tFlowToIterate_1 end ] stop
				 */

				globalResumeTicket = true;

			}// end the resume

		} catch (Exception e) {

			throw new TalendException(e, currentComponent, globalMap);

		}

		globalMap.put("tMSSqlInput_1_SUBPROCESS_STATE", 1);
	}

	public static class row4Struct implements
			routines.system.IPersistableRow<row4Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];
		private static final int DEFAULT_HASHCODE = 1;
		private static final int PRIME = 31;
		private int hashCode = DEFAULT_HASHCODE;
		public boolean hashCodeDirty = true;

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public BigDecimal TArt_KoefProgVkf;

		public BigDecimal getTArt_KoefProgVkf() {
			return this.TArt_KoefProgVkf;
		}

		@Override
		public int hashCode() {
			if (this.hashCodeDirty) {
				final int prime = PRIME;
				int result = DEFAULT_HASHCODE;

				result = prime
						* result
						+ ((this.TArt_Cod == null) ? 0 : this.TArt_Cod
								.hashCode());

				this.hashCode = result;
				this.hashCodeDirty = false;
			}
			return this.hashCode;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			final row4Struct other = (row4Struct) obj;

			if (this.TArt_Cod == null) {
				if (other.TArt_Cod != null)
					return false;
			} else if (!this.TArt_Cod.equals(other.TArt_Cod))
				return false;

			return true;
		}

		public void copyDataTo(row4Struct other) {

			other.TArt_Cod = this.TArt_Cod;
			other.TArt_KoefProgVkf = this.TArt_KoefProgVkf;

		}

		public void copyKeysDataTo(row4Struct other) {

			other.TArt_Cod = this.TArt_Cod;

		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					this.TArt_KoefProgVkf = (BigDecimal) dis.readObject();

				} catch (IOException e) {
					throw new RuntimeException(e);

				} catch (ClassNotFoundException eCNFE) {
					throw new RuntimeException(eCNFE);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// BigDecimal

				dos.writeObject(this.TArt_KoefProgVkf);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("TArt_KoefProgVkf");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_KoefProgVkf));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row4Struct other) {

			int returnValue = -1;

			returnValue = checkNullsAndCompare(this.TArt_Cod, other.TArt_Cod);
			if (returnValue != 0) {
				return returnValue;
			}

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tMSSqlInput_4Process(
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		globalMap.put("tMSSqlInput_4_SUBPROCESS_STATE", 0);

		String currentComponent = "";

		try {

			String currentMethodName = new Exception().getStackTrace()[0]
					.getMethodName();
			boolean resumeIt = currentMethodName.equals(resumeEntryMethodName);
			if (resumeEntryMethodName == null || resumeIt || globalResumeTicket) {// start
																					// the
																					// resume

				row4Struct row4 = new row4Struct();

				/**
				 * [tFileOutputDelimited_9 begin ] start
				 */

				ok_Hash.put("tFileOutputDelimited_9", false);
				start_Hash.put("tFileOutputDelimited_9", System
						.currentTimeMillis());
				currentComponent = "tFileOutputDelimited_9";

				int tos_count_tFileOutputDelimited_9 = 0;

				String fileName_tFileOutputDelimited_9 = (new java.io.File(
						context.RepIni + "backup" + context.ShoppiID + ".csv"))
						.getAbsolutePath().replace("\\", "/");
				String fullName_tFileOutputDelimited_9 = null;
				String extension_tFileOutputDelimited_9 = null;
				String directory_tFileOutputDelimited_9 = null;
				if ((fileName_tFileOutputDelimited_9.indexOf("/") != -1)) {
					if (fileName_tFileOutputDelimited_9.lastIndexOf(".") < fileName_tFileOutputDelimited_9
							.lastIndexOf("/")) {
						fullName_tFileOutputDelimited_9 = fileName_tFileOutputDelimited_9;
						extension_tFileOutputDelimited_9 = "";
					} else {
						fullName_tFileOutputDelimited_9 = fileName_tFileOutputDelimited_9
								.substring(0, fileName_tFileOutputDelimited_9
										.lastIndexOf("."));
						extension_tFileOutputDelimited_9 = fileName_tFileOutputDelimited_9
								.substring(fileName_tFileOutputDelimited_9
										.lastIndexOf("."));
					}
					directory_tFileOutputDelimited_9 = fileName_tFileOutputDelimited_9
							.substring(0, fileName_tFileOutputDelimited_9
									.lastIndexOf("/"));
				} else {
					if (fileName_tFileOutputDelimited_9.lastIndexOf(".") != -1) {
						fullName_tFileOutputDelimited_9 = fileName_tFileOutputDelimited_9
								.substring(0, fileName_tFileOutputDelimited_9
										.lastIndexOf("."));
						extension_tFileOutputDelimited_9 = fileName_tFileOutputDelimited_9
								.substring(fileName_tFileOutputDelimited_9
										.lastIndexOf("."));
					} else {
						fullName_tFileOutputDelimited_9 = fileName_tFileOutputDelimited_9;
						extension_tFileOutputDelimited_9 = "";
					}
					directory_tFileOutputDelimited_9 = "";
				}

				int nb_line_tFileOutputDelimited_9 = 0;
				int splitEvery_tFileOutputDelimited_9 = 1000;
				int splitedFileNo_tFileOutputDelimited_9 = 0;
				int currentRow_tFileOutputDelimited_9 = 0;

				final String OUT_DELIM_tFileOutputDelimited_9 = /**
				 * Start field
				 * tFileOutputDelimited_9:FIELDSEPARATOR
				 */
				";"/** End field tFileOutputDelimited_9:FIELDSEPARATOR */
				;

				final String OUT_DELIM_ROWSEP_tFileOutputDelimited_9 = /**
				 * Start
				 * field tFileOutputDelimited_9:ROWSEPARATOR
				 */
				"\n"/** End field tFileOutputDelimited_9:ROWSEPARATOR */
				;

				// create directory only if not exists
				if (directory_tFileOutputDelimited_9 != null
						&& directory_tFileOutputDelimited_9.trim().length() != 0) {
					java.io.File dir_tFileOutputDelimited_9 = new java.io.File(
							directory_tFileOutputDelimited_9);
					if (!dir_tFileOutputDelimited_9.exists()) {
						dir_tFileOutputDelimited_9.mkdirs();
					}
				}

				// routines.system.Row
				java.io.Writer outtFileOutputDelimited_9 = new java.io.BufferedWriter(
						new java.io.OutputStreamWriter(
								new java.io.FileOutputStream(
										fileName_tFileOutputDelimited_9, false),
								"ISO-8859-15"));
				java.io.File filetFileOutputDelimited_9 = new java.io.File(
						fileName_tFileOutputDelimited_9);

				if (filetFileOutputDelimited_9.length() == 0) {

					outtFileOutputDelimited_9.write("TArt_Cod");

					outtFileOutputDelimited_9
							.write(OUT_DELIM_tFileOutputDelimited_9);

					outtFileOutputDelimited_9.write("TArt_KoefProgVkf");

					outtFileOutputDelimited_9
							.write(OUT_DELIM_ROWSEP_tFileOutputDelimited_9);
				}

				/**
				 * [tFileOutputDelimited_9 begin ] stop
				 */

				/**
				 * [tMSSqlInput_4 begin ] start
				 */

				ok_Hash.put("tMSSqlInput_4", false);
				start_Hash.put("tMSSqlInput_4", System.currentTimeMillis());
				currentComponent = "tMSSqlInput_4";

				int tos_count_tMSSqlInput_4 = 0;

				int nb_line_tMSSqlInput_4 = 0;
				String dbschema_tMSSqlInput_4 = "";

				dbschema_tMSSqlInput_4 = (String) globalMap
						.get("dbschema_tMSSqlConnection_1");
				java.sql.Connection conn_tMSSqlInput_4 = (java.sql.Connection) globalMap
						.get("conn_tMSSqlConnection_1");

				java.sql.Statement stmt_tMSSqlInput_4 = conn_tMSSqlInput_4
						.createStatement();

				java.sql.ResultSet rs_tMSSqlInput_4 = stmt_tMSSqlInput_4
						.executeQuery("SELECT TArt.TArt_Cod, 		TArt.TArt_KoefProgVkf FROM	TArt");
				java.sql.ResultSetMetaData rsmd_tMSSqlInput_4 = rs_tMSSqlInput_4
						.getMetaData();
				int colQtyInRs_tMSSqlInput_4 = rsmd_tMSSqlInput_4
						.getColumnCount();
				globalMap
						.put("tMSSqlInput_4_QUERY",
								"SELECT TArt.TArt_Cod, 		TArt.TArt_KoefProgVkf FROM	TArt");

				String tmpContent_tMSSqlInput_4 = null;
				while (rs_tMSSqlInput_4.next()) {
					nb_line_tMSSqlInput_4++;

					if (colQtyInRs_tMSSqlInput_4 < 1) {
						row4.TArt_Cod = null;
					} else {

						tmpContent_tMSSqlInput_4 = rs_tMSSqlInput_4
								.getString(1);
						if (tmpContent_tMSSqlInput_4 != null) {
							row4.TArt_Cod = tmpContent_tMSSqlInput_4;
						} else {
							row4.TArt_Cod = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_4 < 2) {
						row4.TArt_KoefProgVkf = null;
					} else {

						if (rs_tMSSqlInput_4.getObject(2) != null) {
							row4.TArt_KoefProgVkf = rs_tMSSqlInput_4
									.getBigDecimal(2);
						} else {

							row4.TArt_KoefProgVkf = null;

						}

					}

					/**
					 * [tMSSqlInput_4 begin ] stop
					 */
					/**
					 * [tMSSqlInput_4 main ] start
					 */

					currentComponent = "tMSSqlInput_4";

					tos_count_tMSSqlInput_4++;

					/**
					 * [tMSSqlInput_4 main ] stop
					 */

					/**
					 * [tFileOutputDelimited_9 main ] start
					 */

					currentComponent = "tFileOutputDelimited_9";

					StringBuilder sb_tFileOutputDelimited_9 = new StringBuilder();

					if (row4.TArt_Cod != null) {

						sb_tFileOutputDelimited_9.append(

						row4.TArt_Cod

						);

					}

					sb_tFileOutputDelimited_9
							.append(OUT_DELIM_tFileOutputDelimited_9);

					if (row4.TArt_KoefProgVkf != null) {

						sb_tFileOutputDelimited_9.append(

						row4.TArt_KoefProgVkf

						);

					}

					sb_tFileOutputDelimited_9
							.append(OUT_DELIM_ROWSEP_tFileOutputDelimited_9);

					nb_line_tFileOutputDelimited_9++;

					outtFileOutputDelimited_9.write(sb_tFileOutputDelimited_9
							.toString());

					tos_count_tFileOutputDelimited_9++;

					/**
					 * [tFileOutputDelimited_9 main ] stop
					 */

					/**
					 * [tMSSqlInput_4 end ] start
					 */

					currentComponent = "tMSSqlInput_4";

				}
				stmt_tMSSqlInput_4.close();

				globalMap.put("tMSSqlInput_4_NB_LINE", nb_line_tMSSqlInput_4);

				ok_Hash.put("tMSSqlInput_4", true);
				end_Hash.put("tMSSqlInput_4", System.currentTimeMillis());

				/**
				 * [tMSSqlInput_4 end ] stop
				 */

				/**
				 * [tFileOutputDelimited_9 end ] start
				 */

				currentComponent = "tFileOutputDelimited_9";

				outtFileOutputDelimited_9.close();
				globalMap.put("tFileOutputDelimited_9_NB_LINE",
						nb_line_tFileOutputDelimited_9);

				ok_Hash.put("tFileOutputDelimited_9", true);
				end_Hash.put("tFileOutputDelimited_9", System
						.currentTimeMillis());

				/**
				 * [tFileOutputDelimited_9 end ] stop
				 */

				globalResumeTicket = true;

			}// end the resume

			if (resumeEntryMethodName == null || globalResumeTicket) {
				resumeUtil.addLog("CHECKPOINT",
						"CONNECTION:SUBJOB_OK:tMSSqlInput_4:OnSubjobOk", "",
						Thread.currentThread().getId() + "", "", "", "", "");
			}

			tMSSqlInput_6Process(globalMap);

		} catch (Exception e) {

			throw new TalendException(e, currentComponent, globalMap);

		}

		globalMap.put("tMSSqlInput_4_SUBPROCESS_STATE", 1);
	}

	public static class row8Struct implements
			routines.system.IPersistableRow<row8Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public String TLagKopf_Cod;

		public String getTLagKopf_Cod() {
			return this.TLagKopf_Cod;
		}

		public java.util.Date TArt_DatBlk;

		public java.util.Date getTArt_DatBlk() {
			return this.TArt_DatBlk;
		}

		public String TArt_DisabledYN;

		public String getTArt_DisabledYN() {
			return this.TArt_DisabledYN;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.TLagKopf_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TLagKopf_Cod = new String(commonByteArray, 0,
								length);
					}

					length = dis.readByte();
					if (length == -1) {
						this.TArt_DatBlk = null;
					} else {
						this.TArt_DatBlk = new Date(dis.readLong());
					}

					length = dis.readInt();
					if (length == -1) {
						this.TArt_DisabledYN = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_DisabledYN = new String(commonByteArray, 0,
								length);
					}

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.TLagKopf_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TLagKopf_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// java.util.Date

				if (this.TArt_DatBlk == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.TArt_DatBlk.getTime());
				}

				// String

				if (this.TArt_DisabledYN == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_DisabledYN.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("TLagKopf_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TLagKopf_Cod));

			sb.append(", ");

			sb.append("TArt_DatBlk");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_DatBlk));

			sb.append(", ");

			sb.append("TArt_DisabledYN");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_DisabledYN));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row8Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tMSSqlInput_6Process(
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		globalMap.put("tMSSqlInput_6_SUBPROCESS_STATE", 0);

		String currentComponent = "";

		try {

			String currentMethodName = new Exception().getStackTrace()[0]
					.getMethodName();
			boolean resumeIt = currentMethodName.equals(resumeEntryMethodName);
			if (resumeEntryMethodName == null || resumeIt || globalResumeTicket) {// start
																					// the
																					// resume

				row8Struct row8 = new row8Struct();

				/**
				 * [tFileOutputDelimited_6 begin ] start
				 */

				ok_Hash.put("tFileOutputDelimited_6", false);
				start_Hash.put("tFileOutputDelimited_6", System
						.currentTimeMillis());
				currentComponent = "tFileOutputDelimited_6";

				int tos_count_tFileOutputDelimited_6 = 0;

				String fileName_tFileOutputDelimited_6 = (new java.io.File(
						context.RepIni + "articles_extract" + context.ShoppiID
								+ ".csv")).getAbsolutePath().replace("\\", "/");
				String fullName_tFileOutputDelimited_6 = null;
				String extension_tFileOutputDelimited_6 = null;
				String directory_tFileOutputDelimited_6 = null;
				if ((fileName_tFileOutputDelimited_6.indexOf("/") != -1)) {
					if (fileName_tFileOutputDelimited_6.lastIndexOf(".") < fileName_tFileOutputDelimited_6
							.lastIndexOf("/")) {
						fullName_tFileOutputDelimited_6 = fileName_tFileOutputDelimited_6;
						extension_tFileOutputDelimited_6 = "";
					} else {
						fullName_tFileOutputDelimited_6 = fileName_tFileOutputDelimited_6
								.substring(0, fileName_tFileOutputDelimited_6
										.lastIndexOf("."));
						extension_tFileOutputDelimited_6 = fileName_tFileOutputDelimited_6
								.substring(fileName_tFileOutputDelimited_6
										.lastIndexOf("."));
					}
					directory_tFileOutputDelimited_6 = fileName_tFileOutputDelimited_6
							.substring(0, fileName_tFileOutputDelimited_6
									.lastIndexOf("/"));
				} else {
					if (fileName_tFileOutputDelimited_6.lastIndexOf(".") != -1) {
						fullName_tFileOutputDelimited_6 = fileName_tFileOutputDelimited_6
								.substring(0, fileName_tFileOutputDelimited_6
										.lastIndexOf("."));
						extension_tFileOutputDelimited_6 = fileName_tFileOutputDelimited_6
								.substring(fileName_tFileOutputDelimited_6
										.lastIndexOf("."));
					} else {
						fullName_tFileOutputDelimited_6 = fileName_tFileOutputDelimited_6;
						extension_tFileOutputDelimited_6 = "";
					}
					directory_tFileOutputDelimited_6 = "";
				}

				int nb_line_tFileOutputDelimited_6 = 0;
				int splitEvery_tFileOutputDelimited_6 = 1000;
				int splitedFileNo_tFileOutputDelimited_6 = 0;
				int currentRow_tFileOutputDelimited_6 = 0;

				final String OUT_DELIM_tFileOutputDelimited_6 = /**
				 * Start field
				 * tFileOutputDelimited_6:FIELDSEPARATOR
				 */
				";"/** End field tFileOutputDelimited_6:FIELDSEPARATOR */
				;

				final String OUT_DELIM_ROWSEP_tFileOutputDelimited_6 = /**
				 * Start
				 * field tFileOutputDelimited_6:ROWSEPARATOR
				 */
				"\n"/** End field tFileOutputDelimited_6:ROWSEPARATOR */
				;

				// create directory only if not exists
				if (directory_tFileOutputDelimited_6 != null
						&& directory_tFileOutputDelimited_6.trim().length() != 0) {
					java.io.File dir_tFileOutputDelimited_6 = new java.io.File(
							directory_tFileOutputDelimited_6);
					if (!dir_tFileOutputDelimited_6.exists()) {
						dir_tFileOutputDelimited_6.mkdirs();
					}
				}

				// routines.system.Row
				java.io.Writer outtFileOutputDelimited_6 = new java.io.BufferedWriter(
						new java.io.OutputStreamWriter(
								new java.io.FileOutputStream(
										fileName_tFileOutputDelimited_6, false),
								"ISO-8859-15"));
				java.io.File filetFileOutputDelimited_6 = new java.io.File(
						fileName_tFileOutputDelimited_6);

				if (filetFileOutputDelimited_6.length() == 0) {

					outtFileOutputDelimited_6.write("TArt_Cod");

					outtFileOutputDelimited_6
							.write(OUT_DELIM_tFileOutputDelimited_6);

					outtFileOutputDelimited_6.write("TLagKopf_Cod");

					outtFileOutputDelimited_6
							.write(OUT_DELIM_tFileOutputDelimited_6);

					outtFileOutputDelimited_6.write("TArt_DatBlk");

					outtFileOutputDelimited_6
							.write(OUT_DELIM_tFileOutputDelimited_6);

					outtFileOutputDelimited_6.write("TArt_DisabledYN");

					outtFileOutputDelimited_6
							.write(OUT_DELIM_ROWSEP_tFileOutputDelimited_6);
				}

				/**
				 * [tFileOutputDelimited_6 begin ] stop
				 */

				/**
				 * [tMSSqlInput_6 begin ] start
				 */

				ok_Hash.put("tMSSqlInput_6", false);
				start_Hash.put("tMSSqlInput_6", System.currentTimeMillis());
				currentComponent = "tMSSqlInput_6";

				int tos_count_tMSSqlInput_6 = 0;

				int nb_line_tMSSqlInput_6 = 0;
				String dbschema_tMSSqlInput_6 = "";

				dbschema_tMSSqlInput_6 = (String) globalMap
						.get("dbschema_tMSSqlConnection_1");
				java.sql.Connection conn_tMSSqlInput_6 = (java.sql.Connection) globalMap
						.get("conn_tMSSqlConnection_1");

				java.sql.Statement stmt_tMSSqlInput_6 = conn_tMSSqlInput_6
						.createStatement();

				java.sql.ResultSet rs_tMSSqlInput_6 = stmt_tMSSqlInput_6
						.executeQuery("SELECT TArt.TArt_Cod, 		TArt.TLagKopf_Cod,  		TArt.TArt_DatBlk,  		TArt.TArt_DisabledYN FROM	TArt  WHERE TLagKopf_Cod = 'CAR' and TArt_Cod NOT LIKE 'AT%' and TArt_DisabledYN = '0'");
				java.sql.ResultSetMetaData rsmd_tMSSqlInput_6 = rs_tMSSqlInput_6
						.getMetaData();
				int colQtyInRs_tMSSqlInput_6 = rsmd_tMSSqlInput_6
						.getColumnCount();
				globalMap
						.put(
								"tMSSqlInput_6_QUERY",
								"SELECT TArt.TArt_Cod, 		TArt.TLagKopf_Cod,  		TArt.TArt_DatBlk,  		TArt.TArt_DisabledYN FROM	TArt  WHERE TLagKopf_Cod = 'CAR' and TArt_Cod NOT LIKE 'AT%' and TArt_DisabledYN = '0'");

				String tmpContent_tMSSqlInput_6 = null;
				while (rs_tMSSqlInput_6.next()) {
					nb_line_tMSSqlInput_6++;

					if (colQtyInRs_tMSSqlInput_6 < 1) {
						row8.TArt_Cod = null;
					} else {

						tmpContent_tMSSqlInput_6 = rs_tMSSqlInput_6
								.getString(1);
						if (tmpContent_tMSSqlInput_6 != null) {
							row8.TArt_Cod = tmpContent_tMSSqlInput_6;
						} else {
							row8.TArt_Cod = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_6 < 2) {
						row8.TLagKopf_Cod = null;
					} else {

						tmpContent_tMSSqlInput_6 = rs_tMSSqlInput_6
								.getString(2);
						if (tmpContent_tMSSqlInput_6 != null) {
							row8.TLagKopf_Cod = tmpContent_tMSSqlInput_6;
						} else {
							row8.TLagKopf_Cod = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_6 < 3) {
						row8.TArt_DatBlk = null;
					} else {

						if (rs_tMSSqlInput_6.getTimestamp(3) != null) {
							row8.TArt_DatBlk = new java.util.Date(
									rs_tMSSqlInput_6.getTimestamp(3).getTime());
						} else {
							row8.TArt_DatBlk = null;
						}

					}

					if (colQtyInRs_tMSSqlInput_6 < 4) {
						row8.TArt_DisabledYN = null;
					} else {

						tmpContent_tMSSqlInput_6 = rs_tMSSqlInput_6
								.getString(4);
						if (tmpContent_tMSSqlInput_6 != null) {
							row8.TArt_DisabledYN = tmpContent_tMSSqlInput_6;
						} else {
							row8.TArt_DisabledYN = null;
						}

					}

					/**
					 * [tMSSqlInput_6 begin ] stop
					 */
					/**
					 * [tMSSqlInput_6 main ] start
					 */

					currentComponent = "tMSSqlInput_6";

					tos_count_tMSSqlInput_6++;

					/**
					 * [tMSSqlInput_6 main ] stop
					 */

					/**
					 * [tFileOutputDelimited_6 main ] start
					 */

					currentComponent = "tFileOutputDelimited_6";

					StringBuilder sb_tFileOutputDelimited_6 = new StringBuilder();

					if (row8.TArt_Cod != null) {

						sb_tFileOutputDelimited_6.append(

						row8.TArt_Cod

						);

					}

					sb_tFileOutputDelimited_6
							.append(OUT_DELIM_tFileOutputDelimited_6);

					if (row8.TLagKopf_Cod != null) {

						sb_tFileOutputDelimited_6.append(

						row8.TLagKopf_Cod

						);

					}

					sb_tFileOutputDelimited_6
							.append(OUT_DELIM_tFileOutputDelimited_6);

					if (row8.TArt_DatBlk != null) {

						sb_tFileOutputDelimited_6.append(

						FormatterUtils.format_Date(row8.TArt_DatBlk,
								"dd-MM-yyyy")

						);

					}

					sb_tFileOutputDelimited_6
							.append(OUT_DELIM_tFileOutputDelimited_6);

					if (row8.TArt_DisabledYN != null) {

						sb_tFileOutputDelimited_6.append(

						row8.TArt_DisabledYN

						);

					}

					sb_tFileOutputDelimited_6
							.append(OUT_DELIM_ROWSEP_tFileOutputDelimited_6);

					nb_line_tFileOutputDelimited_6++;

					outtFileOutputDelimited_6.write(sb_tFileOutputDelimited_6
							.toString());

					tos_count_tFileOutputDelimited_6++;

					/**
					 * [tFileOutputDelimited_6 main ] stop
					 */

					/**
					 * [tMSSqlInput_6 end ] start
					 */

					currentComponent = "tMSSqlInput_6";

				}
				stmt_tMSSqlInput_6.close();

				globalMap.put("tMSSqlInput_6_NB_LINE", nb_line_tMSSqlInput_6);

				ok_Hash.put("tMSSqlInput_6", true);
				end_Hash.put("tMSSqlInput_6", System.currentTimeMillis());

				/**
				 * [tMSSqlInput_6 end ] stop
				 */

				/**
				 * [tFileOutputDelimited_6 end ] start
				 */

				currentComponent = "tFileOutputDelimited_6";

				outtFileOutputDelimited_6.close();
				globalMap.put("tFileOutputDelimited_6_NB_LINE",
						nb_line_tFileOutputDelimited_6);

				ok_Hash.put("tFileOutputDelimited_6", true);
				end_Hash.put("tFileOutputDelimited_6", System
						.currentTimeMillis());

				/**
				 * [tFileOutputDelimited_6 end ] stop
				 */

				globalResumeTicket = true;

			}// end the resume

			if (resumeEntryMethodName == null || globalResumeTicket) {
				resumeUtil.addLog("CHECKPOINT",
						"CONNECTION:SUBJOB_OK:tMSSqlInput_6:OnSubjobOk", "",
						Thread.currentThread().getId() + "", "", "", "", "");
			}

			tFileInputDelimited_1Process(globalMap);

		} catch (Exception e) {

			throw new TalendException(e, currentComponent, globalMap);

		}

		globalMap.put("tMSSqlInput_6_SUBPROCESS_STATE", 1);
	}

	public static class row16Struct implements
			routines.system.IPersistableRow<row16Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public BigDecimal Ventes_n_1;

		public BigDecimal getVentes_n_1() {
			return this.Ventes_n_1;
		}

		public BigDecimal Ventes_n;

		public BigDecimal getVentes_n() {
			return this.Ventes_n;
		}

		public Long start_Periode_n_1;

		public Long getStart_Periode_n_1() {
			return this.start_Periode_n_1;
		}

		public Long end_Periode_n_1;

		public Long getEnd_Periode_n_1() {
			return this.end_Periode_n_1;
		}

		public Long life_n_1;

		public Long getLife_n_1() {
			return this.life_n_1;
		}

		public Long start_Periode_n;

		public Long getStart_Periode_n() {
			return this.start_Periode_n;
		}

		public Long end_Periode_n;

		public Long getEnd_Periode_n() {
			return this.end_Periode_n;
		}

		public Long life_n;

		public Long getLife_n() {
			return this.life_n;
		}

		public BigDecimal Koef;

		public BigDecimal getKoef() {
			return this.Koef;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					this.Ventes_n_1 = (BigDecimal) dis.readObject();

					this.Ventes_n = (BigDecimal) dis.readObject();

					length = dis.readByte();
					if (length == -1) {
						this.start_Periode_n_1 = null;
					} else {
						this.start_Periode_n_1 = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.end_Periode_n_1 = null;
					} else {
						this.end_Periode_n_1 = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.life_n_1 = null;
					} else {
						this.life_n_1 = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.start_Periode_n = null;
					} else {
						this.start_Periode_n = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.end_Periode_n = null;
					} else {
						this.end_Periode_n = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.life_n = null;
					} else {
						this.life_n = dis.readLong();
					}

					this.Koef = (BigDecimal) dis.readObject();

				} catch (IOException e) {
					throw new RuntimeException(e);

				} catch (ClassNotFoundException eCNFE) {
					throw new RuntimeException(eCNFE);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// BigDecimal

				dos.writeObject(this.Ventes_n_1);

				// BigDecimal

				dos.writeObject(this.Ventes_n);

				// Long

				if (this.start_Periode_n_1 == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.start_Periode_n_1);
				}

				// Long

				if (this.end_Periode_n_1 == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.end_Periode_n_1);
				}

				// Long

				if (this.life_n_1 == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.life_n_1);
				}

				// Long

				if (this.start_Periode_n == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.start_Periode_n);
				}

				// Long

				if (this.end_Periode_n == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.end_Periode_n);
				}

				// Long

				if (this.life_n == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.life_n);
				}

				// BigDecimal

				dos.writeObject(this.Koef);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("Ventes_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.Ventes_n_1));

			sb.append(", ");

			sb.append("Ventes_n");
			sb.append("=");
			sb.append(String.valueOf(this.Ventes_n));

			sb.append(", ");

			sb.append("start_Periode_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.start_Periode_n_1));

			sb.append(", ");

			sb.append("end_Periode_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.end_Periode_n_1));

			sb.append(", ");

			sb.append("life_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.life_n_1));

			sb.append(", ");

			sb.append("start_Periode_n");
			sb.append("=");
			sb.append(String.valueOf(this.start_Periode_n));

			sb.append(", ");

			sb.append("end_Periode_n");
			sb.append("=");
			sb.append(String.valueOf(this.end_Periode_n));

			sb.append(", ");

			sb.append("life_n");
			sb.append("=");
			sb.append(String.valueOf(this.life_n));

			sb.append(", ");

			sb.append("Koef");
			sb.append("=");
			sb.append(String.valueOf(this.Koef));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row16Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class row15Struct implements
			routines.system.IPersistableRow<row15Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public BigDecimal Ventes_n_1;

		public BigDecimal getVentes_n_1() {
			return this.Ventes_n_1;
		}

		public BigDecimal Ventes_n;

		public BigDecimal getVentes_n() {
			return this.Ventes_n;
		}

		public Long start_Periode_n_1;

		public Long getStart_Periode_n_1() {
			return this.start_Periode_n_1;
		}

		public Long end_Periode_n_1;

		public Long getEnd_Periode_n_1() {
			return this.end_Periode_n_1;
		}

		public Long life_n_1;

		public Long getLife_n_1() {
			return this.life_n_1;
		}

		public Long start_Periode_n;

		public Long getStart_Periode_n() {
			return this.start_Periode_n;
		}

		public Long end_Periode_n;

		public Long getEnd_Periode_n() {
			return this.end_Periode_n;
		}

		public Long life_n;

		public Long getLife_n() {
			return this.life_n;
		}

		public BigDecimal Koef;

		public BigDecimal getKoef() {
			return this.Koef;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					this.Ventes_n_1 = (BigDecimal) dis.readObject();

					this.Ventes_n = (BigDecimal) dis.readObject();

					length = dis.readByte();
					if (length == -1) {
						this.start_Periode_n_1 = null;
					} else {
						this.start_Periode_n_1 = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.end_Periode_n_1 = null;
					} else {
						this.end_Periode_n_1 = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.life_n_1 = null;
					} else {
						this.life_n_1 = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.start_Periode_n = null;
					} else {
						this.start_Periode_n = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.end_Periode_n = null;
					} else {
						this.end_Periode_n = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.life_n = null;
					} else {
						this.life_n = dis.readLong();
					}

					this.Koef = (BigDecimal) dis.readObject();

				} catch (IOException e) {
					throw new RuntimeException(e);

				} catch (ClassNotFoundException eCNFE) {
					throw new RuntimeException(eCNFE);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// BigDecimal

				dos.writeObject(this.Ventes_n_1);

				// BigDecimal

				dos.writeObject(this.Ventes_n);

				// Long

				if (this.start_Periode_n_1 == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.start_Periode_n_1);
				}

				// Long

				if (this.end_Periode_n_1 == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.end_Periode_n_1);
				}

				// Long

				if (this.life_n_1 == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.life_n_1);
				}

				// Long

				if (this.start_Periode_n == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.start_Periode_n);
				}

				// Long

				if (this.end_Periode_n == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.end_Periode_n);
				}

				// Long

				if (this.life_n == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.life_n);
				}

				// BigDecimal

				dos.writeObject(this.Koef);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("Ventes_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.Ventes_n_1));

			sb.append(", ");

			sb.append("Ventes_n");
			sb.append("=");
			sb.append(String.valueOf(this.Ventes_n));

			sb.append(", ");

			sb.append("start_Periode_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.start_Periode_n_1));

			sb.append(", ");

			sb.append("end_Periode_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.end_Periode_n_1));

			sb.append(", ");

			sb.append("life_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.life_n_1));

			sb.append(", ");

			sb.append("start_Periode_n");
			sb.append("=");
			sb.append(String.valueOf(this.start_Periode_n));

			sb.append(", ");

			sb.append("end_Periode_n");
			sb.append("=");
			sb.append(String.valueOf(this.end_Periode_n));

			sb.append(", ");

			sb.append("life_n");
			sb.append("=");
			sb.append(String.valueOf(this.life_n));

			sb.append(", ");

			sb.append("Koef");
			sb.append("=");
			sb.append(String.valueOf(this.Koef));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row15Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class row14Struct implements
			routines.system.IPersistableRow<row14Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public java.util.Date TStaDetail_Dat;

		public java.util.Date getTStaDetail_Dat() {
			return this.TStaDetail_Dat;
		}

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public BigDecimal Ventes_n_1;

		public BigDecimal getVentes_n_1() {
			return this.Ventes_n_1;
		}

		public BigDecimal Ventes_n;

		public BigDecimal getVentes_n() {
			return this.Ventes_n;
		}

		public Long Age_row;

		public Long getAge_row() {
			return this.Age_row;
		}

		public Long start_Periode_n_1;

		public Long getStart_Periode_n_1() {
			return this.start_Periode_n_1;
		}

		public Long end_Periode_n_1;

		public Long getEnd_Periode_n_1() {
			return this.end_Periode_n_1;
		}

		public Long start_Periode_n;

		public Long getStart_Periode_n() {
			return this.start_Periode_n;
		}

		public Long end_Periode_n;

		public Long getEnd_Periode_n() {
			return this.end_Periode_n;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readByte();
					if (length == -1) {
						this.TStaDetail_Dat = null;
					} else {
						this.TStaDetail_Dat = new Date(dis.readLong());
					}

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					this.Ventes_n_1 = (BigDecimal) dis.readObject();

					this.Ventes_n = (BigDecimal) dis.readObject();

					length = dis.readByte();
					if (length == -1) {
						this.Age_row = null;
					} else {
						this.Age_row = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.start_Periode_n_1 = null;
					} else {
						this.start_Periode_n_1 = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.end_Periode_n_1 = null;
					} else {
						this.end_Periode_n_1 = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.start_Periode_n = null;
					} else {
						this.start_Periode_n = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.end_Periode_n = null;
					} else {
						this.end_Periode_n = dis.readLong();
					}

				} catch (IOException e) {
					throw new RuntimeException(e);

				} catch (ClassNotFoundException eCNFE) {
					throw new RuntimeException(eCNFE);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// java.util.Date

				if (this.TStaDetail_Dat == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.TStaDetail_Dat.getTime());
				}

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// BigDecimal

				dos.writeObject(this.Ventes_n_1);

				// BigDecimal

				dos.writeObject(this.Ventes_n);

				// Long

				if (this.Age_row == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.Age_row);
				}

				// Long

				if (this.start_Periode_n_1 == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.start_Periode_n_1);
				}

				// Long

				if (this.end_Periode_n_1 == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.end_Periode_n_1);
				}

				// Long

				if (this.start_Periode_n == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.start_Periode_n);
				}

				// Long

				if (this.end_Periode_n == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.end_Periode_n);
				}

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TStaDetail_Dat");
			sb.append("=");
			sb.append(String.valueOf(this.TStaDetail_Dat));

			sb.append(", ");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("Ventes_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.Ventes_n_1));

			sb.append(", ");

			sb.append("Ventes_n");
			sb.append("=");
			sb.append(String.valueOf(this.Ventes_n));

			sb.append(", ");

			sb.append("Age_row");
			sb.append("=");
			sb.append(String.valueOf(this.Age_row));

			sb.append(", ");

			sb.append("start_Periode_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.start_Periode_n_1));

			sb.append(", ");

			sb.append("end_Periode_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.end_Periode_n_1));

			sb.append(", ");

			sb.append("start_Periode_n");
			sb.append("=");
			sb.append(String.valueOf(this.start_Periode_n));

			sb.append(", ");

			sb.append("end_Periode_n");
			sb.append("=");
			sb.append(String.valueOf(this.end_Periode_n));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row14Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class OnRowsEndStructtAggregateRow_2 implements
			routines.system.IPersistableRow<OnRowsEndStructtAggregateRow_2> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public java.util.Date TStaDetail_Dat;

		public java.util.Date getTStaDetail_Dat() {
			return this.TStaDetail_Dat;
		}

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public BigDecimal Ventes_n_1;

		public BigDecimal getVentes_n_1() {
			return this.Ventes_n_1;
		}

		public BigDecimal Ventes_n;

		public BigDecimal getVentes_n() {
			return this.Ventes_n;
		}

		public Long Age_row;

		public Long getAge_row() {
			return this.Age_row;
		}

		public Long start_Periode_n_1;

		public Long getStart_Periode_n_1() {
			return this.start_Periode_n_1;
		}

		public Long end_Periode_n_1;

		public Long getEnd_Periode_n_1() {
			return this.end_Periode_n_1;
		}

		public Long start_Periode_n;

		public Long getStart_Periode_n() {
			return this.start_Periode_n;
		}

		public Long end_Periode_n;

		public Long getEnd_Periode_n() {
			return this.end_Periode_n;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readByte();
					if (length == -1) {
						this.TStaDetail_Dat = null;
					} else {
						this.TStaDetail_Dat = new Date(dis.readLong());
					}

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					this.Ventes_n_1 = (BigDecimal) dis.readObject();

					this.Ventes_n = (BigDecimal) dis.readObject();

					length = dis.readByte();
					if (length == -1) {
						this.Age_row = null;
					} else {
						this.Age_row = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.start_Periode_n_1 = null;
					} else {
						this.start_Periode_n_1 = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.end_Periode_n_1 = null;
					} else {
						this.end_Periode_n_1 = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.start_Periode_n = null;
					} else {
						this.start_Periode_n = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.end_Periode_n = null;
					} else {
						this.end_Periode_n = dis.readLong();
					}

				} catch (IOException e) {
					throw new RuntimeException(e);

				} catch (ClassNotFoundException eCNFE) {
					throw new RuntimeException(eCNFE);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// java.util.Date

				if (this.TStaDetail_Dat == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.TStaDetail_Dat.getTime());
				}

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// BigDecimal

				dos.writeObject(this.Ventes_n_1);

				// BigDecimal

				dos.writeObject(this.Ventes_n);

				// Long

				if (this.Age_row == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.Age_row);
				}

				// Long

				if (this.start_Periode_n_1 == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.start_Periode_n_1);
				}

				// Long

				if (this.end_Periode_n_1 == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.end_Periode_n_1);
				}

				// Long

				if (this.start_Periode_n == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.start_Periode_n);
				}

				// Long

				if (this.end_Periode_n == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.end_Periode_n);
				}

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TStaDetail_Dat");
			sb.append("=");
			sb.append(String.valueOf(this.TStaDetail_Dat));

			sb.append(", ");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("Ventes_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.Ventes_n_1));

			sb.append(", ");

			sb.append("Ventes_n");
			sb.append("=");
			sb.append(String.valueOf(this.Ventes_n));

			sb.append(", ");

			sb.append("Age_row");
			sb.append("=");
			sb.append(String.valueOf(this.Age_row));

			sb.append(", ");

			sb.append("start_Periode_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.start_Periode_n_1));

			sb.append(", ");

			sb.append("end_Periode_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.end_Periode_n_1));

			sb.append(", ");

			sb.append("start_Periode_n");
			sb.append("=");
			sb.append(String.valueOf(this.start_Periode_n));

			sb.append(", ");

			sb.append("end_Periode_n");
			sb.append("=");
			sb.append(String.valueOf(this.end_Periode_n));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(OnRowsEndStructtAggregateRow_2 other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class row5Struct implements
			routines.system.IPersistableRow<row5Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public java.util.Date TStaDetail_Dat;

		public java.util.Date getTStaDetail_Dat() {
			return this.TStaDetail_Dat;
		}

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public BigDecimal Ventes_n_1;

		public BigDecimal getVentes_n_1() {
			return this.Ventes_n_1;
		}

		public BigDecimal Ventes_n;

		public BigDecimal getVentes_n() {
			return this.Ventes_n;
		}

		public Long Age_row;

		public Long getAge_row() {
			return this.Age_row;
		}

		public Long Periode_n_1;

		public Long getPeriode_n_1() {
			return this.Periode_n_1;
		}

		public Long Periode_n;

		public Long getPeriode_n() {
			return this.Periode_n;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readByte();
					if (length == -1) {
						this.TStaDetail_Dat = null;
					} else {
						this.TStaDetail_Dat = new Date(dis.readLong());
					}

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					this.Ventes_n_1 = (BigDecimal) dis.readObject();

					this.Ventes_n = (BigDecimal) dis.readObject();

					length = dis.readByte();
					if (length == -1) {
						this.Age_row = null;
					} else {
						this.Age_row = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.Periode_n_1 = null;
					} else {
						this.Periode_n_1 = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.Periode_n = null;
					} else {
						this.Periode_n = dis.readLong();
					}

				} catch (IOException e) {
					throw new RuntimeException(e);

				} catch (ClassNotFoundException eCNFE) {
					throw new RuntimeException(eCNFE);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// java.util.Date

				if (this.TStaDetail_Dat == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.TStaDetail_Dat.getTime());
				}

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// BigDecimal

				dos.writeObject(this.Ventes_n_1);

				// BigDecimal

				dos.writeObject(this.Ventes_n);

				// Long

				if (this.Age_row == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.Age_row);
				}

				// Long

				if (this.Periode_n_1 == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.Periode_n_1);
				}

				// Long

				if (this.Periode_n == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.Periode_n);
				}

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TStaDetail_Dat");
			sb.append("=");
			sb.append(String.valueOf(this.TStaDetail_Dat));

			sb.append(", ");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("Ventes_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.Ventes_n_1));

			sb.append(", ");

			sb.append("Ventes_n");
			sb.append("=");
			sb.append(String.valueOf(this.Ventes_n));

			sb.append(", ");

			sb.append("Age_row");
			sb.append("=");
			sb.append(String.valueOf(this.Age_row));

			sb.append(", ");

			sb.append("Periode_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.Periode_n_1));

			sb.append(", ");

			sb.append("Periode_n");
			sb.append("=");
			sb.append(String.valueOf(this.Periode_n));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row5Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class row3Struct implements
			routines.system.IPersistableRow<row3Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public int TStaDetail_ID;

		public int getTStaDetail_ID() {
			return this.TStaDetail_ID;
		}

		public String TStaTyp_Cod;

		public String getTStaTyp_Cod() {
			return this.TStaTyp_Cod;
		}

		public java.util.Date TStaDetail_Dat;

		public java.util.Date getTStaDetail_Dat() {
			return this.TStaDetail_Dat;
		}

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public BigDecimal TStaDetail_BstEinh;

		public BigDecimal getTStaDetail_BstEinh() {
			return this.TStaDetail_BstEinh;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					this.TStaDetail_ID = dis.readInt();

					length = dis.readInt();
					if (length == -1) {
						this.TStaTyp_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TStaTyp_Cod = new String(commonByteArray, 0,
								length);
					}

					length = dis.readByte();
					if (length == -1) {
						this.TStaDetail_Dat = null;
					} else {
						this.TStaDetail_Dat = new Date(dis.readLong());
					}

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					this.TStaDetail_BstEinh = (BigDecimal) dis.readObject();

				} catch (IOException e) {
					throw new RuntimeException(e);

				} catch (ClassNotFoundException eCNFE) {
					throw new RuntimeException(eCNFE);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// int

				dos.writeInt(this.TStaDetail_ID);

				// String

				if (this.TStaTyp_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TStaTyp_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// java.util.Date

				if (this.TStaDetail_Dat == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.TStaDetail_Dat.getTime());
				}

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// BigDecimal

				dos.writeObject(this.TStaDetail_BstEinh);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TStaDetail_ID");
			sb.append("=");
			sb.append(String.valueOf(this.TStaDetail_ID));

			sb.append(", ");

			sb.append("TStaTyp_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TStaTyp_Cod));

			sb.append(", ");

			sb.append("TStaDetail_Dat");
			sb.append("=");
			sb.append(String.valueOf(this.TStaDetail_Dat));

			sb.append(", ");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("TStaDetail_BstEinh");
			sb.append("=");
			sb.append(String.valueOf(this.TStaDetail_BstEinh));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row3Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class OnRowsEndStructtSortRow_1 implements
			routines.system.IPersistableRow<OnRowsEndStructtSortRow_1> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public int TStaDetail_ID;

		public int getTStaDetail_ID() {
			return this.TStaDetail_ID;
		}

		public String TStaTyp_Cod;

		public String getTStaTyp_Cod() {
			return this.TStaTyp_Cod;
		}

		public java.util.Date TStaDetail_Dat;

		public java.util.Date getTStaDetail_Dat() {
			return this.TStaDetail_Dat;
		}

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public BigDecimal TStaDetail_BstEinh;

		public BigDecimal getTStaDetail_BstEinh() {
			return this.TStaDetail_BstEinh;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					this.TStaDetail_ID = dis.readInt();

					length = dis.readInt();
					if (length == -1) {
						this.TStaTyp_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TStaTyp_Cod = new String(commonByteArray, 0,
								length);
					}

					length = dis.readByte();
					if (length == -1) {
						this.TStaDetail_Dat = null;
					} else {
						this.TStaDetail_Dat = new Date(dis.readLong());
					}

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					this.TStaDetail_BstEinh = (BigDecimal) dis.readObject();

				} catch (IOException e) {
					throw new RuntimeException(e);

				} catch (ClassNotFoundException eCNFE) {
					throw new RuntimeException(eCNFE);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// int

				dos.writeInt(this.TStaDetail_ID);

				// String

				if (this.TStaTyp_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TStaTyp_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// java.util.Date

				if (this.TStaDetail_Dat == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.TStaDetail_Dat.getTime());
				}

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// BigDecimal

				dos.writeObject(this.TStaDetail_BstEinh);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TStaDetail_ID");
			sb.append("=");
			sb.append(String.valueOf(this.TStaDetail_ID));

			sb.append(", ");

			sb.append("TStaTyp_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TStaTyp_Cod));

			sb.append(", ");

			sb.append("TStaDetail_Dat");
			sb.append("=");
			sb.append(String.valueOf(this.TStaDetail_Dat));

			sb.append(", ");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("TStaDetail_BstEinh");
			sb.append("=");
			sb.append(String.valueOf(this.TStaDetail_BstEinh));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(OnRowsEndStructtSortRow_1 other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class row1Struct implements
			routines.system.IPersistableRow<row1Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public int TStaDetail_ID;

		public int getTStaDetail_ID() {
			return this.TStaDetail_ID;
		}

		public String TStaTyp_Cod;

		public String getTStaTyp_Cod() {
			return this.TStaTyp_Cod;
		}

		public java.util.Date TStaDetail_Dat;

		public java.util.Date getTStaDetail_Dat() {
			return this.TStaDetail_Dat;
		}

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public BigDecimal TStaDetail_BstEinh;

		public BigDecimal getTStaDetail_BstEinh() {
			return this.TStaDetail_BstEinh;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					this.TStaDetail_ID = dis.readInt();

					length = dis.readInt();
					if (length == -1) {
						this.TStaTyp_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TStaTyp_Cod = new String(commonByteArray, 0,
								length);
					}

					length = dis.readByte();
					if (length == -1) {
						this.TStaDetail_Dat = null;
					} else {
						this.TStaDetail_Dat = new Date(dis.readLong());
					}

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					this.TStaDetail_BstEinh = (BigDecimal) dis.readObject();

				} catch (IOException e) {
					throw new RuntimeException(e);

				} catch (ClassNotFoundException eCNFE) {
					throw new RuntimeException(eCNFE);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// int

				dos.writeInt(this.TStaDetail_ID);

				// String

				if (this.TStaTyp_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TStaTyp_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// java.util.Date

				if (this.TStaDetail_Dat == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.TStaDetail_Dat.getTime());
				}

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// BigDecimal

				dos.writeObject(this.TStaDetail_BstEinh);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TStaDetail_ID");
			sb.append("=");
			sb.append(String.valueOf(this.TStaDetail_ID));

			sb.append(", ");

			sb.append("TStaTyp_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TStaTyp_Cod));

			sb.append(", ");

			sb.append("TStaDetail_Dat");
			sb.append("=");
			sb.append(String.valueOf(this.TStaDetail_Dat));

			sb.append(", ");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("TStaDetail_BstEinh");
			sb.append("=");
			sb.append(String.valueOf(this.TStaDetail_BstEinh));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row1Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class row10Struct implements
			routines.system.IPersistableRow<row10Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row10Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class row9Struct implements
			routines.system.IPersistableRow<row9Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public String TLagKopf_Cod;

		public String getTLagKopf_Cod() {
			return this.TLagKopf_Cod;
		}

		public java.util.Date TArt_DatBlk;

		public java.util.Date getTArt_DatBlk() {
			return this.TArt_DatBlk;
		}

		public String TArt_DisabledYN;

		public String getTArt_DisabledYN() {
			return this.TArt_DisabledYN;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.TLagKopf_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TLagKopf_Cod = new String(commonByteArray, 0,
								length);
					}

					length = dis.readByte();
					if (length == -1) {
						this.TArt_DatBlk = null;
					} else {
						this.TArt_DatBlk = new Date(dis.readLong());
					}

					length = dis.readInt();
					if (length == -1) {
						this.TArt_DisabledYN = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_DisabledYN = new String(commonByteArray, 0,
								length);
					}

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.TLagKopf_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TLagKopf_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// java.util.Date

				if (this.TArt_DatBlk == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.TArt_DatBlk.getTime());
				}

				// String

				if (this.TArt_DisabledYN == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_DisabledYN.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("TLagKopf_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TLagKopf_Cod));

			sb.append(", ");

			sb.append("TArt_DatBlk");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_DatBlk));

			sb.append(", ");

			sb.append("TArt_DisabledYN");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_DisabledYN));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row9Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tFileInputDelimited_1Process(
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		globalMap.put("tFileInputDelimited_1_SUBPROCESS_STATE", 0);

		String currentComponent = "";

		try {

			String currentMethodName = new Exception().getStackTrace()[0]
					.getMethodName();
			boolean resumeIt = currentMethodName.equals(resumeEntryMethodName);
			if (resumeEntryMethodName == null || resumeIt || globalResumeTicket) {// start
																					// the
																					// resume

				row9Struct row9 = new row9Struct();
				row10Struct row10 = new row10Struct();
				row1Struct row1 = new row1Struct();
				row3Struct row3 = new row3Struct();
				row5Struct row5 = new row5Struct();
				row14Struct row14 = new row14Struct();
				row15Struct row15 = new row15Struct();
				row16Struct row16 = new row16Struct();

				/**
				 * [tFlowToIterate_2 begin ] start
				 */

				int NB_ITERATE_tMSSqlInput_2 = 0; // for statistics

				ok_Hash.put("tFlowToIterate_2", false);
				start_Hash.put("tFlowToIterate_2", System.currentTimeMillis());
				currentComponent = "tFlowToIterate_2";

				int tos_count_tFlowToIterate_2 = 0;

				int nb_line_tFlowToIterate_2 = 0;

				/**
				 * [tFlowToIterate_2 begin ] stop
				 */

				/**
				 * [tJavaRow_6 begin ] start
				 */

				ok_Hash.put("tJavaRow_6", false);
				start_Hash.put("tJavaRow_6", System.currentTimeMillis());
				currentComponent = "tJavaRow_6";

				int tos_count_tJavaRow_6 = 0;

				int nb_line_tJavaRow_6 = 0;

				/**
				 * [tJavaRow_6 begin ] stop
				 */

				/**
				 * [tFileInputDelimited_1 begin ] start
				 */

				ok_Hash.put("tFileInputDelimited_1", false);
				start_Hash.put("tFileInputDelimited_1", System
						.currentTimeMillis());
				currentComponent = "tFileInputDelimited_1";

				int tos_count_tFileInputDelimited_1 = 0;

				org.talend.fileprocess.FileInputDelimited fid_tFileInputDelimited_1 = new org.talend.fileprocess.FileInputDelimited(
						context.RepIni + "articles_extract" + context.ShoppiID
								+ ".csv", "ISO-8859-15", ";", "\n", true, 1, 0,
						-1, -1, false);
				while (fid_tFileInputDelimited_1.nextRecord()) {
					row9 = null;
					boolean whetherReject_tFileInputDelimited_1 = false;
					row9 = new row9Struct();
					try {
						String temp_tFileInputDelimited_1 = "";

						row9.TArt_Cod = fid_tFileInputDelimited_1.get(0);
						row9.TLagKopf_Cod = fid_tFileInputDelimited_1.get(1);
						temp_tFileInputDelimited_1 = fid_tFileInputDelimited_1
								.get(2);
						if (temp_tFileInputDelimited_1.length() > 0) {
							row9.TArt_DatBlk = ParserUtils.parseTo_Date(
									temp_tFileInputDelimited_1, "dd-MM-yyyy");
						} else {
							row9.TArt_DatBlk = null;
						}
						row9.TArt_DisabledYN = fid_tFileInputDelimited_1.get(3);

					} catch (Exception e) {
						whetherReject_tFileInputDelimited_1 = true;
						System.err.println(e.getMessage());
						row9 = null;
					}

					/**
					 * [tFileInputDelimited_1 begin ] stop
					 */
					/**
					 * [tFileInputDelimited_1 main ] start
					 */

					currentComponent = "tFileInputDelimited_1";

					tos_count_tFileInputDelimited_1++;

					/**
					 * [tFileInputDelimited_1 main ] stop
					 */
					// Start of branch "row9"
					if (row9 != null) {

						/**
						 * [tJavaRow_6 main ] start
						 */

						currentComponent = "tJavaRow_6";

						// Code generated according to input schema and output
						// schema
						context.current_Art2 = row9.TArt_Cod;

						nb_line_tJavaRow_6++;

						tos_count_tJavaRow_6++;

						/**
						 * [tJavaRow_6 main ] stop
						 */

						/**
						 * [tFlowToIterate_2 main ] start
						 */

						currentComponent = "tFlowToIterate_2";

						globalMap.put("row10.TArt_Cod", row10.TArt_Cod);
						nb_line_tFlowToIterate_2++;

						tos_count_tFlowToIterate_2++;

						/**
						 * [tFlowToIterate_2 main ] stop
						 */
						NB_ITERATE_tMSSqlInput_2++;

						/**
						 * [tSortRow_1_SortOut begin ] start
						 */

						ok_Hash.put("tSortRow_1_SortOut", false);
						start_Hash.put("tSortRow_1_SortOut", System
								.currentTimeMillis());
						currentComponent = "tSortRow_1_SortOut";

						int tos_count_tSortRow_1_SortOut = 0;

						class Comparablerow1Struct extends row1Struct implements
								Comparable<Comparablerow1Struct> {

							public int compareTo(Comparablerow1Struct other) {

								if (this.TStaDetail_Dat == null
										&& other.TStaDetail_Dat != null) {
									return -1;

								} else if (this.TStaDetail_Dat != null
										&& other.TStaDetail_Dat == null) {
									return 1;

								} else if (this.TStaDetail_Dat != null
										&& other.TStaDetail_Dat != null) {
									if (!this.TStaDetail_Dat
											.equals(other.TStaDetail_Dat)) {
										return this.TStaDetail_Dat
												.compareTo(other.TStaDetail_Dat);
									}
								}
								return 0;
							}
						}

						java.util.List<Comparablerow1Struct> list_tSortRow_1_SortOut = new java.util.ArrayList<Comparablerow1Struct>();

						/**
						 * [tSortRow_1_SortOut begin ] stop
						 */

						/**
						 * [tMSSqlInput_2 begin ] start
						 */

						ok_Hash.put("tMSSqlInput_2", false);
						start_Hash.put("tMSSqlInput_2", System
								.currentTimeMillis());
						currentComponent = "tMSSqlInput_2";

						int tos_count_tMSSqlInput_2 = 0;

						int nb_line_tMSSqlInput_2 = 0;
						String dbschema_tMSSqlInput_2 = "";

						dbschema_tMSSqlInput_2 = (String) globalMap
								.get("dbschema_tMSSqlConnection_1");
						java.sql.Connection conn_tMSSqlInput_2 = (java.sql.Connection) globalMap
								.get("conn_tMSSqlConnection_1");

						java.sql.Statement stmt_tMSSqlInput_2 = conn_tMSSqlInput_2
								.createStatement();

						java.sql.ResultSet rs_tMSSqlInput_2 = stmt_tMSSqlInput_2
								.executeQuery("SELECT TStaDetail.TStaDetail_ID, 		TStaDetail.TStaTyp_Cod, 		TStaDetail.TStaDetail_Dat, 		TStaDetail.TArt_Cod, 		TStaDetail.TStaDetail_BstEinh FROM	TStaDetail  WHERE TArt_Cod = '"
										+ context.current_Art2
										+ "' and TStaTyp_Cod ='1' and TStaDetail_Dat >= '"
										+ context.Debut_n1
										+ "' and TStaDetail_Dat <='"
										+ context.Fin_n1
										+ "' OR TArt_Cod = '"
										+ context.current_Art2
										+ "' and TStaTyp_Cod ='1' and TStaDetail_Dat >= '"
										+ context.Debut_n
										+ "' and TStaDetail_Dat <= '"
										+ context.Fin_n + "'");
						java.sql.ResultSetMetaData rsmd_tMSSqlInput_2 = rs_tMSSqlInput_2
								.getMetaData();
						int colQtyInRs_tMSSqlInput_2 = rsmd_tMSSqlInput_2
								.getColumnCount();
						globalMap
								.put(
										"tMSSqlInput_2_QUERY",
										"SELECT TStaDetail.TStaDetail_ID, 		TStaDetail.TStaTyp_Cod, 		TStaDetail.TStaDetail_Dat, 		TStaDetail.TArt_Cod, 		TStaDetail.TStaDetail_BstEinh FROM	TStaDetail  WHERE TArt_Cod = '"
												+ context.current_Art2
												+ "' and TStaTyp_Cod ='1' and TStaDetail_Dat >= '"
												+ context.Debut_n1
												+ "' and TStaDetail_Dat <='"
												+ context.Fin_n1
												+ "' OR TArt_Cod = '"
												+ context.current_Art2
												+ "' and TStaTyp_Cod ='1' and TStaDetail_Dat >= '"
												+ context.Debut_n
												+ "' and TStaDetail_Dat <= '"
												+ context.Fin_n + "'");

						String tmpContent_tMSSqlInput_2 = null;
						while (rs_tMSSqlInput_2.next()) {
							nb_line_tMSSqlInput_2++;

							if (colQtyInRs_tMSSqlInput_2 < 1) {
								row1.TStaDetail_ID = 0;
							} else {

								if (rs_tMSSqlInput_2.getObject(1) != null) {
									row1.TStaDetail_ID = rs_tMSSqlInput_2
											.getInt(1);
								} else {

									throw new RuntimeException(
											"Null value in non-Nullable column");

								}

							}

							if (colQtyInRs_tMSSqlInput_2 < 2) {
								row1.TStaTyp_Cod = null;
							} else {

								tmpContent_tMSSqlInput_2 = rs_tMSSqlInput_2
										.getString(2);
								if (tmpContent_tMSSqlInput_2 != null) {
									row1.TStaTyp_Cod = tmpContent_tMSSqlInput_2;
								} else {
									row1.TStaTyp_Cod = null;
								}

							}

							if (colQtyInRs_tMSSqlInput_2 < 3) {
								row1.TStaDetail_Dat = null;
							} else {

								if (rs_tMSSqlInput_2.getTimestamp(3) != null) {
									row1.TStaDetail_Dat = new java.util.Date(
											rs_tMSSqlInput_2.getTimestamp(3)
													.getTime());
								} else {
									row1.TStaDetail_Dat = null;
								}

							}

							if (colQtyInRs_tMSSqlInput_2 < 4) {
								row1.TArt_Cod = null;
							} else {

								tmpContent_tMSSqlInput_2 = rs_tMSSqlInput_2
										.getString(4);
								if (tmpContent_tMSSqlInput_2 != null) {
									row1.TArt_Cod = tmpContent_tMSSqlInput_2;
								} else {
									row1.TArt_Cod = null;
								}

							}

							if (colQtyInRs_tMSSqlInput_2 < 5) {
								row1.TStaDetail_BstEinh = null;
							} else {

								if (rs_tMSSqlInput_2.getObject(5) != null) {
									row1.TStaDetail_BstEinh = rs_tMSSqlInput_2
											.getBigDecimal(5);
								} else {

									row1.TStaDetail_BstEinh = null;

								}

							}

							/**
							 * [tMSSqlInput_2 begin ] stop
							 */
							/**
							 * [tMSSqlInput_2 main ] start
							 */

							currentComponent = "tMSSqlInput_2";

							tos_count_tMSSqlInput_2++;

							/**
							 * [tMSSqlInput_2 main ] stop
							 */

							/**
							 * [tSortRow_1_SortOut main ] start
							 */

							currentComponent = "tSortRow_1_SortOut";

							Comparablerow1Struct arrayRowtSortRow_1_SortOut = new Comparablerow1Struct();

							arrayRowtSortRow_1_SortOut.TStaDetail_ID = row1.TStaDetail_ID;
							arrayRowtSortRow_1_SortOut.TStaTyp_Cod = row1.TStaTyp_Cod;
							arrayRowtSortRow_1_SortOut.TStaDetail_Dat = row1.TStaDetail_Dat;
							arrayRowtSortRow_1_SortOut.TArt_Cod = row1.TArt_Cod;
							arrayRowtSortRow_1_SortOut.TStaDetail_BstEinh = row1.TStaDetail_BstEinh;
							list_tSortRow_1_SortOut
									.add(arrayRowtSortRow_1_SortOut);

							tos_count_tSortRow_1_SortOut++;

							/**
							 * [tSortRow_1_SortOut main ] stop
							 */

							/**
							 * [tMSSqlInput_2 end ] start
							 */

							currentComponent = "tMSSqlInput_2";

						}
						stmt_tMSSqlInput_2.close();

						globalMap.put("tMSSqlInput_2_NB_LINE",
								nb_line_tMSSqlInput_2);

						ok_Hash.put("tMSSqlInput_2", true);
						end_Hash.put("tMSSqlInput_2", System
								.currentTimeMillis());

						/**
						 * [tMSSqlInput_2 end ] stop
						 */

						/**
						 * [tSortRow_1_SortOut end ] start
						 */

						currentComponent = "tSortRow_1_SortOut";

						row1Struct[] array_tSortRow_1_SortOut = list_tSortRow_1_SortOut
								.toArray(new Comparablerow1Struct[0]);

						java.util.Arrays.sort(array_tSortRow_1_SortOut);

						globalMap.put("tSortRow_1", array_tSortRow_1_SortOut);

						ok_Hash.put("tSortRow_1_SortOut", true);
						end_Hash.put("tSortRow_1_SortOut", System
								.currentTimeMillis());

						/**
						 * [tSortRow_1_SortOut end ] stop
						 */

						/**
						 * [tAggregateRow_2_AGGOUT begin ] start
						 */

						ok_Hash.put("tAggregateRow_2_AGGOUT", false);
						start_Hash.put("tAggregateRow_2_AGGOUT", System
								.currentTimeMillis());
						currentComponent = "tAggregateRow_2_AGGOUT";

						int tos_count_tAggregateRow_2_AGGOUT = 0;

						// ------------

						java.util.Map hashAggreg_tAggregateRow_2 = new java.util.HashMap();

						// ------------

						class UtilClass_tAggregateRow_2 { // G_OutBegin_AggR_144

							public double sd(Double[] data) {
								final int n = data.length;
								if (n < 2) {
									return Double.NaN;
								}
								double d1 = 0d;
								double d2 = 0d;

								for (int i = 0; i < data.length; i++) {
									d1 += (data[i] * data[i]);
									d2 += data[i];
								}

								return Math.sqrt((n * d1 - d2 * d2) / n / n);
							}

							public void checkedIADD(byte a, byte b,
									boolean checkTypeOverFlow, boolean checkUlp) {
								byte r = (byte) (a + b);
								if (checkTypeOverFlow
										&& ((a ^ r) & (b ^ r)) < 0) {
									throw new RuntimeException(
											buildOverflowMessage(String
													.valueOf(a), String
													.valueOf(b),
													"'short/Short'",
													"'int/Integer'"));
								}
							}

							public void checkedIADD(short a, short b,
									boolean checkTypeOverFlow, boolean checkUlp) {
								short r = (short) (a + b);
								if (checkTypeOverFlow
										&& ((a ^ r) & (b ^ r)) < 0) {
									throw new RuntimeException(
											buildOverflowMessage(String
													.valueOf(a), String
													.valueOf(b),
													"'int/Integer'",
													"'short/Short'"));
								}
							}

							public void checkedIADD(int a, int b,
									boolean checkTypeOverFlow, boolean checkUlp) {
								int r = a + b;
								if (checkTypeOverFlow
										&& ((a ^ r) & (b ^ r)) < 0) {
									throw new RuntimeException(
											buildOverflowMessage(String
													.valueOf(a), String
													.valueOf(b), "'long/Long'",
													"'int/Integer'"));
								}
							}

							public void checkedIADD(long a, long b,
									boolean checkTypeOverFlow, boolean checkUlp) {
								long r = a + b;
								if (checkTypeOverFlow
										&& ((a ^ r) & (b ^ r)) < 0) {
									throw new RuntimeException(
											buildOverflowMessage(String
													.valueOf(a), String
													.valueOf(b),
													"'BigDecimal'",
													"'long/Long'"));
								}
							}

							public void checkedIADD(float a, float b,
									boolean checkTypeOverFlow, boolean checkUlp) {

								if (checkUlp) {
									float minAddedValue = Math.ulp(a);
									if (minAddedValue > b) {
										throw new RuntimeException(
												buildPrecisionMessage(
														String.valueOf(a),
														String.valueOf(b),
														"'double' or 'BigDecimal'",
														"'float/Float'"));
									}
								}

								if (checkTypeOverFlow
										&& ((double) a + (double) b > (double) Float.MAX_VALUE)
										|| ((double) a + (double) b < (double) Float.MIN_VALUE)) {
									throw new RuntimeException(
											buildOverflowMessage(String
													.valueOf(a), String
													.valueOf(b),
													"'double' or 'BigDecimal'",
													"'float/Float'"));
								}
							}

							public void checkedIADD(double a, double b,
									boolean checkTypeOverFlow, boolean checkUlp) {

								if (checkUlp) {
									double minAddedValue = Math.ulp(a);
									if (minAddedValue > b) {
										throw new RuntimeException(
												buildPrecisionMessage(String
														.valueOf(a), String
														.valueOf(a),
														"'BigDecimal'",
														"'double/Double'"));
									}
								}

								if (checkTypeOverFlow
										&& (a + b > (double) Double.MAX_VALUE)
										|| (a + b < Double.MIN_VALUE)) {
									throw new RuntimeException(
											buildOverflowMessage(String
													.valueOf(a), String
													.valueOf(b),
													"'BigDecimal'",
													"'double/Double'"));
								}
							}

							private String buildOverflowMessage(String a,
									String b, String advicedTypes,
									String originalType) {
								return "Type overflow when adding "
										+ b
										+ " to "
										+ a
										+ ", to resolve this problem, increase the precision by using "
										+ advicedTypes + " type in place of "
										+ originalType + ".";
							}

							private String buildPrecisionMessage(String a,
									String b, String advicedTypes,
									String originalType) {
								return "The double precision is unsufficient to add the value "
										+ b
										+ " to "
										+ a
										+ ", to resolve this problem, increase the precision by using "
										+ advicedTypes
										+ " type in place of "
										+ originalType + ".";
							}

						} // G_OutBegin_AggR_144

						UtilClass_tAggregateRow_2 utilClass_tAggregateRow_2 = new UtilClass_tAggregateRow_2();

						class AggOperationStruct_tAggregateRow_2 { // G_OutBegin_AggR_100

							private static final int DEFAULT_HASHCODE = 1;
							private static final int PRIME = 31;
							private int hashCode = DEFAULT_HASHCODE;
							public boolean hashCodeDirty = true;

							String TArt_Cod;
							Long start_Periode_n_1_min;
							Long end_Periode_n_1_max;
							Long start_Periode_n_min;
							Long end_Periode_n_max;
							BigDecimal Ventes_n_1_sum;
							BigDecimal Ventes_n_sum;

							@Override
							public int hashCode() {
								if (this.hashCodeDirty) {
									final int prime = PRIME;
									int result = DEFAULT_HASHCODE;

									result = prime
											* result
											+ ((this.TArt_Cod == null) ? 0
													: this.TArt_Cod.hashCode());

									this.hashCode = result;
									this.hashCodeDirty = false;
								}
								return this.hashCode;
							}

							@Override
							public boolean equals(Object obj) {
								if (this == obj)
									return true;
								if (obj == null)
									return false;
								if (getClass() != obj.getClass())
									return false;
								final AggOperationStruct_tAggregateRow_2 other = (AggOperationStruct_tAggregateRow_2) obj;

								if (this.TArt_Cod == null) {
									if (other.TArt_Cod != null)
										return false;
								} else if (!this.TArt_Cod
										.equals(other.TArt_Cod))
									return false;

								return true;
							}

						} // G_OutBegin_AggR_100

						AggOperationStruct_tAggregateRow_2 operation_result_tAggregateRow_2 = null;
						AggOperationStruct_tAggregateRow_2 operation_finder_tAggregateRow_2 = new AggOperationStruct_tAggregateRow_2();
						java.util.Map<AggOperationStruct_tAggregateRow_2, AggOperationStruct_tAggregateRow_2> hash_tAggregateRow_2 = new java.util.HashMap<AggOperationStruct_tAggregateRow_2, AggOperationStruct_tAggregateRow_2>();

						/**
						 * [tAggregateRow_2_AGGOUT begin ] stop
						 */

						/**
						 * [tJavaRow_7 begin ] start
						 */

						ok_Hash.put("tJavaRow_7", false);
						start_Hash
								.put("tJavaRow_7", System.currentTimeMillis());
						currentComponent = "tJavaRow_7";

						int tos_count_tJavaRow_7 = 0;

						int nb_line_tJavaRow_7 = 0;

						/**
						 * [tJavaRow_7 begin ] stop
						 */

						/**
						 * [tSortRow_1_SortIn begin ] start
						 */

						ok_Hash.put("tSortRow_1_SortIn", false);
						start_Hash.put("tSortRow_1_SortIn", System
								.currentTimeMillis());
						currentComponent = "tSortRow_1_SortIn";

						int tos_count_tSortRow_1_SortIn = 0;

						row1Struct[] array_tSortRow_1_SortIn = (row1Struct[]) globalMap
								.get("tSortRow_1");

						int nb_line_tSortRow_1_SortIn = 0;

						row1Struct current_tSortRow_1_SortIn = null;

						for (int i_tSortRow_1_SortIn = 0; i_tSortRow_1_SortIn < array_tSortRow_1_SortIn.length; i_tSortRow_1_SortIn++) {
							current_tSortRow_1_SortIn = array_tSortRow_1_SortIn[i_tSortRow_1_SortIn];
							row3.TStaDetail_ID = current_tSortRow_1_SortIn.TStaDetail_ID;
							row3.TStaTyp_Cod = current_tSortRow_1_SortIn.TStaTyp_Cod;
							row3.TStaDetail_Dat = current_tSortRow_1_SortIn.TStaDetail_Dat;
							row3.TArt_Cod = current_tSortRow_1_SortIn.TArt_Cod;
							row3.TStaDetail_BstEinh = current_tSortRow_1_SortIn.TStaDetail_BstEinh;
							// increase number of line sorted
							nb_line_tSortRow_1_SortIn++;

							/**
							 * [tSortRow_1_SortIn begin ] stop
							 */
							/**
							 * [tSortRow_1_SortIn main ] start
							 */

							currentComponent = "tSortRow_1_SortIn";

							tos_count_tSortRow_1_SortIn++;

							/**
							 * [tSortRow_1_SortIn main ] stop
							 */

							/**
							 * [tJavaRow_7 main ] start
							 */

							currentComponent = "tJavaRow_7";

							// Code generated according to input schema and
							// output schema
							row5.TStaDetail_Dat = row3.TStaDetail_Dat;
							row5.TArt_Cod = row3.TArt_Cod;

							// on détermine le nombre de jour entre le
							// 01.01.2000 et la date de vente
							Long Age_row;
							Age_row = TalendDate.diffDate(row3.TStaDetail_Dat,
									context.BigBang, "dd");
							row5.Age_row = Age_row;

							// on détermine le nombre de jour entre le
							// 01.01.2000 et les dates balises

							Date Debut_n;
							Date Debut_n1;
							Date Fin_n;
							Date Fin_n1;
							Debut_n = TalendDate.parseDate(
									"dd/MM/yyyy HH:mm:ss", context.Debut_n);
							Debut_n1 = TalendDate.parseDate(
									"dd/MM/yyyy HH:mm:ss", context.Debut_n1);
							Fin_n = TalendDate.parseDate("dd/MM/yyyy HH:mm:ss",
									context.Fin_n);
							Fin_n1 = TalendDate.parseDate(
									"dd/MM/yyyy HH:mm:ss", context.Fin_n1);

							Long Age_debut_n;
							Long Age_debut_n1;
							Long Age_fin_n;
							Long Age_fin_n1;

							Age_debut_n = TalendDate.diffDate(Debut_n,
									context.BigBang, "dd");
							Age_debut_n1 = TalendDate.diffDate(Debut_n1,
									context.BigBang, "dd");
							Age_fin_n = TalendDate.diffDate(Fin_n,
									context.BigBang, "dd");
							Age_fin_n1 = TalendDate.diffDate(Fin_n1,
									context.BigBang, "dd");

							if (Age_row <= Age_fin_n1) {
								row5.Periode_n_1 = Age_row;
							} else {
								row5.Periode_n_1 = null;
							}

							if (Age_row >= Age_debut_n) {
								row5.Periode_n = Age_row;
							} else {
								row5.Periode_n = null;
							}

							// Tri des ventes par période

							if (row3.TStaDetail_Dat.before(Fin_n1)) {
								row5.Ventes_n_1 = row3.TStaDetail_BstEinh.abs();
							} else {
								row5.Ventes_n_1 = context.BD_0;
							}

							if (row3.TStaDetail_Dat.after(Debut_n)) {
								row5.Ventes_n = row3.TStaDetail_BstEinh.abs();
							} else {
								row5.Ventes_n = context.BD_0;
							}

							nb_line_tJavaRow_7++;

							tos_count_tJavaRow_7++;

							/**
							 * [tJavaRow_7 main ] stop
							 */

							/**
							 * [tAggregateRow_2_AGGOUT main ] start
							 */

							currentComponent = "tAggregateRow_2_AGGOUT";

							operation_finder_tAggregateRow_2.TArt_Cod = row5.TArt_Cod;

							operation_finder_tAggregateRow_2.hashCodeDirty = true;

							operation_result_tAggregateRow_2 = hash_tAggregateRow_2
									.get(operation_finder_tAggregateRow_2);

							boolean isFirstAdd_tAggregateRow_2 = false;

							if (operation_result_tAggregateRow_2 == null) { // G_OutMain_AggR_001

								operation_result_tAggregateRow_2 = new AggOperationStruct_tAggregateRow_2();

								operation_result_tAggregateRow_2.TArt_Cod = operation_finder_tAggregateRow_2.TArt_Cod;

								isFirstAdd_tAggregateRow_2 = true;

								hash_tAggregateRow_2.put(
										operation_result_tAggregateRow_2,
										operation_result_tAggregateRow_2);

							} // G_OutMain_AggR_001

							if (row5.Periode_n_1 != null) { // G_OutMain_AggR_546

								if (operation_result_tAggregateRow_2.start_Periode_n_1_min == null
										|| row5.Periode_n_1 < operation_result_tAggregateRow_2.start_Periode_n_1_min

								) {
									operation_result_tAggregateRow_2.start_Periode_n_1_min = row5.Periode_n_1;
								}

							} // G_OutMain_AggR_546

							if (row5.Periode_n_1 != null) { // G_OutMain_AggR_546

								if (operation_result_tAggregateRow_2.end_Periode_n_1_max == null
										|| row5.Periode_n_1 > operation_result_tAggregateRow_2.end_Periode_n_1_max

								) {
									operation_result_tAggregateRow_2.end_Periode_n_1_max = row5.Periode_n_1;
								}

							} // G_OutMain_AggR_546

							if (row5.Periode_n != null) { // G_OutMain_AggR_546

								if (operation_result_tAggregateRow_2.start_Periode_n_min == null
										|| row5.Periode_n < operation_result_tAggregateRow_2.start_Periode_n_min

								) {
									operation_result_tAggregateRow_2.start_Periode_n_min = row5.Periode_n;
								}

							} // G_OutMain_AggR_546

							if (row5.Periode_n != null) { // G_OutMain_AggR_546

								if (operation_result_tAggregateRow_2.end_Periode_n_max == null
										|| row5.Periode_n > operation_result_tAggregateRow_2.end_Periode_n_max

								) {
									operation_result_tAggregateRow_2.end_Periode_n_max = row5.Periode_n;
								}

							} // G_OutMain_AggR_546

							if (row5.Ventes_n_1 != null) { // G_OutMain_AggR_546

								if (operation_result_tAggregateRow_2.Ventes_n_1_sum == null) {
									operation_result_tAggregateRow_2.Ventes_n_1_sum = new BigDecimal(
											0);
								}
								operation_result_tAggregateRow_2.Ventes_n_1_sum = operation_result_tAggregateRow_2.Ventes_n_1_sum
										.add(new BigDecimal(String
												.valueOf(row5.Ventes_n_1)));

							} // G_OutMain_AggR_546

							if (row5.Ventes_n != null) { // G_OutMain_AggR_546

								if (operation_result_tAggregateRow_2.Ventes_n_sum == null) {
									operation_result_tAggregateRow_2.Ventes_n_sum = new BigDecimal(
											0);
								}
								operation_result_tAggregateRow_2.Ventes_n_sum = operation_result_tAggregateRow_2.Ventes_n_sum
										.add(new BigDecimal(String
												.valueOf(row5.Ventes_n)));

							} // G_OutMain_AggR_546

							tos_count_tAggregateRow_2_AGGOUT++;

							/**
							 * [tAggregateRow_2_AGGOUT main ] stop
							 */

							/**
							 * [tSortRow_1_SortIn end ] start
							 */

							currentComponent = "tSortRow_1_SortIn";

						}

						globalMap.put("tSortRow_1_SortIn_NB_LINE",
								nb_line_tSortRow_1_SortIn);

						ok_Hash.put("tSortRow_1_SortIn", true);
						end_Hash.put("tSortRow_1_SortIn", System
								.currentTimeMillis());

						/**
						 * [tSortRow_1_SortIn end ] stop
						 */

						/**
						 * [tJavaRow_7 end ] start
						 */

						currentComponent = "tJavaRow_7";

						globalMap.put("tJavaRow_7_NB_LINE", nb_line_tJavaRow_7);

						ok_Hash.put("tJavaRow_7", true);
						end_Hash.put("tJavaRow_7", System.currentTimeMillis());

						/**
						 * [tJavaRow_7 end ] stop
						 */

						/**
						 * [tAggregateRow_2_AGGOUT end ] start
						 */

						currentComponent = "tAggregateRow_2_AGGOUT";

						ok_Hash.put("tAggregateRow_2_AGGOUT", true);
						end_Hash.put("tAggregateRow_2_AGGOUT", System
								.currentTimeMillis());

						/**
						 * [tAggregateRow_2_AGGOUT end ] stop
						 */

						/**
						 * [tFileOutputDelimited_4 begin ] start
						 */

						ok_Hash.put("tFileOutputDelimited_4", false);
						start_Hash.put("tFileOutputDelimited_4", System
								.currentTimeMillis());
						currentComponent = "tFileOutputDelimited_4";

						int tos_count_tFileOutputDelimited_4 = 0;

						String fileName_tFileOutputDelimited_4 = (new java.io.File(
								context.RepIni + "extract" + context.ShoppiID
										+ ".csv")).getAbsolutePath().replace(
								"\\", "/");
						String fullName_tFileOutputDelimited_4 = null;
						String extension_tFileOutputDelimited_4 = null;
						String directory_tFileOutputDelimited_4 = null;
						if ((fileName_tFileOutputDelimited_4.indexOf("/") != -1)) {
							if (fileName_tFileOutputDelimited_4
									.lastIndexOf(".") < fileName_tFileOutputDelimited_4
									.lastIndexOf("/")) {
								fullName_tFileOutputDelimited_4 = fileName_tFileOutputDelimited_4;
								extension_tFileOutputDelimited_4 = "";
							} else {
								fullName_tFileOutputDelimited_4 = fileName_tFileOutputDelimited_4
										.substring(0,
												fileName_tFileOutputDelimited_4
														.lastIndexOf("."));
								extension_tFileOutputDelimited_4 = fileName_tFileOutputDelimited_4
										.substring(fileName_tFileOutputDelimited_4
												.lastIndexOf("."));
							}
							directory_tFileOutputDelimited_4 = fileName_tFileOutputDelimited_4
									.substring(0,
											fileName_tFileOutputDelimited_4
													.lastIndexOf("/"));
						} else {
							if (fileName_tFileOutputDelimited_4
									.lastIndexOf(".") != -1) {
								fullName_tFileOutputDelimited_4 = fileName_tFileOutputDelimited_4
										.substring(0,
												fileName_tFileOutputDelimited_4
														.lastIndexOf("."));
								extension_tFileOutputDelimited_4 = fileName_tFileOutputDelimited_4
										.substring(fileName_tFileOutputDelimited_4
												.lastIndexOf("."));
							} else {
								fullName_tFileOutputDelimited_4 = fileName_tFileOutputDelimited_4;
								extension_tFileOutputDelimited_4 = "";
							}
							directory_tFileOutputDelimited_4 = "";
						}

						int nb_line_tFileOutputDelimited_4 = 0;
						int splitEvery_tFileOutputDelimited_4 = 1000;
						int splitedFileNo_tFileOutputDelimited_4 = 0;
						int currentRow_tFileOutputDelimited_4 = 0;

						final String OUT_DELIM_tFileOutputDelimited_4 = /**
						 * Start
						 * field tFileOutputDelimited_4:FIELDSEPARATOR
						 */
						";"/** End field tFileOutputDelimited_4:FIELDSEPARATOR */
						;

						final String OUT_DELIM_ROWSEP_tFileOutputDelimited_4 = /**
						 * 
						 * Start field tFileOutputDelimited_4:ROWSEPARATOR
						 */
						"\n"/** End field tFileOutputDelimited_4:ROWSEPARATOR */
						;

						// create directory only if not exists
						if (directory_tFileOutputDelimited_4 != null
								&& directory_tFileOutputDelimited_4.trim()
										.length() != 0) {
							java.io.File dir_tFileOutputDelimited_4 = new java.io.File(
									directory_tFileOutputDelimited_4);
							if (!dir_tFileOutputDelimited_4.exists()) {
								dir_tFileOutputDelimited_4.mkdirs();
							}
						}

						// routines.system.Row
						java.io.Writer outtFileOutputDelimited_4 = new java.io.BufferedWriter(
								new java.io.OutputStreamWriter(
										new java.io.FileOutputStream(
												fileName_tFileOutputDelimited_4,
												true), "ISO-8859-15"));
						java.io.File filetFileOutputDelimited_4 = new java.io.File(
								fileName_tFileOutputDelimited_4);

						if (filetFileOutputDelimited_4.length() == 0) {

							outtFileOutputDelimited_4.write("TArt_Cod");

							outtFileOutputDelimited_4
									.write(OUT_DELIM_tFileOutputDelimited_4);

							outtFileOutputDelimited_4.write("Ventes_n_1");

							outtFileOutputDelimited_4
									.write(OUT_DELIM_tFileOutputDelimited_4);

							outtFileOutputDelimited_4.write("Ventes_n");

							outtFileOutputDelimited_4
									.write(OUT_DELIM_tFileOutputDelimited_4);

							outtFileOutputDelimited_4
									.write("start_Periode_n_1");

							outtFileOutputDelimited_4
									.write(OUT_DELIM_tFileOutputDelimited_4);

							outtFileOutputDelimited_4.write("end_Periode_n_1");

							outtFileOutputDelimited_4
									.write(OUT_DELIM_tFileOutputDelimited_4);

							outtFileOutputDelimited_4.write("life_n_1");

							outtFileOutputDelimited_4
									.write(OUT_DELIM_tFileOutputDelimited_4);

							outtFileOutputDelimited_4.write("start_Periode_n");

							outtFileOutputDelimited_4
									.write(OUT_DELIM_tFileOutputDelimited_4);

							outtFileOutputDelimited_4.write("end_Periode_n");

							outtFileOutputDelimited_4
									.write(OUT_DELIM_tFileOutputDelimited_4);

							outtFileOutputDelimited_4.write("life_n");

							outtFileOutputDelimited_4
									.write(OUT_DELIM_tFileOutputDelimited_4);

							outtFileOutputDelimited_4.write("Koef");

							outtFileOutputDelimited_4
									.write(OUT_DELIM_ROWSEP_tFileOutputDelimited_4);
						}

						/**
						 * [tFileOutputDelimited_4 begin ] stop
						 */

						/**
						 * [tJavaRow_11 begin ] start
						 */

						ok_Hash.put("tJavaRow_11", false);
						start_Hash.put("tJavaRow_11", System
								.currentTimeMillis());
						currentComponent = "tJavaRow_11";

						int tos_count_tJavaRow_11 = 0;

						int nb_line_tJavaRow_11 = 0;

						/**
						 * [tJavaRow_11 begin ] stop
						 */

						/**
						 * [tJavaRow_9 begin ] start
						 */

						ok_Hash.put("tJavaRow_9", false);
						start_Hash
								.put("tJavaRow_9", System.currentTimeMillis());
						currentComponent = "tJavaRow_9";

						int tos_count_tJavaRow_9 = 0;

						int nb_line_tJavaRow_9 = 0;

						/**
						 * [tJavaRow_9 begin ] stop
						 */

						/**
						 * [tAggregateRow_2_AGGIN begin ] start
						 */

						ok_Hash.put("tAggregateRow_2_AGGIN", false);
						start_Hash.put("tAggregateRow_2_AGGIN", System
								.currentTimeMillis());
						currentComponent = "tAggregateRow_2_AGGIN";

						int tos_count_tAggregateRow_2_AGGIN = 0;

						java.util.Collection<AggOperationStruct_tAggregateRow_2> values_tAggregateRow_2 = hash_tAggregateRow_2
								.values();

						globalMap.put("tAggregateRow_2_NB_LINE",
								values_tAggregateRow_2.size());

						for (AggOperationStruct_tAggregateRow_2 aggregated_row_tAggregateRow_2 : values_tAggregateRow_2) { // G_AggR_600

							/**
							 * [tAggregateRow_2_AGGIN begin ] stop
							 */
							/**
							 * [tAggregateRow_2_AGGIN main ] start
							 */

							currentComponent = "tAggregateRow_2_AGGIN";

							row14.TArt_Cod = aggregated_row_tAggregateRow_2.TArt_Cod;
							row14.Ventes_n_1 = aggregated_row_tAggregateRow_2.Ventes_n_1_sum;
							row14.Ventes_n = aggregated_row_tAggregateRow_2.Ventes_n_sum;

							row14.start_Periode_n_1 = aggregated_row_tAggregateRow_2.start_Periode_n_1_min;
							row14.end_Periode_n_1 = aggregated_row_tAggregateRow_2.end_Periode_n_1_max;
							row14.start_Periode_n = aggregated_row_tAggregateRow_2.start_Periode_n_min;
							row14.end_Periode_n = aggregated_row_tAggregateRow_2.end_Periode_n_max;

							tos_count_tAggregateRow_2_AGGIN++;

							/**
							 * [tAggregateRow_2_AGGIN main ] stop
							 */

							/**
							 * [tJavaRow_9 main ] start
							 */

							currentComponent = "tJavaRow_9";

							BigDecimal BD_0 = new BigDecimal(0,
									java.math.MathContext.DECIMAL32);
							BigDecimal BD_1 = new BigDecimal(1,
									java.math.MathContext.DECIMAL32);
							BigDecimal $Ventes = row14.Ventes_n_1; // La somme
																	// des
																	// ventes
																	// issues de
																	// TKStat_Detail
							BigDecimal Ventes_n_1; // Valeur en sortie
							BigDecimal Ventes_n;
							Long Start_n_1;
							Long End_n_1;
							Long Start_n;
							Long End_n;
							Long Life_n_1;
							Long Life_n;
							BigDecimal VM_n;
							BigDecimal VM_n_1;

							row15.TArt_Cod = row14.TArt_Cod;

							// Suppression des case vides => si vide alors 1
							// Période ventes n-1
							if ($Ventes == null) // Test si la somme des ventes
													// n-1 est vide
							{
								Ventes_n_1 = BD_1; // Alors valeur en sortie = 1
							} else // Sinon
							{
								if ($Ventes.floatValue() == BD_0.floatValue()) // On
																				// teste
																				// si
																				// la
																				// somme
																				// des
																				// ventes
																				// n-1
																				// est
																				// =
																				// à
																				// 0
								{
									Ventes_n_1 = BD_1; // Alors valeur en sortie
														// = 1
								} else // Sinon
								{
									Ventes_n_1 = $Ventes; // Valeur en sortie =
															// somme des ventes
								}
							}
							row15.Ventes_n_1 = Ventes_n_1;

							// Ventes n
							if (row14.Ventes_n == null) {
								Ventes_n = context.BD_1;
							} else {
								if (row14.Ventes_n == context.BD_0) {
									Ventes_n = context.BD_1;
								} else {
									Ventes_n = row14.Ventes_n;
								}
							}
							row15.Ventes_n = Ventes_n;

							// Calcul des périodes
							// début période n-1
							if (row14.start_Periode_n_1 == null) {
								Start_n_1 = context.Long_1;
							} else {
								Start_n_1 = row14.start_Periode_n_1;
							}
							row15.start_Periode_n_1 = Start_n_1;

							// fin période n-1
							if (row14.end_Periode_n_1 == null) {
								End_n_1 = context.Long_1;
							} else {
								End_n_1 = row14.end_Periode_n_1;
							}
							row15.end_Periode_n_1 = End_n_1;

							// Calcul durée de vie de l'article en n-1
							Life_n_1 = (End_n_1 - Start_n_1) + context.Long_1;

							// début période n
							if (row14.start_Periode_n == null) {
								Start_n = context.Long_1;
							} else {
								Start_n = row14.start_Periode_n;
							}
							row15.start_Periode_n = Start_n;

							// fin période n
							if (row14.end_Periode_n == null) {
								End_n = context.Long_1;
							} else {
								End_n = row14.end_Periode_n;
							}
							row15.end_Periode_n = End_n;

							// Calcul durée de vie de l'article en n
							Life_n = (End_n - Start_n) + context.Long_1;

							if (Life_n_1 == context.Long_0) {
								Life_n_1 = context.Long_1;
							} else {
								Life_n_1 = Life_n_1;
							}

							if (Life_n == context.Long_0) {
								Life_n = context.Long_1;
							} else {
								Life_n = Life_n;
							}

							VM_n_1 = Ventes_n_1.divide(
									new BigDecimal(Life_n_1),
									java.math.MathContext.DECIMAL32);
							VM_n = Ventes_n.divide(new BigDecimal(Life_n),
									java.math.MathContext.DECIMAL32);

							// On vérifie que la vente moyenne n-1 n'est pas
							// égale à 0
							if (VM_n_1.floatValue() == BD_0.floatValue()) {
								VM_n_1 = BD_1;
							} else {
								VM_n_1 = VM_n_1;
							}

							if (VM_n == context.BD_0) {
								VM_n = context.BD_1;
							} else {
								VM_n = VM_n;
							}

							// Calcul du coef
							BigDecimal Koef;
							Koef = (VM_n.divide(VM_n_1,
									java.math.MathContext.DECIMAL32))
									.add(context.Markup);

							// Limitation du coef à 2,05
							Integer Limit;
							Limit = Koef.compareTo(context.coef_limit);

							if (Limit == 1) {
								row15.Koef = context.coef_limit;
							} else {
								row15.Koef = Koef;
							}
							row15.life_n = Life_n;
							row15.life_n_1 = Life_n_1;
							nb_line_tJavaRow_9++;

							tos_count_tJavaRow_9++;

							/**
							 * [tJavaRow_9 main ] stop
							 */

							/**
							 * [tJavaRow_11 main ] start
							 */

							currentComponent = "tJavaRow_11";

							BigDecimal Koef_Val;
							// Code generated according to input schema and
							// output schema
							row16.TArt_Cod = row15.TArt_Cod;

							// Si le nombre de jour de vente sur la période n-1
							// < qu'un certain nombre de jour, le coef injecté
							// sera ramené à 1

							if (row15.life_n_1 < context.min_life) {
								Koef_Val = context.BD_105;
							} else {
								if (row15.life_n < context.min_life) {
									Koef_Val = context.BD_105;
								} else {
									Koef_Val = row15.Koef;
								}

							}
							row16.Koef = Koef_Val;

							row16.Ventes_n_1 = row15.Ventes_n_1;
							row16.Ventes_n = row15.Ventes_n;
							row16.start_Periode_n_1 = row15.start_Periode_n_1;
							row16.end_Periode_n_1 = row15.end_Periode_n_1;
							row16.life_n_1 = row15.life_n_1;
							row16.start_Periode_n = row15.start_Periode_n;
							row16.end_Periode_n = row15.end_Periode_n;
							row16.life_n = row15.life_n;

							nb_line_tJavaRow_11++;

							tos_count_tJavaRow_11++;

							/**
							 * [tJavaRow_11 main ] stop
							 */

							/**
							 * [tFileOutputDelimited_4 main ] start
							 */

							currentComponent = "tFileOutputDelimited_4";

							StringBuilder sb_tFileOutputDelimited_4 = new StringBuilder();

							if (row16.TArt_Cod != null) {

								sb_tFileOutputDelimited_4.append(

								row16.TArt_Cod

								);

							}

							sb_tFileOutputDelimited_4
									.append(OUT_DELIM_tFileOutputDelimited_4);

							if (row16.Ventes_n_1 != null) {

								sb_tFileOutputDelimited_4.append(

								row16.Ventes_n_1

								);

							}

							sb_tFileOutputDelimited_4
									.append(OUT_DELIM_tFileOutputDelimited_4);

							if (row16.Ventes_n != null) {

								sb_tFileOutputDelimited_4.append(

								row16.Ventes_n

								);

							}

							sb_tFileOutputDelimited_4
									.append(OUT_DELIM_tFileOutputDelimited_4);

							if (row16.start_Periode_n_1 != null) {

								sb_tFileOutputDelimited_4.append(

								row16.start_Periode_n_1

								);

							}

							sb_tFileOutputDelimited_4
									.append(OUT_DELIM_tFileOutputDelimited_4);

							if (row16.end_Periode_n_1 != null) {

								sb_tFileOutputDelimited_4.append(

								row16.end_Periode_n_1

								);

							}

							sb_tFileOutputDelimited_4
									.append(OUT_DELIM_tFileOutputDelimited_4);

							if (row16.life_n_1 != null) {

								sb_tFileOutputDelimited_4.append(

								row16.life_n_1

								);

							}

							sb_tFileOutputDelimited_4
									.append(OUT_DELIM_tFileOutputDelimited_4);

							if (row16.start_Periode_n != null) {

								sb_tFileOutputDelimited_4.append(

								row16.start_Periode_n

								);

							}

							sb_tFileOutputDelimited_4
									.append(OUT_DELIM_tFileOutputDelimited_4);

							if (row16.end_Periode_n != null) {

								sb_tFileOutputDelimited_4.append(

								row16.end_Periode_n

								);

							}

							sb_tFileOutputDelimited_4
									.append(OUT_DELIM_tFileOutputDelimited_4);

							if (row16.life_n != null) {

								sb_tFileOutputDelimited_4.append(

								row16.life_n

								);

							}

							sb_tFileOutputDelimited_4
									.append(OUT_DELIM_tFileOutputDelimited_4);

							if (row16.Koef != null) {

								sb_tFileOutputDelimited_4.append(

								row16.Koef

								);

							}

							sb_tFileOutputDelimited_4
									.append(OUT_DELIM_ROWSEP_tFileOutputDelimited_4);

							nb_line_tFileOutputDelimited_4++;

							outtFileOutputDelimited_4
									.write(sb_tFileOutputDelimited_4.toString());

							tos_count_tFileOutputDelimited_4++;

							/**
							 * [tFileOutputDelimited_4 main ] stop
							 */

							/**
							 * [tAggregateRow_2_AGGIN end ] start
							 */

							currentComponent = "tAggregateRow_2_AGGIN";

						} // G_AggR_600

						ok_Hash.put("tAggregateRow_2_AGGIN", true);
						end_Hash.put("tAggregateRow_2_AGGIN", System
								.currentTimeMillis());

						/**
						 * [tAggregateRow_2_AGGIN end ] stop
						 */

						/**
						 * [tJavaRow_9 end ] start
						 */

						currentComponent = "tJavaRow_9";

						globalMap.put("tJavaRow_9_NB_LINE", nb_line_tJavaRow_9);

						ok_Hash.put("tJavaRow_9", true);
						end_Hash.put("tJavaRow_9", System.currentTimeMillis());

						/**
						 * [tJavaRow_9 end ] stop
						 */

						/**
						 * [tJavaRow_11 end ] start
						 */

						currentComponent = "tJavaRow_11";

						globalMap.put("tJavaRow_11_NB_LINE",
								nb_line_tJavaRow_11);

						ok_Hash.put("tJavaRow_11", true);
						end_Hash.put("tJavaRow_11", System.currentTimeMillis());

						/**
						 * [tJavaRow_11 end ] stop
						 */

						/**
						 * [tFileOutputDelimited_4 end ] start
						 */

						currentComponent = "tFileOutputDelimited_4";

						outtFileOutputDelimited_4.close();
						globalMap.put("tFileOutputDelimited_4_NB_LINE",
								nb_line_tFileOutputDelimited_4);

						ok_Hash.put("tFileOutputDelimited_4", true);
						end_Hash.put("tFileOutputDelimited_4", System
								.currentTimeMillis());

						/**
						 * [tFileOutputDelimited_4 end ] stop
						 */

					} // End of branch "row9"

					/**
					 * [tFileInputDelimited_1 end ] start
					 */

					currentComponent = "tFileInputDelimited_1";

				}
				if (!((Object) (context.RepIni + "articles_extract"
						+ context.ShoppiID + ".csv") instanceof java.io.InputStream)) {
					fid_tFileInputDelimited_1.close();
				}
				globalMap.put("tFileInputDelimited_1_NB_LINE",
						fid_tFileInputDelimited_1.getRowNumber());

				ok_Hash.put("tFileInputDelimited_1", true);
				end_Hash.put("tFileInputDelimited_1", System
						.currentTimeMillis());

				/**
				 * [tFileInputDelimited_1 end ] stop
				 */

				/**
				 * [tJavaRow_6 end ] start
				 */

				currentComponent = "tJavaRow_6";

				globalMap.put("tJavaRow_6_NB_LINE", nb_line_tJavaRow_6);

				ok_Hash.put("tJavaRow_6", true);
				end_Hash.put("tJavaRow_6", System.currentTimeMillis());

				/**
				 * [tJavaRow_6 end ] stop
				 */

				/**
				 * [tFlowToIterate_2 end ] start
				 */

				currentComponent = "tFlowToIterate_2";

				globalMap.put("tFlowToIterate_2_NB_LINE",
						nb_line_tFlowToIterate_2);

				ok_Hash.put("tFlowToIterate_2", true);
				end_Hash.put("tFlowToIterate_2", System.currentTimeMillis());

				/**
				 * [tFlowToIterate_2 end ] stop
				 */

				globalResumeTicket = true;

			}// end the resume

			if (resumeEntryMethodName == null || globalResumeTicket) {
				resumeUtil
						.addLog(
								"CHECKPOINT",
								"CONNECTION:SUBJOB_OK:tFileInputDelimited_1:OnSubjobOk",
								"", Thread.currentThread().getId() + "", "",
								"", "", "");
			}

			tFileInputDelimited_2Process(globalMap);

		} catch (Exception e) {

			throw new TalendException(e, currentComponent, globalMap);

		}

		finally {
			// free memory for "tAggregateRow_2_AGGIN"
			globalMap.put("tAggregateRow_2", null);

			// free memory for "tSortRow_1_SortIn"
			globalMap.put("tSortRow_1", null);

		}

		globalMap.put("tFileInputDelimited_1_SUBPROCESS_STATE", 1);
	}

	public static class row7Struct implements
			routines.system.IPersistableRow<row7Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public BigDecimal TArt_KoefProgVkf;

		public BigDecimal getTArt_KoefProgVkf() {
			return this.TArt_KoefProgVkf;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					this.TArt_KoefProgVkf = (BigDecimal) dis.readObject();

				} catch (IOException e) {
					throw new RuntimeException(e);

				} catch (ClassNotFoundException eCNFE) {
					throw new RuntimeException(eCNFE);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// BigDecimal

				dos.writeObject(this.TArt_KoefProgVkf);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("TArt_KoefProgVkf");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_KoefProgVkf));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row7Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class row21Struct implements
			routines.system.IPersistableRow<row21Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public BigDecimal TArt_KoefProgVkf;

		public BigDecimal getTArt_KoefProgVkf() {
			return this.TArt_KoefProgVkf;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					this.TArt_KoefProgVkf = (BigDecimal) dis.readObject();

				} catch (IOException e) {
					throw new RuntimeException(e);

				} catch (ClassNotFoundException eCNFE) {
					throw new RuntimeException(eCNFE);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// BigDecimal

				dos.writeObject(this.TArt_KoefProgVkf);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("TArt_KoefProgVkf");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_KoefProgVkf));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row21Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class out3Struct implements
			routines.system.IPersistableRow<out3Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public BigDecimal TArt_KoefProgVkf;

		public BigDecimal getTArt_KoefProgVkf() {
			return this.TArt_KoefProgVkf;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					this.TArt_KoefProgVkf = (BigDecimal) dis.readObject();

				} catch (IOException e) {
					throw new RuntimeException(e);

				} catch (ClassNotFoundException eCNFE) {
					throw new RuntimeException(eCNFE);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// BigDecimal

				dos.writeObject(this.TArt_KoefProgVkf);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("TArt_KoefProgVkf");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_KoefProgVkf));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(out3Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public static class row2Struct implements
			routines.system.IPersistableRow<row2Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public String TArt_Cod;

		public String getTArt_Cod() {
			return this.TArt_Cod;
		}

		public BigDecimal Ventes_n_1;

		public BigDecimal getVentes_n_1() {
			return this.Ventes_n_1;
		}

		public BigDecimal Ventes_n;

		public BigDecimal getVentes_n() {
			return this.Ventes_n;
		}

		public Long start_Periode_n_1;

		public Long getStart_Periode_n_1() {
			return this.start_Periode_n_1;
		}

		public Long end_Periode_n_1;

		public Long getEnd_Periode_n_1() {
			return this.end_Periode_n_1;
		}

		public Long life_n_1;

		public Long getLife_n_1() {
			return this.life_n_1;
		}

		public Long start_Periode_n;

		public Long getStart_Periode_n() {
			return this.start_Periode_n;
		}

		public Long end_Periode_n;

		public Long getEnd_Periode_n() {
			return this.end_Periode_n;
		}

		public Long life_n;

		public Long getLife_n() {
			return this.life_n;
		}

		public BigDecimal Koef;

		public BigDecimal getKoef() {
			return this.Koef;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readInt();
					if (length == -1) {
						this.TArt_Cod = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.TArt_Cod = new String(commonByteArray, 0, length);
					}

					this.Ventes_n_1 = (BigDecimal) dis.readObject();

					this.Ventes_n = (BigDecimal) dis.readObject();

					length = dis.readByte();
					if (length == -1) {
						this.start_Periode_n_1 = null;
					} else {
						this.start_Periode_n_1 = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.end_Periode_n_1 = null;
					} else {
						this.end_Periode_n_1 = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.life_n_1 = null;
					} else {
						this.life_n_1 = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.start_Periode_n = null;
					} else {
						this.start_Periode_n = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.end_Periode_n = null;
					} else {
						this.end_Periode_n = dis.readLong();
					}

					length = dis.readByte();
					if (length == -1) {
						this.life_n = null;
					} else {
						this.life_n = dis.readLong();
					}

					this.Koef = (BigDecimal) dis.readObject();

				} catch (IOException e) {
					throw new RuntimeException(e);

				} catch (ClassNotFoundException eCNFE) {
					throw new RuntimeException(eCNFE);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// String

				if (this.TArt_Cod == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.TArt_Cod.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// BigDecimal

				dos.writeObject(this.Ventes_n_1);

				// BigDecimal

				dos.writeObject(this.Ventes_n);

				// Long

				if (this.start_Periode_n_1 == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.start_Periode_n_1);
				}

				// Long

				if (this.end_Periode_n_1 == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.end_Periode_n_1);
				}

				// Long

				if (this.life_n_1 == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.life_n_1);
				}

				// Long

				if (this.start_Periode_n == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.start_Periode_n);
				}

				// Long

				if (this.end_Periode_n == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.end_Periode_n);
				}

				// Long

				if (this.life_n == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.life_n);
				}

				// BigDecimal

				dos.writeObject(this.Koef);

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("TArt_Cod");
			sb.append("=");
			sb.append(String.valueOf(this.TArt_Cod));

			sb.append(", ");

			sb.append("Ventes_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.Ventes_n_1));

			sb.append(", ");

			sb.append("Ventes_n");
			sb.append("=");
			sb.append(String.valueOf(this.Ventes_n));

			sb.append(", ");

			sb.append("start_Periode_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.start_Periode_n_1));

			sb.append(", ");

			sb.append("end_Periode_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.end_Periode_n_1));

			sb.append(", ");

			sb.append("life_n_1");
			sb.append("=");
			sb.append(String.valueOf(this.life_n_1));

			sb.append(", ");

			sb.append("start_Periode_n");
			sb.append("=");
			sb.append(String.valueOf(this.start_Periode_n));

			sb.append(", ");

			sb.append("end_Periode_n");
			sb.append("=");
			sb.append(String.valueOf(this.end_Periode_n));

			sb.append(", ");

			sb.append("life_n");
			sb.append("=");
			sb.append(String.valueOf(this.life_n));

			sb.append(", ");

			sb.append("Koef");
			sb.append("=");
			sb.append(String.valueOf(this.Koef));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row2Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tFileInputDelimited_2Process(
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		globalMap.put("tFileInputDelimited_2_SUBPROCESS_STATE", 0);

		String currentComponent = "";

		try {

			String currentMethodName = new Exception().getStackTrace()[0]
					.getMethodName();
			boolean resumeIt = currentMethodName.equals(resumeEntryMethodName);
			if (resumeEntryMethodName == null || resumeIt || globalResumeTicket) {// start
																					// the
																					// resume

				row2Struct row2 = new row2Struct();
				out3Struct out3 = new out3Struct();
				row7Struct row7 = new row7Struct();
				row21Struct row21 = new row21Struct();

				/**
				 * [tFileOutputDelimited_8 begin ] start
				 */

				ok_Hash.put("tFileOutputDelimited_8", false);
				start_Hash.put("tFileOutputDelimited_8", System
						.currentTimeMillis());
				currentComponent = "tFileOutputDelimited_8";

				int tos_count_tFileOutputDelimited_8 = 0;

				String fileName_tFileOutputDelimited_8 = (new java.io.File(
						context.RepIni + "adapt_coef_" + context.ShoppiID
								+ ".csv")).getAbsolutePath().replace("\\", "/");
				String fullName_tFileOutputDelimited_8 = null;
				String extension_tFileOutputDelimited_8 = null;
				String directory_tFileOutputDelimited_8 = null;
				if ((fileName_tFileOutputDelimited_8.indexOf("/") != -1)) {
					if (fileName_tFileOutputDelimited_8.lastIndexOf(".") < fileName_tFileOutputDelimited_8
							.lastIndexOf("/")) {
						fullName_tFileOutputDelimited_8 = fileName_tFileOutputDelimited_8;
						extension_tFileOutputDelimited_8 = "";
					} else {
						fullName_tFileOutputDelimited_8 = fileName_tFileOutputDelimited_8
								.substring(0, fileName_tFileOutputDelimited_8
										.lastIndexOf("."));
						extension_tFileOutputDelimited_8 = fileName_tFileOutputDelimited_8
								.substring(fileName_tFileOutputDelimited_8
										.lastIndexOf("."));
					}
					directory_tFileOutputDelimited_8 = fileName_tFileOutputDelimited_8
							.substring(0, fileName_tFileOutputDelimited_8
									.lastIndexOf("/"));
				} else {
					if (fileName_tFileOutputDelimited_8.lastIndexOf(".") != -1) {
						fullName_tFileOutputDelimited_8 = fileName_tFileOutputDelimited_8
								.substring(0, fileName_tFileOutputDelimited_8
										.lastIndexOf("."));
						extension_tFileOutputDelimited_8 = fileName_tFileOutputDelimited_8
								.substring(fileName_tFileOutputDelimited_8
										.lastIndexOf("."));
					} else {
						fullName_tFileOutputDelimited_8 = fileName_tFileOutputDelimited_8;
						extension_tFileOutputDelimited_8 = "";
					}
					directory_tFileOutputDelimited_8 = "";
				}

				int nb_line_tFileOutputDelimited_8 = 0;
				int splitEvery_tFileOutputDelimited_8 = 1000;
				int splitedFileNo_tFileOutputDelimited_8 = 0;
				int currentRow_tFileOutputDelimited_8 = 0;

				final String OUT_DELIM_tFileOutputDelimited_8 = /**
				 * Start field
				 * tFileOutputDelimited_8:FIELDSEPARATOR
				 */
				";"/** End field tFileOutputDelimited_8:FIELDSEPARATOR */
				;

				final String OUT_DELIM_ROWSEP_tFileOutputDelimited_8 = /**
				 * Start
				 * field tFileOutputDelimited_8:ROWSEPARATOR
				 */
				"\n"/** End field tFileOutputDelimited_8:ROWSEPARATOR */
				;

				// create directory only if not exists
				if (directory_tFileOutputDelimited_8 != null
						&& directory_tFileOutputDelimited_8.trim().length() != 0) {
					java.io.File dir_tFileOutputDelimited_8 = new java.io.File(
							directory_tFileOutputDelimited_8);
					if (!dir_tFileOutputDelimited_8.exists()) {
						dir_tFileOutputDelimited_8.mkdirs();
					}
				}

				// routines.system.Row
				java.io.Writer outtFileOutputDelimited_8 = new java.io.BufferedWriter(
						new java.io.OutputStreamWriter(
								new java.io.FileOutputStream(
										fileName_tFileOutputDelimited_8, false),
								"ISO-8859-15"));
				java.io.File filetFileOutputDelimited_8 = new java.io.File(
						fileName_tFileOutputDelimited_8);

				if (filetFileOutputDelimited_8.length() == 0) {

					outtFileOutputDelimited_8.write("TArt_Cod");

					outtFileOutputDelimited_8
							.write(OUT_DELIM_tFileOutputDelimited_8);

					outtFileOutputDelimited_8.write("TArt_KoefProgVkf");

					outtFileOutputDelimited_8
							.write(OUT_DELIM_ROWSEP_tFileOutputDelimited_8);
				}

				/**
				 * [tFileOutputDelimited_8 begin ] stop
				 */

				/**
				 * [tMSSqlOutput_1 begin ] start
				 */

				ok_Hash.put("tMSSqlOutput_1", false);
				start_Hash.put("tMSSqlOutput_1", System.currentTimeMillis());
				currentComponent = "tMSSqlOutput_1";

				int tos_count_tMSSqlOutput_1 = 0;

				int nb_line_tMSSqlOutput_1 = 0;
				int nb_line_update_tMSSqlOutput_1 = 0;
				int nb_line_inserted_tMSSqlOutput_1 = 0;
				int nb_line_deleted_tMSSqlOutput_1 = 0;

				int deletedCount_tMSSqlOutput_1 = 0;
				int updatedCount_tMSSqlOutput_1 = 0;
				int insertedCount_tMSSqlOutput_1 = 0;
				String dbschema_tMSSqlOutput_1 = null;
				String tableName_tMSSqlOutput_1 = null;
				boolean whetherReject_tMSSqlOutput_1 = false;

				int updateKeyCount_tMSSqlOutput_1 = 1;
				if (updateKeyCount_tMSSqlOutput_1 < 1) {
					throw new RuntimeException(
							"For update, Schema must have a key");
				}

				dbschema_tMSSqlOutput_1 = "";
				java.lang.Class.forName("net.sourceforge.jtds.jdbc.Driver");
				String port_tMSSqlOutput_1 = "1433";
				String dbname_tMSSqlOutput_1 = "WinLF1_" + context.ShoppiID;
				String url_tMSSqlOutput_1 = "jdbc:jtds:sqlserver://"
						+ context.SQLServeur;
				if (!"".equals(port_tMSSqlOutput_1)) {
					url_tMSSqlOutput_1 += ":" + "1433";
				}
				if (!"".equals(dbname_tMSSqlOutput_1)) {
					url_tMSSqlOutput_1 += "//" + "WinLF1_" + context.ShoppiID;
				}
				url_tMSSqlOutput_1 += ";appName=" + projectName + ";"
						+ "instance=INTEC";
				String dbUser_tMSSqlOutput_1 = "iedbuser";
				String dbPwd_tMSSqlOutput_1 = "intec";
				java.sql.Connection conn_tMSSqlOutput_1 = java.sql.DriverManager
						.getConnection(url_tMSSqlOutput_1,
								dbUser_tMSSqlOutput_1, dbPwd_tMSSqlOutput_1);
				conn_tMSSqlOutput_1.setAutoCommit(false);
				int commitEvery_tMSSqlOutput_1 = 10000;
				int commitCounter_tMSSqlOutput_1 = 0;

				int batchSize_tMSSqlOutput_1 = 10000;
				int batchSizeCounter_tMSSqlOutput_1 = 0;

				if (dbschema_tMSSqlOutput_1 == null
						|| dbschema_tMSSqlOutput_1.trim().length() == 0) {
					tableName_tMSSqlOutput_1 = "TArt";
				} else {
					tableName_tMSSqlOutput_1 = dbschema_tMSSqlOutput_1 + "].["
							+ "TArt";
				}
				String update_tMSSqlOutput_1 = "UPDATE ["
						+ tableName_tMSSqlOutput_1
						+ "] SET [TArt_KoefProgVkf] = ? WHERE [TArt_Cod] = ?";
				java.sql.PreparedStatement pstmt_tMSSqlOutput_1 = conn_tMSSqlOutput_1
						.prepareStatement(update_tMSSqlOutput_1);

				/**
				 * [tMSSqlOutput_1 begin ] stop
				 */

				/**
				 * [tReplicate_1 begin ] start
				 */

				ok_Hash.put("tReplicate_1", false);
				start_Hash.put("tReplicate_1", System.currentTimeMillis());
				currentComponent = "tReplicate_1";

				int tos_count_tReplicate_1 = 0;

				/**
				 * [tReplicate_1 begin ] stop
				 */

				/**
				 * [tMap_6 begin ] start
				 */

				ok_Hash.put("tMap_6", false);
				start_Hash.put("tMap_6", System.currentTimeMillis());
				currentComponent = "tMap_6";

				int tos_count_tMap_6 = 0;

				// ###############################
				// # Lookup's keys initialization
				// ###############################

				// ###############################
				// # Vars initialization
				// ###############################

				// ###############################
				// # Outputs initialization
				out3Struct out3_tmp = new out3Struct();
				// ###############################

				/**
				 * [tMap_6 begin ] stop
				 */

				/**
				 * [tFileInputDelimited_2 begin ] start
				 */

				ok_Hash.put("tFileInputDelimited_2", false);
				start_Hash.put("tFileInputDelimited_2", System
						.currentTimeMillis());
				currentComponent = "tFileInputDelimited_2";

				int tos_count_tFileInputDelimited_2 = 0;

				org.talend.fileprocess.FileInputDelimited fid_tFileInputDelimited_2 = new org.talend.fileprocess.FileInputDelimited(
						context.RepIni + "extract" + context.ShoppiID + ".csv",
						"ISO-8859-15", ";", "\n", true, 1, 0, -1, -1, false);
				while (fid_tFileInputDelimited_2.nextRecord()) {
					row2 = null;
					boolean whetherReject_tFileInputDelimited_2 = false;
					row2 = new row2Struct();
					try {
						String temp_tFileInputDelimited_2 = "";

						row2.TArt_Cod = fid_tFileInputDelimited_2.get(0);
						temp_tFileInputDelimited_2 = fid_tFileInputDelimited_2
								.get(1);
						if (temp_tFileInputDelimited_2.length() > 0) {
							row2.Ventes_n_1 = ParserUtils
									.parseTo_BigDecimal(temp_tFileInputDelimited_2);
						} else {
							row2.Ventes_n_1 = null;
						}
						temp_tFileInputDelimited_2 = fid_tFileInputDelimited_2
								.get(2);
						if (temp_tFileInputDelimited_2.length() > 0) {
							row2.Ventes_n = ParserUtils
									.parseTo_BigDecimal(temp_tFileInputDelimited_2);
						} else {
							row2.Ventes_n = null;
						}
						temp_tFileInputDelimited_2 = fid_tFileInputDelimited_2
								.get(3);
						if (temp_tFileInputDelimited_2.length() > 0) {
							row2.start_Periode_n_1 = ParserUtils
									.parseTo_Long(temp_tFileInputDelimited_2);
						} else {
							row2.start_Periode_n_1 = null;
						}
						temp_tFileInputDelimited_2 = fid_tFileInputDelimited_2
								.get(4);
						if (temp_tFileInputDelimited_2.length() > 0) {
							row2.end_Periode_n_1 = ParserUtils
									.parseTo_Long(temp_tFileInputDelimited_2);
						} else {
							row2.end_Periode_n_1 = null;
						}
						temp_tFileInputDelimited_2 = fid_tFileInputDelimited_2
								.get(5);
						if (temp_tFileInputDelimited_2.length() > 0) {
							row2.life_n_1 = ParserUtils
									.parseTo_Long(temp_tFileInputDelimited_2);
						} else {
							row2.life_n_1 = null;
						}
						temp_tFileInputDelimited_2 = fid_tFileInputDelimited_2
								.get(6);
						if (temp_tFileInputDelimited_2.length() > 0) {
							row2.start_Periode_n = ParserUtils
									.parseTo_Long(temp_tFileInputDelimited_2);
						} else {
							row2.start_Periode_n = null;
						}
						temp_tFileInputDelimited_2 = fid_tFileInputDelimited_2
								.get(7);
						if (temp_tFileInputDelimited_2.length() > 0) {
							row2.end_Periode_n = ParserUtils
									.parseTo_Long(temp_tFileInputDelimited_2);
						} else {
							row2.end_Periode_n = null;
						}
						temp_tFileInputDelimited_2 = fid_tFileInputDelimited_2
								.get(8);
						if (temp_tFileInputDelimited_2.length() > 0) {
							row2.life_n = ParserUtils
									.parseTo_Long(temp_tFileInputDelimited_2);
						} else {
							row2.life_n = null;
						}
						temp_tFileInputDelimited_2 = fid_tFileInputDelimited_2
								.get(9);
						if (temp_tFileInputDelimited_2.length() > 0) {
							row2.Koef = ParserUtils
									.parseTo_BigDecimal(temp_tFileInputDelimited_2);
						} else {
							row2.Koef = null;
						}

					} catch (Exception e) {
						whetherReject_tFileInputDelimited_2 = true;
						System.err.println(e.getMessage());
						row2 = null;
					}

					/**
					 * [tFileInputDelimited_2 begin ] stop
					 */
					/**
					 * [tFileInputDelimited_2 main ] start
					 */

					currentComponent = "tFileInputDelimited_2";

					tos_count_tFileInputDelimited_2++;

					/**
					 * [tFileInputDelimited_2 main ] stop
					 */
					// Start of branch "row2"
					if (row2 != null) {

						/**
						 * [tMap_6 main ] start
						 */

						currentComponent = "tMap_6";

						boolean hasCasePrimitiveKeyWithNull_tMap_6 = false;

						// ###############################
						// # Input tables (lookups)
						boolean rejectedInnerJoin_tMap_6 = false;
						boolean mainRowRejected_tMap_6 = false;

						// ###############################
						{ // start of Var scope

							// ###############################
							// # Vars tables
							// ###############################
							// ###############################
							// # Output tables

							out3 = null;

							// # Output table : 'out3'
							out3_tmp.TArt_Cod = row2.TArt_Cod;
							out3_tmp.TArt_KoefProgVkf = row2.Koef;
							out3 = out3_tmp;
							// ###############################

						} // end of Var scope

						rejectedInnerJoin_tMap_6 = false;

						tos_count_tMap_6++;

						/**
						 * [tMap_6 main ] stop
						 */
						// Start of branch "out3"
						if (out3 != null) {

							/**
							 * [tReplicate_1 main ] start
							 */

							currentComponent = "tReplicate_1";

							row7 = new row7Struct();

							row7.TArt_Cod = out3.TArt_Cod;
							row7.TArt_KoefProgVkf = out3.TArt_KoefProgVkf;
							row21 = new row21Struct();

							row21.TArt_Cod = out3.TArt_Cod;
							row21.TArt_KoefProgVkf = out3.TArt_KoefProgVkf;

							tos_count_tReplicate_1++;

							/**
							 * [tReplicate_1 main ] stop
							 */

							/**
							 * [tFileOutputDelimited_8 main ] start
							 */

							currentComponent = "tFileOutputDelimited_8";

							StringBuilder sb_tFileOutputDelimited_8 = new StringBuilder();

							if (row7.TArt_Cod != null) {

								sb_tFileOutputDelimited_8.append(

								row7.TArt_Cod

								);

							}

							sb_tFileOutputDelimited_8
									.append(OUT_DELIM_tFileOutputDelimited_8);

							if (row7.TArt_KoefProgVkf != null) {

								sb_tFileOutputDelimited_8.append(

								row7.TArt_KoefProgVkf

								);

							}

							sb_tFileOutputDelimited_8
									.append(OUT_DELIM_ROWSEP_tFileOutputDelimited_8);

							nb_line_tFileOutputDelimited_8++;

							outtFileOutputDelimited_8
									.write(sb_tFileOutputDelimited_8.toString());

							tos_count_tFileOutputDelimited_8++;

							/**
							 * [tFileOutputDelimited_8 main ] stop
							 */

							/**
							 * [tMSSqlOutput_1 main ] start
							 */

							currentComponent = "tMSSqlOutput_1";

							whetherReject_tMSSqlOutput_1 = false;
							pstmt_tMSSqlOutput_1.setBigDecimal(1,
									row21.TArt_KoefProgVkf);

							if (row21.TArt_Cod == null) {
								pstmt_tMSSqlOutput_1.setNull(2,
										java.sql.Types.VARCHAR);
							} else {
								pstmt_tMSSqlOutput_1.setString(2,
										row21.TArt_Cod);
							}

							pstmt_tMSSqlOutput_1.addBatch();
							nb_line_tMSSqlOutput_1++;

							batchSizeCounter_tMSSqlOutput_1++;

							if (batchSize_tMSSqlOutput_1 <= batchSizeCounter_tMSSqlOutput_1) {
								try {
									pstmt_tMSSqlOutput_1.executeBatch();

									updatedCount_tMSSqlOutput_1 += pstmt_tMSSqlOutput_1
											.getUpdateCount();

									batchSizeCounter_tMSSqlOutput_1 = 0;
								} catch (java.sql.BatchUpdateException e) {

									System.err.println(e.getMessage());

								}

							}

							commitCounter_tMSSqlOutput_1++;
							if (commitEvery_tMSSqlOutput_1 <= commitCounter_tMSSqlOutput_1) {

								try {
									pstmt_tMSSqlOutput_1.executeBatch();

									updatedCount_tMSSqlOutput_1 += pstmt_tMSSqlOutput_1
											.getUpdateCount();

								} catch (java.sql.BatchUpdateException e) {

									System.out.println(e.getMessage());

								}
								conn_tMSSqlOutput_1.commit();
								commitCounter_tMSSqlOutput_1 = 0;
							}

							tos_count_tMSSqlOutput_1++;

							/**
							 * [tMSSqlOutput_1 main ] stop
							 */

						} // End of branch "out3"

					} // End of branch "row2"

					/**
					 * [tFileInputDelimited_2 end ] start
					 */

					currentComponent = "tFileInputDelimited_2";

				}
				if (!((Object) (context.RepIni + "extract" + context.ShoppiID + ".csv") instanceof java.io.InputStream)) {
					fid_tFileInputDelimited_2.close();
				}
				globalMap.put("tFileInputDelimited_2_NB_LINE",
						fid_tFileInputDelimited_2.getRowNumber());

				ok_Hash.put("tFileInputDelimited_2", true);
				end_Hash.put("tFileInputDelimited_2", System
						.currentTimeMillis());

				/**
				 * [tFileInputDelimited_2 end ] stop
				 */

				/**
				 * [tMap_6 end ] start
				 */

				currentComponent = "tMap_6";

				// ###############################
				// # Lookup hashes releasing
				// ###############################

				ok_Hash.put("tMap_6", true);
				end_Hash.put("tMap_6", System.currentTimeMillis());

				/**
				 * [tMap_6 end ] stop
				 */

				/**
				 * [tReplicate_1 end ] start
				 */

				currentComponent = "tReplicate_1";

				ok_Hash.put("tReplicate_1", true);
				end_Hash.put("tReplicate_1", System.currentTimeMillis());

				/**
				 * [tReplicate_1 end ] stop
				 */

				/**
				 * [tFileOutputDelimited_8 end ] start
				 */

				currentComponent = "tFileOutputDelimited_8";

				outtFileOutputDelimited_8.close();
				globalMap.put("tFileOutputDelimited_8_NB_LINE",
						nb_line_tFileOutputDelimited_8);

				ok_Hash.put("tFileOutputDelimited_8", true);
				end_Hash.put("tFileOutputDelimited_8", System
						.currentTimeMillis());

				/**
				 * [tFileOutputDelimited_8 end ] stop
				 */

				/**
				 * [tMSSqlOutput_1 end ] start
				 */

				currentComponent = "tMSSqlOutput_1";

				try {
					pstmt_tMSSqlOutput_1.executeBatch();

					updatedCount_tMSSqlOutput_1 += pstmt_tMSSqlOutput_1
							.getUpdateCount();

				} catch (java.sql.BatchUpdateException e) {

					System.out.println(e.getMessage());

				}
				if (pstmt_tMSSqlOutput_1 != null) {
					pstmt_tMSSqlOutput_1.close();
				}

				conn_tMSSqlOutput_1.commit();
				conn_tMSSqlOutput_1.close();

				nb_line_deleted_tMSSqlOutput_1 = nb_line_deleted_tMSSqlOutput_1
						+ deletedCount_tMSSqlOutput_1;
				nb_line_update_tMSSqlOutput_1 = nb_line_update_tMSSqlOutput_1
						+ updatedCount_tMSSqlOutput_1;
				nb_line_inserted_tMSSqlOutput_1 = nb_line_inserted_tMSSqlOutput_1
						+ insertedCount_tMSSqlOutput_1;

				globalMap.put("tMSSqlOutput_1_NB_LINE", nb_line_tMSSqlOutput_1);
				globalMap.put("tMSSqlOutput_1_NB_LINE_UPDATED",
						nb_line_update_tMSSqlOutput_1);
				globalMap.put("tMSSqlOutput_1_NB_LINE_INSERTED",
						nb_line_inserted_tMSSqlOutput_1);
				globalMap.put("tMSSqlOutput_1_NB_LINE_DELETED",
						nb_line_deleted_tMSSqlOutput_1);

				ok_Hash.put("tMSSqlOutput_1", true);
				end_Hash.put("tMSSqlOutput_1", System.currentTimeMillis());

				/**
				 * [tMSSqlOutput_1 end ] stop
				 */

				globalResumeTicket = true;

			}// end the resume

		} catch (Exception e) {

			throw new TalendException(e, currentComponent, globalMap);

		}

		globalMap.put("tFileInputDelimited_2_SUBPROCESS_STATE", 1);
	}

	public static class row19Struct implements
			routines.system.IPersistableRow<row19Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public java.util.Date moment;

		public java.util.Date getMoment() {
			return this.moment;
		}

		public String pid;

		public String getPid() {
			return this.pid;
		}

		public String father_pid;

		public String getFather_pid() {
			return this.father_pid;
		}

		public String root_pid;

		public String getRoot_pid() {
			return this.root_pid;
		}

		public Long system_pid;

		public Long getSystem_pid() {
			return this.system_pid;
		}

		public String project;

		public String getProject() {
			return this.project;
		}

		public String job;

		public String getJob() {
			return this.job;
		}

		public String job_repository_id;

		public String getJob_repository_id() {
			return this.job_repository_id;
		}

		public String job_version;

		public String getJob_version() {
			return this.job_version;
		}

		public String context;

		public String getContext() {
			return this.context;
		}

		public String origin;

		public String getOrigin() {
			return this.origin;
		}

		public String message_type;

		public String getMessage_type() {
			return this.message_type;
		}

		public String message;

		public String getMessage() {
			return this.message;
		}

		public Long duration;

		public Long getDuration() {
			return this.duration;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readByte();
					if (length == -1) {
						this.moment = null;
					} else {
						this.moment = new Date(dis.readLong());
					}

					length = dis.readInt();
					if (length == -1) {
						this.pid = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.pid = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.father_pid = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.father_pid = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.root_pid = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.root_pid = new String(commonByteArray, 0, length);
					}

					length = dis.readByte();
					if (length == -1) {
						this.system_pid = null;
					} else {
						this.system_pid = dis.readLong();
					}

					length = dis.readInt();
					if (length == -1) {
						this.project = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.project = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.job = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.job = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.job_repository_id = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.job_repository_id = new String(commonByteArray, 0,
								length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.job_version = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.job_version = new String(commonByteArray, 0,
								length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.context = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.context = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.origin = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.origin = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.message_type = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.message_type = new String(commonByteArray, 0,
								length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.message = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.message = new String(commonByteArray, 0, length);
					}

					length = dis.readByte();
					if (length == -1) {
						this.duration = null;
					} else {
						this.duration = dis.readLong();
					}

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// java.util.Date

				if (this.moment == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.moment.getTime());
				}

				// String

				if (this.pid == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.pid.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.father_pid == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.father_pid.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.root_pid == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.root_pid.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// Long

				if (this.system_pid == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.system_pid);
				}

				// String

				if (this.project == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.project.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.job == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.job.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.job_repository_id == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.job_repository_id.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.job_version == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.job_version.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.context == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.context.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.origin == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.origin.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.message_type == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.message_type.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.message == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.message.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// Long

				if (this.duration == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.duration);
				}

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("moment");
			sb.append("=");
			sb.append(String.valueOf(this.moment));

			sb.append(", ");

			sb.append("pid");
			sb.append("=");
			sb.append(String.valueOf(this.pid));

			sb.append(", ");

			sb.append("father_pid");
			sb.append("=");
			sb.append(String.valueOf(this.father_pid));

			sb.append(", ");

			sb.append("root_pid");
			sb.append("=");
			sb.append(String.valueOf(this.root_pid));

			sb.append(", ");

			sb.append("system_pid");
			sb.append("=");
			sb.append(String.valueOf(this.system_pid));

			sb.append(", ");

			sb.append("project");
			sb.append("=");
			sb.append(String.valueOf(this.project));

			sb.append(", ");

			sb.append("job");
			sb.append("=");
			sb.append(String.valueOf(this.job));

			sb.append(", ");

			sb.append("job_repository_id");
			sb.append("=");
			sb.append(String.valueOf(this.job_repository_id));

			sb.append(", ");

			sb.append("job_version");
			sb.append("=");
			sb.append(String.valueOf(this.job_version));

			sb.append(", ");

			sb.append("context");
			sb.append("=");
			sb.append(String.valueOf(this.context));

			sb.append(", ");

			sb.append("origin");
			sb.append("=");
			sb.append(String.valueOf(this.origin));

			sb.append(", ");

			sb.append("message_type");
			sb.append("=");
			sb.append(String.valueOf(this.message_type));

			sb.append(", ");

			sb.append("message");
			sb.append("=");
			sb.append(String.valueOf(this.message));

			sb.append(", ");

			sb.append("duration");
			sb.append("=");
			sb.append(String.valueOf(this.duration));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row19Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tStatCatcher_1Process(
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		globalMap.put("tStatCatcher_1_SUBPROCESS_STATE", 0);

		String currentComponent = "";

		try {

			String currentMethodName = new Exception().getStackTrace()[0]
					.getMethodName();
			boolean resumeIt = currentMethodName.equals(resumeEntryMethodName);
			if (resumeEntryMethodName == null || resumeIt || globalResumeTicket) {// start
																					// the
																					// resume

				row19Struct row19 = new row19Struct();

				/**
				 * [tFileOutputDelimited_2 begin ] start
				 */

				ok_Hash.put("tFileOutputDelimited_2", false);
				start_Hash.put("tFileOutputDelimited_2", System
						.currentTimeMillis());
				currentComponent = "tFileOutputDelimited_2";

				int tos_count_tFileOutputDelimited_2 = 0;

				String fileName_tFileOutputDelimited_2 = (new java.io.File(
						"C:/Data/Shoppi/Ressources/Stat_Logs.csv"))
						.getAbsolutePath().replace("\\", "/");
				String fullName_tFileOutputDelimited_2 = null;
				String extension_tFileOutputDelimited_2 = null;
				String directory_tFileOutputDelimited_2 = null;
				if ((fileName_tFileOutputDelimited_2.indexOf("/") != -1)) {
					if (fileName_tFileOutputDelimited_2.lastIndexOf(".") < fileName_tFileOutputDelimited_2
							.lastIndexOf("/")) {
						fullName_tFileOutputDelimited_2 = fileName_tFileOutputDelimited_2;
						extension_tFileOutputDelimited_2 = "";
					} else {
						fullName_tFileOutputDelimited_2 = fileName_tFileOutputDelimited_2
								.substring(0, fileName_tFileOutputDelimited_2
										.lastIndexOf("."));
						extension_tFileOutputDelimited_2 = fileName_tFileOutputDelimited_2
								.substring(fileName_tFileOutputDelimited_2
										.lastIndexOf("."));
					}
					directory_tFileOutputDelimited_2 = fileName_tFileOutputDelimited_2
							.substring(0, fileName_tFileOutputDelimited_2
									.lastIndexOf("/"));
				} else {
					if (fileName_tFileOutputDelimited_2.lastIndexOf(".") != -1) {
						fullName_tFileOutputDelimited_2 = fileName_tFileOutputDelimited_2
								.substring(0, fileName_tFileOutputDelimited_2
										.lastIndexOf("."));
						extension_tFileOutputDelimited_2 = fileName_tFileOutputDelimited_2
								.substring(fileName_tFileOutputDelimited_2
										.lastIndexOf("."));
					} else {
						fullName_tFileOutputDelimited_2 = fileName_tFileOutputDelimited_2;
						extension_tFileOutputDelimited_2 = "";
					}
					directory_tFileOutputDelimited_2 = "";
				}

				int nb_line_tFileOutputDelimited_2 = 0;
				int splitEvery_tFileOutputDelimited_2 = 1000;
				int splitedFileNo_tFileOutputDelimited_2 = 0;
				int currentRow_tFileOutputDelimited_2 = 0;

				final String OUT_DELIM_tFileOutputDelimited_2 = /**
				 * Start field
				 * tFileOutputDelimited_2:FIELDSEPARATOR
				 */
				";"/** End field tFileOutputDelimited_2:FIELDSEPARATOR */
				;

				final String OUT_DELIM_ROWSEP_tFileOutputDelimited_2 = /**
				 * Start
				 * field tFileOutputDelimited_2:ROWSEPARATOR
				 */
				"\n"/** End field tFileOutputDelimited_2:ROWSEPARATOR */
				;

				// create directory only if not exists
				if (directory_tFileOutputDelimited_2 != null
						&& directory_tFileOutputDelimited_2.trim().length() != 0) {
					java.io.File dir_tFileOutputDelimited_2 = new java.io.File(
							directory_tFileOutputDelimited_2);
					if (!dir_tFileOutputDelimited_2.exists()) {
						dir_tFileOutputDelimited_2.mkdirs();
					}
				}

				// routines.system.Row
				java.io.Writer outtFileOutputDelimited_2 = new java.io.BufferedWriter(
						new java.io.OutputStreamWriter(
								new java.io.FileOutputStream(
										fileName_tFileOutputDelimited_2, true),
								"ISO-8859-15"));
				java.io.File filetFileOutputDelimited_2 = new java.io.File(
						fileName_tFileOutputDelimited_2);

				if (filetFileOutputDelimited_2.length() == 0) {

					outtFileOutputDelimited_2.write("moment");

					outtFileOutputDelimited_2
							.write(OUT_DELIM_tFileOutputDelimited_2);

					outtFileOutputDelimited_2.write("pid");

					outtFileOutputDelimited_2
							.write(OUT_DELIM_tFileOutputDelimited_2);

					outtFileOutputDelimited_2.write("father_pid");

					outtFileOutputDelimited_2
							.write(OUT_DELIM_tFileOutputDelimited_2);

					outtFileOutputDelimited_2.write("root_pid");

					outtFileOutputDelimited_2
							.write(OUT_DELIM_tFileOutputDelimited_2);

					outtFileOutputDelimited_2.write("system_pid");

					outtFileOutputDelimited_2
							.write(OUT_DELIM_tFileOutputDelimited_2);

					outtFileOutputDelimited_2.write("project");

					outtFileOutputDelimited_2
							.write(OUT_DELIM_tFileOutputDelimited_2);

					outtFileOutputDelimited_2.write("job");

					outtFileOutputDelimited_2
							.write(OUT_DELIM_tFileOutputDelimited_2);

					outtFileOutputDelimited_2.write("job_repository_id");

					outtFileOutputDelimited_2
							.write(OUT_DELIM_tFileOutputDelimited_2);

					outtFileOutputDelimited_2.write("job_version");

					outtFileOutputDelimited_2
							.write(OUT_DELIM_tFileOutputDelimited_2);

					outtFileOutputDelimited_2.write("context");

					outtFileOutputDelimited_2
							.write(OUT_DELIM_tFileOutputDelimited_2);

					outtFileOutputDelimited_2.write("origin");

					outtFileOutputDelimited_2
							.write(OUT_DELIM_tFileOutputDelimited_2);

					outtFileOutputDelimited_2.write("message_type");

					outtFileOutputDelimited_2
							.write(OUT_DELIM_tFileOutputDelimited_2);

					outtFileOutputDelimited_2.write("message");

					outtFileOutputDelimited_2
							.write(OUT_DELIM_tFileOutputDelimited_2);

					outtFileOutputDelimited_2.write("duration");

					outtFileOutputDelimited_2
							.write(OUT_DELIM_ROWSEP_tFileOutputDelimited_2);
				}

				/**
				 * [tFileOutputDelimited_2 begin ] stop
				 */

				/**
				 * [tStatCatcher_1 begin ] start
				 */

				ok_Hash.put("tStatCatcher_1", false);
				start_Hash.put("tStatCatcher_1", System.currentTimeMillis());
				currentComponent = "tStatCatcher_1";

				int tos_count_tStatCatcher_1 = 0;

				for (StatCatcherUtils.StatCatcherMessage scm : tStatCatcher_1
						.getMessages()) {
					row19.pid = pid;
					row19.root_pid = rootPid;
					row19.father_pid = fatherPid;
					row19.project = projectName;
					row19.job = jobName;
					row19.context = contextStr;
					row19.origin = (scm.getOrigin() == null
							|| scm.getOrigin().length() < 1 ? null : scm
							.getOrigin());
					row19.message = scm.getMessage();
					row19.duration = scm.getDuration();
					row19.moment = scm.getMoment();
					row19.message_type = scm.getMessageType();
					row19.job_version = scm.getJobVersion();
					row19.job_repository_id = scm.getJobId();
					row19.system_pid = scm.getSystemPid();

					/**
					 * [tStatCatcher_1 begin ] stop
					 */
					/**
					 * [tStatCatcher_1 main ] start
					 */

					currentComponent = "tStatCatcher_1";

					tos_count_tStatCatcher_1++;

					/**
					 * [tStatCatcher_1 main ] stop
					 */

					/**
					 * [tFileOutputDelimited_2 main ] start
					 */

					currentComponent = "tFileOutputDelimited_2";

					StringBuilder sb_tFileOutputDelimited_2 = new StringBuilder();

					if (row19.moment != null) {

						sb_tFileOutputDelimited_2.append(

						FormatterUtils.format_Date(row19.moment,
								"yyyy-MM-dd HH:mm:ss")

						);

					}

					sb_tFileOutputDelimited_2
							.append(OUT_DELIM_tFileOutputDelimited_2);

					if (row19.pid != null) {

						sb_tFileOutputDelimited_2.append(

						row19.pid

						);

					}

					sb_tFileOutputDelimited_2
							.append(OUT_DELIM_tFileOutputDelimited_2);

					if (row19.father_pid != null) {

						sb_tFileOutputDelimited_2.append(

						row19.father_pid

						);

					}

					sb_tFileOutputDelimited_2
							.append(OUT_DELIM_tFileOutputDelimited_2);

					if (row19.root_pid != null) {

						sb_tFileOutputDelimited_2.append(

						row19.root_pid

						);

					}

					sb_tFileOutputDelimited_2
							.append(OUT_DELIM_tFileOutputDelimited_2);

					if (row19.system_pid != null) {

						sb_tFileOutputDelimited_2.append(

						row19.system_pid

						);

					}

					sb_tFileOutputDelimited_2
							.append(OUT_DELIM_tFileOutputDelimited_2);

					if (row19.project != null) {

						sb_tFileOutputDelimited_2.append(

						row19.project

						);

					}

					sb_tFileOutputDelimited_2
							.append(OUT_DELIM_tFileOutputDelimited_2);

					if (row19.job != null) {

						sb_tFileOutputDelimited_2.append(

						row19.job

						);

					}

					sb_tFileOutputDelimited_2
							.append(OUT_DELIM_tFileOutputDelimited_2);

					if (row19.job_repository_id != null) {

						sb_tFileOutputDelimited_2.append(

						row19.job_repository_id

						);

					}

					sb_tFileOutputDelimited_2
							.append(OUT_DELIM_tFileOutputDelimited_2);

					if (row19.job_version != null) {

						sb_tFileOutputDelimited_2.append(

						row19.job_version

						);

					}

					sb_tFileOutputDelimited_2
							.append(OUT_DELIM_tFileOutputDelimited_2);

					if (row19.context != null) {

						sb_tFileOutputDelimited_2.append(

						row19.context

						);

					}

					sb_tFileOutputDelimited_2
							.append(OUT_DELIM_tFileOutputDelimited_2);

					if (row19.origin != null) {

						sb_tFileOutputDelimited_2.append(

						row19.origin

						);

					}

					sb_tFileOutputDelimited_2
							.append(OUT_DELIM_tFileOutputDelimited_2);

					if (row19.message_type != null) {

						sb_tFileOutputDelimited_2.append(

						row19.message_type

						);

					}

					sb_tFileOutputDelimited_2
							.append(OUT_DELIM_tFileOutputDelimited_2);

					if (row19.message != null) {

						sb_tFileOutputDelimited_2.append(

						row19.message

						);

					}

					sb_tFileOutputDelimited_2
							.append(OUT_DELIM_tFileOutputDelimited_2);

					if (row19.duration != null) {

						sb_tFileOutputDelimited_2.append(

						row19.duration

						);

					}

					sb_tFileOutputDelimited_2
							.append(OUT_DELIM_ROWSEP_tFileOutputDelimited_2);

					nb_line_tFileOutputDelimited_2++;

					outtFileOutputDelimited_2.write(sb_tFileOutputDelimited_2
							.toString());

					tos_count_tFileOutputDelimited_2++;

					/**
					 * [tFileOutputDelimited_2 main ] stop
					 */

					/**
					 * [tStatCatcher_1 end ] start
					 */

					currentComponent = "tStatCatcher_1";

				}

				ok_Hash.put("tStatCatcher_1", true);
				end_Hash.put("tStatCatcher_1", System.currentTimeMillis());

				/**
				 * [tStatCatcher_1 end ] stop
				 */

				/**
				 * [tFileOutputDelimited_2 end ] start
				 */

				currentComponent = "tFileOutputDelimited_2";

				outtFileOutputDelimited_2.close();
				globalMap.put("tFileOutputDelimited_2_NB_LINE",
						nb_line_tFileOutputDelimited_2);

				ok_Hash.put("tFileOutputDelimited_2", true);
				end_Hash.put("tFileOutputDelimited_2", System
						.currentTimeMillis());

				/**
				 * [tFileOutputDelimited_2 end ] stop
				 */

				globalResumeTicket = true;

			}// end the resume

		} catch (Exception e) {

			throw new TalendException(e, currentComponent, globalMap);

		}

		globalMap.put("tStatCatcher_1_SUBPROCESS_STATE", 1);
	}

	public static class row20Struct implements
			routines.system.IPersistableRow<row20Struct> {
		final static byte[] commonByteArrayLock = new byte[0];
		static byte[] commonByteArray = new byte[0];

		public java.util.Date moment;

		public java.util.Date getMoment() {
			return this.moment;
		}

		public String pid;

		public String getPid() {
			return this.pid;
		}

		public String root_pid;

		public String getRoot_pid() {
			return this.root_pid;
		}

		public String father_pid;

		public String getFather_pid() {
			return this.father_pid;
		}

		public String project;

		public String getProject() {
			return this.project;
		}

		public String job;

		public String getJob() {
			return this.job;
		}

		public String context;

		public String getContext() {
			return this.context;
		}

		public Integer priority;

		public Integer getPriority() {
			return this.priority;
		}

		public String type;

		public String getType() {
			return this.type;
		}

		public String origin;

		public String getOrigin() {
			return this.origin;
		}

		public String message;

		public String getMessage() {
			return this.message;
		}

		public Integer code;

		public Integer getCode() {
			return this.code;
		}

		public void readData(ObjectInputStream dis) {

			synchronized (commonByteArrayLock) {

				try {

					int length = 0;

					length = dis.readByte();
					if (length == -1) {
						this.moment = null;
					} else {
						this.moment = new Date(dis.readLong());
					}

					length = dis.readInt();
					if (length == -1) {
						this.pid = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.pid = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.root_pid = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.root_pid = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.father_pid = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.father_pid = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.project = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.project = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.job = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.job = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.context = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.context = new String(commonByteArray, 0, length);
					}

					length = dis.readByte();
					if (length == -1) {
						this.priority = null;
					} else {
						this.priority = dis.readInt();
					}

					length = dis.readInt();
					if (length == -1) {
						this.type = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.type = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.origin = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.origin = new String(commonByteArray, 0, length);
					}

					length = dis.readInt();
					if (length == -1) {
						this.message = null;
					} else {
						if (length > commonByteArray.length) {
							if (length < 1024 && commonByteArray.length == 0) {
								commonByteArray = new byte[1024];
							} else {
								commonByteArray = new byte[2 * length];
							}
						}
						dis.readFully(commonByteArray, 0, length);
						this.message = new String(commonByteArray, 0, length);
					}

					length = dis.readByte();
					if (length == -1) {
						this.code = null;
					} else {
						this.code = dis.readInt();
					}

				} catch (IOException e) {
					throw new RuntimeException(e);

				}

			}

		}

		public void writeData(ObjectOutputStream dos) {
			try {

				// java.util.Date

				if (this.moment == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeLong(this.moment.getTime());
				}

				// String

				if (this.pid == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.pid.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.root_pid == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.root_pid.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.father_pid == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.father_pid.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.project == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.project.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.job == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.job.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.context == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.context.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// Integer

				if (this.priority == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeInt(this.priority);
				}

				// String

				if (this.type == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.type.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.origin == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.origin.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// String

				if (this.message == null) {
					dos.writeInt(-1);
				} else {
					byte[] byteArray = this.message.getBytes();
					dos.writeInt(byteArray.length);
					dos.write(byteArray);
				}

				// Integer

				if (this.code == null) {
					dos.writeByte(-1);
				} else {
					dos.writeByte(0);
					dos.writeInt(this.code);
				}

			} catch (IOException e) {
				throw new RuntimeException(e);
			}

		}

		public String toString() {

			StringBuilder sb = new StringBuilder();
			sb.append(super.toString());
			sb.append("[");

			sb.append("moment");
			sb.append("=");
			sb.append(String.valueOf(this.moment));

			sb.append(", ");

			sb.append("pid");
			sb.append("=");
			sb.append(String.valueOf(this.pid));

			sb.append(", ");

			sb.append("root_pid");
			sb.append("=");
			sb.append(String.valueOf(this.root_pid));

			sb.append(", ");

			sb.append("father_pid");
			sb.append("=");
			sb.append(String.valueOf(this.father_pid));

			sb.append(", ");

			sb.append("project");
			sb.append("=");
			sb.append(String.valueOf(this.project));

			sb.append(", ");

			sb.append("job");
			sb.append("=");
			sb.append(String.valueOf(this.job));

			sb.append(", ");

			sb.append("context");
			sb.append("=");
			sb.append(String.valueOf(this.context));

			sb.append(", ");

			sb.append("priority");
			sb.append("=");
			sb.append(String.valueOf(this.priority));

			sb.append(", ");

			sb.append("type");
			sb.append("=");
			sb.append(String.valueOf(this.type));

			sb.append(", ");

			sb.append("origin");
			sb.append("=");
			sb.append(String.valueOf(this.origin));

			sb.append(", ");

			sb.append("message");
			sb.append("=");
			sb.append(String.valueOf(this.message));

			sb.append(", ");

			sb.append("code");
			sb.append("=");
			sb.append(String.valueOf(this.code));

			sb.append("]");

			return sb.toString();
		}

		/**
		 * Compare keys
		 */
		public int compareTo(row20Struct other) {

			int returnValue = -1;

			return returnValue;
		}

		private int checkNullsAndCompare(Object object1, Object object2) {
			int returnValue = 0;
			if (object1 instanceof Comparable && object2 instanceof Comparable) {
				returnValue = ((Comparable) object1).compareTo(object2);
			} else if (object1 != null && object2 != null) {
				returnValue = compareStrings(object1.toString(), object2
						.toString());
			} else if (object1 == null && object2 != null) {
				returnValue = 1;
			} else if (object1 != null && object2 == null) {
				returnValue = -1;
			} else {
				returnValue = 0;
			}

			return returnValue;
		}

		private int compareStrings(String string1, String string2) {
			return string1.compareTo(string2);
		}

	}

	public void tLogCatcher_1Process(
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		globalMap.put("tLogCatcher_1_SUBPROCESS_STATE", 0);

		String currentComponent = "";

		try {

			String currentMethodName = new Exception().getStackTrace()[0]
					.getMethodName();
			boolean resumeIt = currentMethodName.equals(resumeEntryMethodName);
			if (resumeEntryMethodName == null || resumeIt || globalResumeTicket) {// start
																					// the
																					// resume

				row20Struct row20 = new row20Struct();

				/**
				 * [tFileOutputDelimited_3 begin ] start
				 */

				ok_Hash.put("tFileOutputDelimited_3", false);
				start_Hash.put("tFileOutputDelimited_3", System
						.currentTimeMillis());
				currentComponent = "tFileOutputDelimited_3";

				int tos_count_tFileOutputDelimited_3 = 0;

				String fileName_tFileOutputDelimited_3 = (new java.io.File(
						"C:/Data/Shoppi/Ressources/Log_catcher.csv"))
						.getAbsolutePath().replace("\\", "/");
				String fullName_tFileOutputDelimited_3 = null;
				String extension_tFileOutputDelimited_3 = null;
				String directory_tFileOutputDelimited_3 = null;
				if ((fileName_tFileOutputDelimited_3.indexOf("/") != -1)) {
					if (fileName_tFileOutputDelimited_3.lastIndexOf(".") < fileName_tFileOutputDelimited_3
							.lastIndexOf("/")) {
						fullName_tFileOutputDelimited_3 = fileName_tFileOutputDelimited_3;
						extension_tFileOutputDelimited_3 = "";
					} else {
						fullName_tFileOutputDelimited_3 = fileName_tFileOutputDelimited_3
								.substring(0, fileName_tFileOutputDelimited_3
										.lastIndexOf("."));
						extension_tFileOutputDelimited_3 = fileName_tFileOutputDelimited_3
								.substring(fileName_tFileOutputDelimited_3
										.lastIndexOf("."));
					}
					directory_tFileOutputDelimited_3 = fileName_tFileOutputDelimited_3
							.substring(0, fileName_tFileOutputDelimited_3
									.lastIndexOf("/"));
				} else {
					if (fileName_tFileOutputDelimited_3.lastIndexOf(".") != -1) {
						fullName_tFileOutputDelimited_3 = fileName_tFileOutputDelimited_3
								.substring(0, fileName_tFileOutputDelimited_3
										.lastIndexOf("."));
						extension_tFileOutputDelimited_3 = fileName_tFileOutputDelimited_3
								.substring(fileName_tFileOutputDelimited_3
										.lastIndexOf("."));
					} else {
						fullName_tFileOutputDelimited_3 = fileName_tFileOutputDelimited_3;
						extension_tFileOutputDelimited_3 = "";
					}
					directory_tFileOutputDelimited_3 = "";
				}

				int nb_line_tFileOutputDelimited_3 = 0;
				int splitEvery_tFileOutputDelimited_3 = 1000;
				int splitedFileNo_tFileOutputDelimited_3 = 0;
				int currentRow_tFileOutputDelimited_3 = 0;

				final String OUT_DELIM_tFileOutputDelimited_3 = /**
				 * Start field
				 * tFileOutputDelimited_3:FIELDSEPARATOR
				 */
				";"/** End field tFileOutputDelimited_3:FIELDSEPARATOR */
				;

				final String OUT_DELIM_ROWSEP_tFileOutputDelimited_3 = /**
				 * Start
				 * field tFileOutputDelimited_3:ROWSEPARATOR
				 */
				"\n"/** End field tFileOutputDelimited_3:ROWSEPARATOR */
				;

				// create directory only if not exists
				if (directory_tFileOutputDelimited_3 != null
						&& directory_tFileOutputDelimited_3.trim().length() != 0) {
					java.io.File dir_tFileOutputDelimited_3 = new java.io.File(
							directory_tFileOutputDelimited_3);
					if (!dir_tFileOutputDelimited_3.exists()) {
						dir_tFileOutputDelimited_3.mkdirs();
					}
				}

				// routines.system.Row
				java.io.Writer outtFileOutputDelimited_3 = new java.io.BufferedWriter(
						new java.io.OutputStreamWriter(
								new java.io.FileOutputStream(
										fileName_tFileOutputDelimited_3, true),
								"ISO-8859-15"));
				java.io.File filetFileOutputDelimited_3 = new java.io.File(
						fileName_tFileOutputDelimited_3);

				if (filetFileOutputDelimited_3.length() == 0) {

					outtFileOutputDelimited_3.write("moment");

					outtFileOutputDelimited_3
							.write(OUT_DELIM_tFileOutputDelimited_3);

					outtFileOutputDelimited_3.write("pid");

					outtFileOutputDelimited_3
							.write(OUT_DELIM_tFileOutputDelimited_3);

					outtFileOutputDelimited_3.write("root_pid");

					outtFileOutputDelimited_3
							.write(OUT_DELIM_tFileOutputDelimited_3);

					outtFileOutputDelimited_3.write("father_pid");

					outtFileOutputDelimited_3
							.write(OUT_DELIM_tFileOutputDelimited_3);

					outtFileOutputDelimited_3.write("project");

					outtFileOutputDelimited_3
							.write(OUT_DELIM_tFileOutputDelimited_3);

					outtFileOutputDelimited_3.write("job");

					outtFileOutputDelimited_3
							.write(OUT_DELIM_tFileOutputDelimited_3);

					outtFileOutputDelimited_3.write("context");

					outtFileOutputDelimited_3
							.write(OUT_DELIM_tFileOutputDelimited_3);

					outtFileOutputDelimited_3.write("priority");

					outtFileOutputDelimited_3
							.write(OUT_DELIM_tFileOutputDelimited_3);

					outtFileOutputDelimited_3.write("type");

					outtFileOutputDelimited_3
							.write(OUT_DELIM_tFileOutputDelimited_3);

					outtFileOutputDelimited_3.write("origin");

					outtFileOutputDelimited_3
							.write(OUT_DELIM_tFileOutputDelimited_3);

					outtFileOutputDelimited_3.write("message");

					outtFileOutputDelimited_3
							.write(OUT_DELIM_tFileOutputDelimited_3);

					outtFileOutputDelimited_3.write("code");

					outtFileOutputDelimited_3
							.write(OUT_DELIM_ROWSEP_tFileOutputDelimited_3);
				}

				/**
				 * [tFileOutputDelimited_3 begin ] stop
				 */

				/**
				 * [tLogCatcher_1 begin ] start
				 */

				ok_Hash.put("tLogCatcher_1", false);
				start_Hash.put("tLogCatcher_1", System.currentTimeMillis());
				currentComponent = "tLogCatcher_1";

				int tos_count_tLogCatcher_1 = 0;

				for (LogCatcherUtils.LogCatcherMessage lcm : tLogCatcher_1
						.getMessages()) {
					row20.type = lcm.getType();
					row20.origin = (lcm.getOrigin() == null
							|| lcm.getOrigin().length() < 1 ? null : lcm
							.getOrigin());
					row20.priority = lcm.getPriority();
					row20.message = lcm.getMessage();
					row20.code = lcm.getCode();

					row20.moment = java.util.Calendar.getInstance().getTime();

					row20.pid = pid;
					row20.root_pid = rootPid;
					row20.father_pid = fatherPid;

					row20.project = projectName;
					row20.job = jobName;
					row20.context = contextStr;

					/**
					 * [tLogCatcher_1 begin ] stop
					 */
					/**
					 * [tLogCatcher_1 main ] start
					 */

					currentComponent = "tLogCatcher_1";

					tos_count_tLogCatcher_1++;

					/**
					 * [tLogCatcher_1 main ] stop
					 */

					/**
					 * [tFileOutputDelimited_3 main ] start
					 */

					currentComponent = "tFileOutputDelimited_3";

					StringBuilder sb_tFileOutputDelimited_3 = new StringBuilder();

					if (row20.moment != null) {

						sb_tFileOutputDelimited_3.append(

						FormatterUtils.format_Date(row20.moment,
								"yyyy-MM-dd HH:mm:ss")

						);

					}

					sb_tFileOutputDelimited_3
							.append(OUT_DELIM_tFileOutputDelimited_3);

					if (row20.pid != null) {

						sb_tFileOutputDelimited_3.append(

						row20.pid

						);

					}

					sb_tFileOutputDelimited_3
							.append(OUT_DELIM_tFileOutputDelimited_3);

					if (row20.root_pid != null) {

						sb_tFileOutputDelimited_3.append(

						row20.root_pid

						);

					}

					sb_tFileOutputDelimited_3
							.append(OUT_DELIM_tFileOutputDelimited_3);

					if (row20.father_pid != null) {

						sb_tFileOutputDelimited_3.append(

						row20.father_pid

						);

					}

					sb_tFileOutputDelimited_3
							.append(OUT_DELIM_tFileOutputDelimited_3);

					if (row20.project != null) {

						sb_tFileOutputDelimited_3.append(

						row20.project

						);

					}

					sb_tFileOutputDelimited_3
							.append(OUT_DELIM_tFileOutputDelimited_3);

					if (row20.job != null) {

						sb_tFileOutputDelimited_3.append(

						row20.job

						);

					}

					sb_tFileOutputDelimited_3
							.append(OUT_DELIM_tFileOutputDelimited_3);

					if (row20.context != null) {

						sb_tFileOutputDelimited_3.append(

						row20.context

						);

					}

					sb_tFileOutputDelimited_3
							.append(OUT_DELIM_tFileOutputDelimited_3);

					if (row20.priority != null) {

						sb_tFileOutputDelimited_3.append(

						row20.priority

						);

					}

					sb_tFileOutputDelimited_3
							.append(OUT_DELIM_tFileOutputDelimited_3);

					if (row20.type != null) {

						sb_tFileOutputDelimited_3.append(

						row20.type

						);

					}

					sb_tFileOutputDelimited_3
							.append(OUT_DELIM_tFileOutputDelimited_3);

					if (row20.origin != null) {

						sb_tFileOutputDelimited_3.append(

						row20.origin

						);

					}

					sb_tFileOutputDelimited_3
							.append(OUT_DELIM_tFileOutputDelimited_3);

					if (row20.message != null) {

						sb_tFileOutputDelimited_3.append(

						row20.message

						);

					}

					sb_tFileOutputDelimited_3
							.append(OUT_DELIM_tFileOutputDelimited_3);

					if (row20.code != null) {

						sb_tFileOutputDelimited_3.append(

						row20.code

						);

					}

					sb_tFileOutputDelimited_3
							.append(OUT_DELIM_ROWSEP_tFileOutputDelimited_3);

					nb_line_tFileOutputDelimited_3++;

					outtFileOutputDelimited_3.write(sb_tFileOutputDelimited_3
							.toString());

					tos_count_tFileOutputDelimited_3++;

					/**
					 * [tFileOutputDelimited_3 main ] stop
					 */

					/**
					 * [tLogCatcher_1 end ] start
					 */

					currentComponent = "tLogCatcher_1";

				}

				ok_Hash.put("tLogCatcher_1", true);
				end_Hash.put("tLogCatcher_1", System.currentTimeMillis());

				/**
				 * [tLogCatcher_1 end ] stop
				 */

				/**
				 * [tFileOutputDelimited_3 end ] start
				 */

				currentComponent = "tFileOutputDelimited_3";

				outtFileOutputDelimited_3.close();
				globalMap.put("tFileOutputDelimited_3_NB_LINE",
						nb_line_tFileOutputDelimited_3);

				ok_Hash.put("tFileOutputDelimited_3", true);
				end_Hash.put("tFileOutputDelimited_3", System
						.currentTimeMillis());

				/**
				 * [tFileOutputDelimited_3 end ] stop
				 */

				globalResumeTicket = true;

			}// end the resume

		} catch (Exception e) {

			throw new TalendException(e, currentComponent, globalMap);

		}

		globalMap.put("tLogCatcher_1_SUBPROCESS_STATE", 1);
	}

	public void tPostjob_1Process(final java.util.Map<String, Object> globalMap)
			throws TalendException {
		globalMap.put("tPostjob_1_SUBPROCESS_STATE", 0);

		String currentComponent = "";

		try {

			String currentMethodName = new Exception().getStackTrace()[0]
					.getMethodName();
			boolean resumeIt = currentMethodName.equals(resumeEntryMethodName);
			if (resumeEntryMethodName == null || resumeIt || globalResumeTicket) {// start
																					// the
																					// resume

				/**
				 * [tPostjob_1 begin ] start
				 */

				ok_Hash.put("tPostjob_1", false);
				start_Hash.put("tPostjob_1", System.currentTimeMillis());
				currentComponent = "tPostjob_1";

				int tos_count_tPostjob_1 = 0;

				/**
				 * [tPostjob_1 begin ] stop
				 */
				/**
				 * [tPostjob_1 main ] start
				 */

				currentComponent = "tPostjob_1";

				tos_count_tPostjob_1++;

				/**
				 * [tPostjob_1 main ] stop
				 */
				/**
				 * [tPostjob_1 end ] start
				 */

				currentComponent = "tPostjob_1";

				ok_Hash.put("tPostjob_1", true);
				end_Hash.put("tPostjob_1", System.currentTimeMillis());

				tFileDelete_1Process(globalMap);

				/**
				 * [tPostjob_1 end ] stop
				 */

				globalResumeTicket = true;

			}// end the resume

		} catch (Exception e) {

			throw new TalendException(e, currentComponent, globalMap);

		}

		globalMap.put("tPostjob_1_SUBPROCESS_STATE", 1);
	}

	public void tFileDelete_1Process(
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		globalMap.put("tFileDelete_1_SUBPROCESS_STATE", 0);

		String currentComponent = "";

		try {

			String currentMethodName = new Exception().getStackTrace()[0]
					.getMethodName();
			boolean resumeIt = currentMethodName.equals(resumeEntryMethodName);
			if (resumeEntryMethodName == null || resumeIt || globalResumeTicket) {// start
																					// the
																					// resume

				/**
				 * [tFileDelete_1 begin ] start
				 */

				ok_Hash.put("tFileDelete_1", false);
				start_Hash.put("tFileDelete_1", System.currentTimeMillis());
				currentComponent = "tFileDelete_1";

				int tos_count_tFileDelete_1 = 0;

				/**
				 * [tFileDelete_1 begin ] stop
				 */
				/**
				 * [tFileDelete_1 main ] start
				 */

				currentComponent = "tFileDelete_1";

				class DeleteFoldertFileDelete_1 {
					/**
					 * delete all the sub-files in 'file'
					 * 
					 * @param file
					 */
					public void delete(java.io.File file) {
						// TODO Auto-generated method stub
						java.io.File[] files = file.listFiles();
						for (int i = 0; i < files.length; i++) {
							if (files[i].isFile()) {
								files[i].delete();
							} else if (files[i].isDirectory()) {
								if (!files[i].delete()) {
									delete(files[i]);
								}
							}
						}
						deleteDirectory(file);
						file.delete();
					}

					/**
					 * delete all the sub-folders in 'file'
					 * 
					 * @param file
					 */
					private void deleteDirectory(java.io.File file) {
						// TODO Auto-generated method stub
						java.io.File[] filed = file.listFiles();
						for (int i = 0; i < filed.length; i++) {
							deleteDirectory(filed[i]);
							filed[i].delete();
						}
					}

				}
				java.io.File file_tFileDelete_1 = new java.io.File(
						context.RepIni + "articles_extract" + context.ShoppiID
								+ ".csv");
				if (file_tFileDelete_1.exists() && file_tFileDelete_1.isFile()) {
					file_tFileDelete_1.delete();
				}
				globalMap.put("tFileDelete_1_DELETE_PATH", context.RepIni
						+ "articles_extract" + context.ShoppiID + ".csv");

				tos_count_tFileDelete_1++;

				/**
				 * [tFileDelete_1 main ] stop
				 */
				/**
				 * [tFileDelete_1 end ] start
				 */

				currentComponent = "tFileDelete_1";

				ok_Hash.put("tFileDelete_1", true);
				end_Hash.put("tFileDelete_1", System.currentTimeMillis());

				/**
				 * [tFileDelete_1 end ] stop
				 */

				globalResumeTicket = true;

			}// end the resume

			if (resumeEntryMethodName == null || globalResumeTicket) {
				resumeUtil.addLog("CHECKPOINT",
						"CONNECTION:SUBJOB_OK:tFileDelete_1:OnSubjobOk", "",
						Thread.currentThread().getId() + "", "", "", "", "");
			}

			tFileDelete_2Process(globalMap);

		} catch (Exception e) {

			throw new TalendException(e, currentComponent, globalMap);

		}

		globalMap.put("tFileDelete_1_SUBPROCESS_STATE", 1);
	}

	public void tFileDelete_2Process(
			final java.util.Map<String, Object> globalMap)
			throws TalendException {
		globalMap.put("tFileDelete_2_SUBPROCESS_STATE", 0);

		String currentComponent = "";

		try {

			String currentMethodName = new Exception().getStackTrace()[0]
					.getMethodName();
			boolean resumeIt = currentMethodName.equals(resumeEntryMethodName);
			if (resumeEntryMethodName == null || resumeIt || globalResumeTicket) {// start
																					// the
																					// resume

				/**
				 * [tFileDelete_2 begin ] start
				 */

				ok_Hash.put("tFileDelete_2", false);
				start_Hash.put("tFileDelete_2", System.currentTimeMillis());
				currentComponent = "tFileDelete_2";

				int tos_count_tFileDelete_2 = 0;

				/**
				 * [tFileDelete_2 begin ] stop
				 */
				/**
				 * [tFileDelete_2 main ] start
				 */

				currentComponent = "tFileDelete_2";

				class DeleteFoldertFileDelete_2 {
					/**
					 * delete all the sub-files in 'file'
					 * 
					 * @param file
					 */
					public void delete(java.io.File file) {
						// TODO Auto-generated method stub
						java.io.File[] files = file.listFiles();
						for (int i = 0; i < files.length; i++) {
							if (files[i].isFile()) {
								files[i].delete();
							} else if (files[i].isDirectory()) {
								if (!files[i].delete()) {
									delete(files[i]);
								}
							}
						}
						deleteDirectory(file);
						file.delete();
					}

					/**
					 * delete all the sub-folders in 'file'
					 * 
					 * @param file
					 */
					private void deleteDirectory(java.io.File file) {
						// TODO Auto-generated method stub
						java.io.File[] filed = file.listFiles();
						for (int i = 0; i < filed.length; i++) {
							deleteDirectory(filed[i]);
							filed[i].delete();
						}
					}

				}
				java.io.File file_tFileDelete_2 = new java.io.File(
						context.RepIni + "extract" + context.ShoppiID + ".csv");
				if (file_tFileDelete_2.exists() && file_tFileDelete_2.isFile()) {
					file_tFileDelete_2.delete();
				}
				globalMap.put("tFileDelete_2_DELETE_PATH", context.RepIni
						+ "extract" + context.ShoppiID + ".csv");

				tos_count_tFileDelete_2++;

				/**
				 * [tFileDelete_2 main ] stop
				 */
				/**
				 * [tFileDelete_2 end ] start
				 */

				currentComponent = "tFileDelete_2";

				ok_Hash.put("tFileDelete_2", true);
				end_Hash.put("tFileDelete_2", System.currentTimeMillis());

				/**
				 * [tFileDelete_2 end ] stop
				 */

				globalResumeTicket = true;

			}// end the resume

			if (resumeEntryMethodName == null || globalResumeTicket) {
				resumeUtil.addLog("CHECKPOINT",
						"CONNECTION:SUBJOB_OK:tFileDelete_2:OnSubjobOk", "",
						Thread.currentThread().getId() + "", "", "", "", "");
			}

			tSendMail_1Process(globalMap);

		} catch (Exception e) {

			throw new TalendException(e, currentComponent, globalMap);

		}

		globalMap.put("tFileDelete_2_SUBPROCESS_STATE", 1);
	}

	public void tSendMail_1Process(final java.util.Map<String, Object> globalMap)
			throws TalendException {
		globalMap.put("tSendMail_1_SUBPROCESS_STATE", 0);

		String currentComponent = "";

		try {

			String currentMethodName = new Exception().getStackTrace()[0]
					.getMethodName();
			boolean resumeIt = currentMethodName.equals(resumeEntryMethodName);
			if (resumeEntryMethodName == null || resumeIt || globalResumeTicket) {// start
																					// the
																					// resume

				/**
				 * [tSendMail_1 begin ] start
				 */

				ok_Hash.put("tSendMail_1", false);
				start_Hash.put("tSendMail_1", System.currentTimeMillis());
				currentComponent = "tSendMail_1";

				int tos_count_tSendMail_1 = 0;

				String smtpHost_tSendMail_1 = "SBS2008.johanns.local";

				String smtpPort_tSendMail_1 = "25";

				String from_tSendMail_1 = ("vivien.thiry@johanns-cie.lu");
				String to_tSendMail_1 = ("vivien.thiry@johanns-cie.lu")
						.replace(";", ",");
				String cc_tSendMail_1 = (("") == null || "".equals("")) ? null
						: ("").replace(";", ",");
				String bcc_tSendMail_1 = (("") == null || "".equals("")) ? null
						: ("").replace(";", ",");
				String subject_tSendMail_1 = ("adaptation coef");

				java.util.List<java.util.Map<String, String>> headers_tSendMail_1 = new java.util.ArrayList<java.util.Map<String, String>>();

				java.util.List<String> attachments_tSendMail_1 = new java.util.ArrayList<String>();
				attachments_tSendMail_1.add(context.RepIni + "adapt_coef_"
						+ context.ShoppiID + ".csv");

				/**
				 * [tSendMail_1 begin ] stop
				 */
				/**
				 * [tSendMail_1 main ] start
				 */

				currentComponent = "tSendMail_1";

				String message_tSendMail_1 = (("") == null || "".equals("")) ? "\"\""
						: ("");
				java.util.Properties props_tSendMail_1 = System.getProperties();
				props_tSendMail_1.put("mail.smtp.host", smtpHost_tSendMail_1);
				props_tSendMail_1.put("mail.smtp.port", smtpPort_tSendMail_1);
				try {
					props_tSendMail_1.put("mail.smtp.auth", "true");
					javax.mail.Session session_tSendMail_1 = javax.mail.Session
							.getInstance(props_tSendMail_1,
									new javax.mail.Authenticator() {
										protected javax.mail.PasswordAuthentication getPasswordAuthentication() {
											return new javax.mail.PasswordAuthentication(
													"admin", "Secure$2009");
										}
									});
					javax.mail.Message msg_tSendMail_1 = new javax.mail.internet.MimeMessage(
							session_tSendMail_1);
					msg_tSendMail_1
							.setFrom(new javax.mail.internet.InternetAddress(
									from_tSendMail_1, "Reporting"));
					msg_tSendMail_1.setRecipients(
							javax.mail.Message.RecipientType.TO,
							javax.mail.internet.InternetAddress.parse(
									to_tSendMail_1, false));
					if (cc_tSendMail_1 != null)
						msg_tSendMail_1.setRecipients(
								javax.mail.Message.RecipientType.CC,
								javax.mail.internet.InternetAddress.parse(
										cc_tSendMail_1, false));
					if (bcc_tSendMail_1 != null)
						msg_tSendMail_1.setRecipients(
								javax.mail.Message.RecipientType.BCC,
								javax.mail.internet.InternetAddress.parse(
										bcc_tSendMail_1, false));

					msg_tSendMail_1.setSubject(subject_tSendMail_1);

					for (int i_tSendMail_1 = 0; i_tSendMail_1 < headers_tSendMail_1
							.size(); i_tSendMail_1++) {
						java.util.Map<String, String> header_tSendMail_1 = headers_tSendMail_1
								.get(i_tSendMail_1);
						msg_tSendMail_1.setHeader(
								header_tSendMail_1.get("KEY"),
								header_tSendMail_1.get("VALUE"));
					}

					msg_tSendMail_1.setSentDate(new Date());
					msg_tSendMail_1.setHeader("X-Priority", "3"); // High->1
																	// Normal->3
																	// Low->5
					javax.mail.Multipart mp_tSendMail_1 = new javax.mail.internet.MimeMultipart();
					javax.mail.internet.MimeBodyPart mbpText_tSendMail_1 = new javax.mail.internet.MimeBodyPart();
					mbpText_tSendMail_1.setText(message_tSendMail_1,
							"ISO-8859-15", "plain");
					mp_tSendMail_1.addBodyPart(mbpText_tSendMail_1);

					for (int i_tSendMail_1 = 0; i_tSendMail_1 < attachments_tSendMail_1
							.size(); i_tSendMail_1++) {
						String filename_tSendMail_1 = attachments_tSendMail_1
								.get(i_tSendMail_1);
						javax.mail.internet.MimeBodyPart mbpFile_tSendMail_1 = new javax.mail.internet.MimeBodyPart();

						javax.activation.FileDataSource fds_tSendMail_1 = new javax.activation.FileDataSource(
								filename_tSendMail_1);
						mbpFile_tSendMail_1
								.setDataHandler(new javax.activation.DataHandler(
										fds_tSendMail_1));
						mbpFile_tSendMail_1.setFileName(fds_tSendMail_1
								.getName());
						mp_tSendMail_1.addBodyPart(mbpFile_tSendMail_1);
					}

					// -- set the content --
					msg_tSendMail_1.setContent(mp_tSendMail_1);

					// -- Send the message --
					javax.mail.Transport.send(msg_tSendMail_1);
				} catch (Exception e) {
					throw (e);
				}

				tos_count_tSendMail_1++;

				/**
				 * [tSendMail_1 main ] stop
				 */
				/**
				 * [tSendMail_1 end ] start
				 */

				currentComponent = "tSendMail_1";

				ok_Hash.put("tSendMail_1", true);
				end_Hash.put("tSendMail_1", System.currentTimeMillis());

				/**
				 * [tSendMail_1 end ] stop
				 */

				globalResumeTicket = true;

			}// end the resume

		} catch (Exception e) {

			throw new TalendException(e, currentComponent, globalMap);

		}

		globalMap.put("tSendMail_1_SUBPROCESS_STATE", 1);
	}

	public String resuming_logs_dir_path = null;
	public String resuming_checkpoint_path = null;
	public String parent_part_launcher = null;
	private String resumeEntryMethodName = null;
	private boolean globalResumeTicket = false;

	public boolean watch = false;
	public int portStats = 3334;
	public int portTraces = 4334;
	public String clientHost;
	public String defaultClientHost = "localhost";
	public String contextStr = "Default";
	public String pid = "0";
	public String rootPid = null;
	public String fatherPid = null;
	public long startTime = 0;
	public boolean isChildJob = false;

	private ThreadLocal threadLocal = new ThreadLocal();
	{
		java.util.Map threadRunResultMap = new java.util.HashMap();
		threadRunResultMap.put("errorCode", null);
		threadRunResultMap.put("status", "");
		threadLocal.set(threadRunResultMap);
	}

	private java.util.Properties context_param = new java.util.Properties();

	public String status = "";

	public static void main(String[] args) {
		final Calcul_coefficient_progression_new Calcul_coefficient_progression_newClass = new Calcul_coefficient_progression_new();

		int exitCode = Calcul_coefficient_progression_newClass
				.runJobInTOS(args);

		System.exit(exitCode);
	}

	public String[][] runJob(String[] args) {

		int exitCode = runJobInTOS(args);
		String[][] bufferValue = new String[][] { { Integer.toString(exitCode) } };

		return bufferValue;
	}

	public int runJobInTOS(String[] args) {

		String lastStr = "";
		for (String arg : args) {
			if (arg.equalsIgnoreCase("--context_param")) {
				lastStr = arg;
			} else if (lastStr.equals("")) {
				evalParam(arg);
			} else {
				evalParam(lastStr + " " + arg);
				lastStr = "";
			}
		}

		if (clientHost == null) {
			clientHost = defaultClientHost;
		}

		if (pid == null || "0".equals(pid)) {
			pid = TalendString.getAsciiRandomString(6);
		}

		if (rootPid == null) {
			rootPid = pid;
		}
		if (fatherPid == null) {
			fatherPid = pid;
		} else {
			isChildJob = true;
		}

		// Resume: init the resumeUtil
		resumeEntryMethodName = ResumeUtil
				.getResumeEntryMethodName(resuming_checkpoint_path);
		resumeUtil = new ResumeUtil(resuming_logs_dir_path, isChildJob, rootPid);
		resumeUtil.initCommonInfo(pid, rootPid, fatherPid, projectName,
				jobName, contextStr, jobVersion);

		// Resume: jobStart
		resumeUtil.addLog("JOB_STARTED", "JOB:" + jobName,
				parent_part_launcher, Thread.currentThread().getId() + "", "",
				"", "", "");

		try {
			java.io.InputStream inContext = Calcul_coefficient_progression_new.class
					.getClassLoader()
					.getResourceAsStream(
							"care/calcul_coefficient_progression_new_2_0/contexts/Default.properties");
			if (inContext != null) {
				defaultProps.load(inContext);
				inContext.close();
				context = new ContextProperties(defaultProps);
			}

			if (contextStr.compareTo("Default") != 0) {
				inContext = Calcul_coefficient_progression_new.class
						.getClassLoader().getResourceAsStream(
								"care/calcul_coefficient_progression_new_2_0/contexts/"
										+ contextStr + ".properties");
				if (inContext != null) {
					context.load(inContext);
					inContext.close();
				}
			}

			if (!context_param.isEmpty()) {
				context.putAll(context_param);
			}

			context.Station = (String) context.getProperty("Station");

			context.ShoppiID = (String) context.getProperty("ShoppiID");

			context.ShoppiNom = (String) context.getProperty("ShoppiNom");

			context.SQLServeur = (String) context.getProperty("SQLServeur");

			context.SQLUser = (String) context.getProperty("SQLUser");

			context.SQLPsw = (String) context.getProperty("SQLPsw");

			context.Format = (String) context.getProperty("Format");

			context.Periode = (String) context.getProperty("Periode");

			context.Debut_n = (String) context.getProperty("Debut_n");

			context.Debut_n1 = (String) context.getProperty("Debut_n1");

			context.Fin_n = (String) context.getProperty("Fin_n");

			context.Fin_n1 = (String) context.getProperty("Fin_n1");

			context.Markup = new BigDecimal(context.getProperty("Markup"));
			context.BD_0 = new BigDecimal(context.getProperty("BD_0"));
			context.RepIni = (String) context.getProperty("RepIni");

			context.RepData = (String) context.getProperty("RepData");

			try {
				String context_To_value = context.getProperty("To");
				int context_To_pos = context_To_value.indexOf(";");
				String context_To_pattern = "yyyy-MM-dd HH:mm:ss";
				if (context_To_pos > -1) {
					context_To_pattern = context_To_value.substring(0,
							context_To_pos);
					context_To_value = context_To_value
							.substring(context_To_pos + 1);
				}

				context.To = (java.util.Date) (new java.text.SimpleDateFormat(
						context_To_pattern).parse(context_To_value));

			} catch (ParseException e) {
				context.To = null;
			}

			try {
				context.FL_1 = Float.parseFloat(context.getProperty("FL_1"));
			} catch (NumberFormatException e) {
				context.FL_1 = null;
			}

			context.coef_limit = new BigDecimal(context
					.getProperty("coef_limit"));
			try {
				context.current_Art = Long.parseLong(context
						.getProperty("current_Art"));
			} catch (NumberFormatException e) {
				context.current_Art = null;
			}

			context.current_Art2 = (String) context.getProperty("current_Art2");

			try {
				String context_BigBang_value = context.getProperty("BigBang");
				int context_BigBang_pos = context_BigBang_value.indexOf(";");
				String context_BigBang_pattern = "yyyy-MM-dd HH:mm:ss";
				if (context_BigBang_pos > -1) {
					context_BigBang_pattern = context_BigBang_value.substring(
							0, context_BigBang_pos);
					context_BigBang_value = context_BigBang_value
							.substring(context_BigBang_pos + 1);
				}

				context.BigBang = (java.util.Date) (new java.text.SimpleDateFormat(
						context_BigBang_pattern).parse(context_BigBang_value));

			} catch (ParseException e) {
				context.BigBang = null;
			}

			context.BD_1 = new BigDecimal(context.getProperty("BD_1"));
			try {
				context.Long_1 = Long.parseLong(context.getProperty("Long_1"));
			} catch (NumberFormatException e) {
				context.Long_1 = null;
			}

			try {
				context.min_life = Long.parseLong(context
						.getProperty("min_life"));
			} catch (NumberFormatException e) {
				context.min_life = null;
			}

			context.BD_105 = new BigDecimal(context.getProperty("BD_105"));
			try {
				context.Long_0 = Long.parseLong(context.getProperty("Long_0"));
			} catch (NumberFormatException e) {
				context.Long_0 = null;
			}

		} catch (java.io.IOException ie) {
			System.err.println("Could not load context " + contextStr);
			ie.printStackTrace();
		}

		long startUsedMemory = Runtime.getRuntime().totalMemory()
				- Runtime.getRuntime().freeMemory();
		long endUsedMemory = 0;
		long end = 0;

		startTime = System.currentTimeMillis();
		tStatCatcher_1.addMessage("begin");

		this.globalResumeTicket = true;// to run tPreJob

		try {
			tStatCatcher_1Process(globalMap);
		} catch (Exception e) {
			e.printStackTrace();
		}

		this.globalResumeTicket = false;// to run others jobs

		try {
			errorCode = null;
			tMSSqlInput_1Process(globalMap);
			status = "end";
		} catch (TalendException e_tMSSqlInput_1) {
			status = "failure";
			e_tMSSqlInput_1.printStackTrace();
			globalMap.put("tMSSqlInput_1_SUBPROCESS_STATE", -1);

		} finally {
		}

		this.globalResumeTicket = true;// to run tPostJob

		try {
			errorCode = null;
			tPostjob_1Process(globalMap);
			status = "end";
		} catch (TalendException e_tPostjob_1) {
			status = "failure";
			e_tPostjob_1.printStackTrace();
			globalMap.put("tPostjob_1_SUBPROCESS_STATE", -1);

		} finally {
		}
		end = System.currentTimeMillis();

		if (watch) {
			System.out.println((end - startTime) + " milliseconds");
		}

		endUsedMemory = Runtime.getRuntime().totalMemory()
				- Runtime.getRuntime().freeMemory();
		if (false) {
			System.out
					.println((endUsedMemory - startUsedMemory)
							+ " bytes memory increase when running : Calcul_coefficient_progression_new");
		}
		tStatCatcher_1.addMessage(status == "" ? "end" : status,
				(end - startTime));
		try {
			tStatCatcher_1Process(globalMap);
		} catch (Exception e) {
			e.printStackTrace();
		}

		resumeUtil.addLog("JOB_ENDED", "JOB:" + jobName, parent_part_launcher,
				Thread.currentThread().getId() + "", "", "", "", "");

		if (errorCode == null) {
			return status != null && status.equals("failure") ? 1 : 0;
		} else {
			return errorCode.intValue();
		}
	}

	private void evalParam(String arg) {
		if (arg.startsWith("--resuming_logs_dir_path")) {
			resuming_logs_dir_path = arg.substring(25);
		} else if (arg.startsWith("--resuming_checkpoint_path")) {
			resuming_checkpoint_path = arg.substring(27);
		} else if (arg.startsWith("--parent_part_launcher")) {
			parent_part_launcher = arg.substring(23);
		} else if (arg.startsWith("--watch")) {
			watch = true;
		} else if (arg.startsWith("--stat_port=")) {
			portStats = Integer.parseInt(arg.substring(12));
		} else if (arg.startsWith("--trace_port=")) {
			portTraces = Integer.parseInt(arg.substring(13));
		} else if (arg.startsWith("--client_host=")) {
			clientHost = arg.substring(14);
		} else if (arg.startsWith("--context=")) {
			contextStr = arg.substring(10);
		} else if (arg.startsWith("--father_pid=")) {
			fatherPid = arg.substring(13);
		} else if (arg.startsWith("--root_pid=")) {
			rootPid = arg.substring(11);
		} else if (arg.startsWith("--pid=")) {
			pid = arg.substring(6);
		} else if (arg.startsWith("--context_param")) {
			String keyValue = arg.substring(16);
			int index = -1;
			if (keyValue != null && (index = keyValue.indexOf('=')) > -1) {
				context_param.put(keyValue.substring(0, index), keyValue
						.substring(index + 1));
			}
		}

	}

	public Integer getErrorCode() {
		return errorCode;
	}

	public String getStatus() {
		return status;
	}

	ResumeUtil resumeUtil = null;
}
/************************************************************************************************
 * 357920 characters generated by Talend Open Studio on the 4 mai 2015 16:49:04
 * CEST
 ************************************************************************************************/
