import java.math.BigDecimal;

import com.softwareag.entirex.aci.Broker;
import com.softwareag.entirex.aci.BrokerException;

/**
 * <p>Titre : Jwlwcdm1Web</p>
 * <p>Description : Classe ajout, modification, suppression Liste des commandes </p>
 * <p>Copyright : Copyright (c) 2012</p>
 * <p>Societe : ENSOR</p>
 * @author AR & DR & PY <i>12/09/2012</i>
 * @version 1.0
 */
 
public class Jwlwcdm1Web {

	/**
	 * <p>Titre : getListeCommandes</p>
	 * <p>Copyright : Copyright (c) 2012</p>
	 * <p>Societe : ENSOR</p>
	 * @author AR & DR & PY <i>12/09/2012</i>
	 * @version 1.0
	 */
	public static Jwlwcdm1 getListeCommandes(
				String f_code_titre,
				String f_cd_cmd, 
				String f_dt_parution,
				String groupe_exploitant,
				String numero_session,
				String utilisateur,
				String cd_cible,
				String cd_stegrp,
				Broker broker) throws BrokerException {
		// Initialisation des variables en entrees
	    Jwlwcdm1 jwlwcdm1 = new Jwlwcdm1(broker, Constantes.SERVER_ADRESSE);
			
		// Initialisation de la vWebent depuis les informations de connexion
		Jwlwcdm1.Nwlwcdm1Axwebent vWebent = jwlwcdm1.new Nwlwcdm1Axwebent();
		vWebent.dbid 			  = new BigDecimal (Constantes.DBID);
		vWebent.cible_exploitant  = Constantes.CD_CIBLE;
		vWebent.groupe_exploitant = groupe_exploitant;
		vWebent.numero_session    = new BigDecimal (numero_session);
		vWebent.utilisateur       = utilisateur;
		vWebent.transaction 	  = "WLWSTLST";
		vWebent.fonction 		  = "VISU";
		vWebent.cd_cible 		  = cd_cible;
		vWebent.cd_stegrp 		  = cd_stegrp;
		vWebent.cd_application 	  = Constantes.CD_APPLICATION;
		jwlwcdm1.setNwlwcdm1Axwebent (vWebent);
		
		// Initialisation de la demande (tous a vide pour l instant)
		Jwlwcdm1.Nwlwcdm1Awlwcdm1 vLwcdm1 				= jwlwcdm1.new Nwlwcdm1Awlwcdm1();
		
		Jwlwcdm1.Nwlwcdm1Awlwcdm1Demande vLwcdm1Demande = jwlwcdm1.new Nwlwcdm1Awlwcdm1Demande();
		Jwlwcdm1.Nwlwcdm1Awlwcdm1Reponse vLwcdm1reponse = jwlwcdm1.new Nwlwcdm1Awlwcdm1Reponse();

		vLwcdm1Demande.code_titre 	= f_code_titre;
		vLwcdm1Demande.cd_cmd 		= f_cd_cmd;
		vLwcdm1Demande.dt_parution 	= f_dt_parution;
		
		
		
		
		vLwcdm1.demande = vLwcdm1Demande;
		vLwcdm1.reponse = vLwcdm1reponse;
		
		jwlwcdm1.setNwlwcdm1Awlwcdm1(vLwcdm1);
		
		// CALL SERVER
		jwlwcdm1.nwlwcdm1();
		
		// Verification du code retour
		vWebent = jwlwcdm1.getNwlwcdm1Axwebent();
		System.out.println("Code retour nwlwcdm1() = "+vWebent.code_retour.intValue());
		
		if(vWebent.code_retour.intValue() != 0){
			for(int i=0; i < vWebent.nb_ano.intValue(); i++){
			   System.out.println(vWebent.t_ano[i].code_ano + "[" + vWebent.t_ano[i].type_ano + "] :  " + vWebent.t_ano[i].lib_ano.trim() + " ");
		   	}
		}
		else{
			//affichage de reponse
			Jwlwcdm1.Nwlwcdm1Awlwcdm1 jwlwcdm1Reponse = jwlwcdm1.getNwlwcdm1Awlwcdm1() ;
			Jwlwcdm1.Nwlwcdm1Awlwcdm1Reponse reponse = jwlwcdm1Reponse.reponse;
			Jwlwcdm1.Nwlwcdm1Awlwcdm1Demande demande = jwlwcdm1Reponse.demande;
			
			
			System.out.println("code_titre = " 			+ demande.code_titre) ;
			System.out.println("dt_parution = " 		+ demande.dt_parution) ;
			System.out.println("cd_cmd = " 				+ demande.cd_cmd) ;
			System.out.println("dt_trt = " 				+ demande.dt_trt) ;
			System.out.println("id_cmd = "				+ reponse.id_cmd) ;
			System.out.println("type_cmd = "			+ reponse.type_cmd) ;
			System.out.println("jour = "				+ reponse.jour) ;
			System.out.println("cd_etat_cmd = " 		+ reponse.cd_etat_cmd_reponse) ;
			System.out.println("k_parution = "			+ reponse.k_parution) ;
			System.out.println("top_supp_autorise = "	+ reponse.top_supp_autorise) ;
			System.out.println("dt_distrib = "			+ reponse.dt_distrib) ;
			
			
		}
		return jwlwcdm1;
	   } // End getListeCommandes
	   
	//FIN  INTERROGATION
	
	
	/**
	 * <p>Titre : setListeCommandes</p>
	 * <p>Copyright : Copyright (c) 2012</p>
	 * <p>Societe : ENSOR</p>
	 * @author AR & DR & PY <i>12/09/2012</i>
	 * @version 1.0
	 */
	public static Jwlwcdm1 setListeCommandes(
			String f_cd_cible,
			String f_code_titre,
			String f_cd_cmd,
			String f_dt_trt,
			String f_dt_parution,
			String f_etat_cmd,
			String c_dt_trt,
			String c_cd_etat_cmd,
			String groupe_exploitant,
			String numero_session,
			String utilisateur,
			String cd_cible,
			String cd_stegrp,
			Broker broker) throws BrokerException {
		// Initialisation des variables en entrees
	    Jwlwcdm1 jwlwcdm1 		  = new Jwlwcdm1(broker, Constantes.SERVER_ADRESSE);	
		// Initialisation de la vWebent depuis les informations de connexion
		Jwlwcdm1.Nwlwcdm1Axwebent vWebent = jwlwcdm1.new Nwlwcdm1Axwebent();
		vWebent.dbid 			  = new BigDecimal (Constantes.DBID);
		vWebent.cible_exploitant  = Constantes.CD_CIBLE;
		vWebent.groupe_exploitant = groupe_exploitant;
		vWebent.numero_session 	  = new BigDecimal (numero_session);
		vWebent.utilisateur    	  = utilisateur;
		vWebent.transaction 	  = "WLWSTLST";
		vWebent.fonction 		  = "MODIF";
		vWebent.cd_cible 		  = cd_cible;
		vWebent.cd_stegrp 		  = cd_stegrp;
		vWebent.cd_application 	  = Constantes.CD_APPLICATION;
		jwlwcdm1.setNwlwcdm1Axwebent (vWebent);
		
		// Initialisation de la demande (tous a vide pour l instant)
		Jwlwcdm1.Nwlwcdm1Awlwcdm1 vLwcdm1 				    = jwlwcdm1.new Nwlwcdm1Awlwcdm1();
		Jwlwcdm1.Nwlwcdm1Awlwcdm1Demande vLwcdm1Demande = jwlwcdm1.new Nwlwcdm1Awlwcdm1Demande();
		Jwlwcdm1.Nwlwcdm1Awlwcdm1Reponse vLwcdm1reponse = jwlwcdm1.new Nwlwcdm1Awlwcdm1Reponse();
		
		vLwcdm1Demande.cd_cible 	= f_cd_cible;
		vLwcdm1Demande.code_titre 	= f_code_titre;
		vLwcdm1Demande.cd_cmd 		= f_cd_cmd;
		vLwcdm1Demande.dt_trt 		= f_dt_trt;
		vLwcdm1Demande.dt_parution 	= f_dt_parution;
		vLwcdm1Demande.cd_etat_cmd 	= f_etat_cmd;
		
		Jwlwcdm1.Nwlwcdm1Awlwcdm1Controle vLwcdm1Controle = jwlwcdm1.new Nwlwcdm1Awlwcdm1Controle();
		vLwcdm1Controle.c_cd_etat_cmd = c_cd_etat_cmd;
		if(!"".equals(c_dt_trt) && c_dt_trt!=null){
			vLwcdm1Controle.c_dt_trt	  = new BigDecimal(c_dt_trt);
		}
		vLwcdm1.controle = vLwcdm1Controle;
		
		//vLwcdm1reponse.cd_etat_cmd_reponse  = f_etat_cmd;
		
		
		vLwcdm1.demande = vLwcdm1Demande;
		vLwcdm1.reponse = vLwcdm1reponse;
		
		jwlwcdm1.setNwlwcdm1Awlwcdm1(vLwcdm1);
		
		// CALL SERVER
		jwlwcdm1.nwlwcdm1();
		
		// Verification du code retour
		vWebent = jwlwcdm1.getNwlwcdm1Axwebent();
		System.out.println("Code retour nwlwcdm1() = " + vWebent.code_retour.intValue());
		
		if(vWebent.code_retour.intValue() != 0){
			for(int i=0; i < vWebent.nb_ano.intValue(); i++){
			   System.out.println(vWebent.t_ano[i].code_ano + "[" + vWebent.t_ano[i].type_ano + "] :  " + vWebent.t_ano[i].lib_ano.trim() + " ");
		   	}
		}
		else{
			System.out.println ("Suite normale");
		}
		
		return jwlwcdm1;
	   } // End setListeCommandes
	
	public static Jwlwcdm1 deleteListeCommandes(
			String f_code_titre,
			String f_cd_cmd,
			String f_dt_parution,
			String f_dt_tt,
			String groupe_exploitant,
			String numero_session,
			String utilisateur,
			String cd_cible,
			String cd_stegrp,
			Broker broker) throws BrokerException {
			// Initialisation des variables en entrees
		    Jwlwcdm1 jwlwcdm1 		  = new Jwlwcdm1(broker, Constantes.SERVER_ADRESSE);	
			// Initialisation de la vWebent depuis les informations de connexion
			Jwlwcdm1.Nwlwcdm1Axwebent vWebent = jwlwcdm1.new Nwlwcdm1Axwebent();
			vWebent.dbid 			  = new BigDecimal (Constantes.DBID);
			vWebent.cible_exploitant  = Constantes.CD_CIBLE;
			vWebent.groupe_exploitant = groupe_exploitant;
			vWebent.numero_session 	  = new BigDecimal (numero_session);
			vWebent.utilisateur    	  = utilisateur;
			vWebent.transaction 	  = "WLWSTLST";
			vWebent.fonction 		  = "SUPP";
			vWebent.cd_cible 		  = cd_cible;
			vWebent.cd_stegrp 		  = cd_stegrp;
			vWebent.cd_application 	  = Constantes.CD_APPLICATION;
			jwlwcdm1.setNwlwcdm1Axwebent (vWebent);
			
			// Initialisation de la demande (tous a vide pour l instant)
			Jwlwcdm1.Nwlwcdm1Awlwcdm1 vLwcdm1 = jwlwcdm1.new Nwlwcdm1Awlwcdm1();
			
			Jwlwcdm1.Nwlwcdm1Awlwcdm1Demande vLwcdm1Demande = jwlwcdm1.new Nwlwcdm1Awlwcdm1Demande();
			Jwlwcdm1.Nwlwcdm1Awlwcdm1Reponse vLwcdm1reponse = jwlwcdm1.new Nwlwcdm1Awlwcdm1Reponse();

			vLwcdm1Demande.code_titre 	= f_code_titre;
			vLwcdm1Demande.dt_parution 	= f_dt_parution;
			vLwcdm1Demande.dt_trt 		= f_dt_tt;
			vLwcdm1Demande.cd_cmd 	    = f_cd_cmd;
			
			vLwcdm1.demande = vLwcdm1Demande;
			vLwcdm1.reponse = vLwcdm1reponse;
			
			jwlwcdm1.setNwlwcdm1Awlwcdm1(vLwcdm1);
			
			// CALL SERVER
			jwlwcdm1.nwlwcdm1();
			
			// Verification du code retour
			vWebent = jwlwcdm1.getNwlwcdm1Axwebent();
			System.out.println("Code retour nwlwcdm1() = " + vWebent.code_retour.intValue());
			
			if(vWebent.code_retour.intValue() != 0){
				for(int i=0; i < vWebent.nb_ano.intValue(); i++){
				   System.out.println(vWebent.t_ano[i].code_ano + "[" + vWebent.t_ano[i].type_ano + "] :  " + vWebent.t_ano[i].lib_ano.trim() + " ");
			   	}
			}
			else{
				System.out.println ("Suite normale");
			}
			
			System.out.println("Code_titre :: "+vLwcdm1Demande.code_titre);
			
			return jwlwcdm1;
		   } // End setListeCommandes
	
	
	/**
	 * <p>Titre : createListeCommandes</p>
	 * <p>Copyright : Copyright (c) 2012</p>
	 * <p>Societe : ENSOR</p>
	 * @author AR & DR & PY <i>12/09/2012</i>
	 * @version 1.0
	 */
	public static Jwlwcdm1 createListeCommandes(              
			String f_cd_cible,
			String f_code_titre,
			String f_cd_cmd,
			String f_dt_trt,
			String f_dt_parution,
			String groupe_exploitant,
			String numero_session,
			String utilisateur,
			String cd_cible,
			String cd_stegrp,
			Broker broker) throws BrokerException {
		// Initialisation des variables en entrees
	    Jwlwcdm1 jwlwcdm1 		  = new Jwlwcdm1(broker, Constantes.SERVER_ADRESSE);	
		// Initialisation de la vWebent depuis les informations de connexion
		Jwlwcdm1.Nwlwcdm1Axwebent vWebent = jwlwcdm1.new Nwlwcdm1Axwebent();
		vWebent.dbid 			  = new BigDecimal (Constantes.DBID);
		vWebent.cible_exploitant  = Constantes.CD_CIBLE;
		vWebent.groupe_exploitant = groupe_exploitant;
		vWebent.numero_session 	  = new BigDecimal (numero_session);
		vWebent.utilisateur    	  = utilisateur;
		vWebent.transaction 	  = "WLWSTLST";
		vWebent.fonction 		  = "CREAT";
		vWebent.cd_cible 		  = cd_cible;
		vWebent.cd_stegrp 		  = cd_stegrp;
		vWebent.cd_application 	  = Constantes.CD_APPLICATION;
		jwlwcdm1.setNwlwcdm1Axwebent (vWebent);
		
		// Initialisation de la demande (tous a vide pour l instant)
		Jwlwcdm1.Nwlwcdm1Awlwcdm1 vLwcdm1 				    = jwlwcdm1.new Nwlwcdm1Awlwcdm1();
		Jwlwcdm1.Nwlwcdm1Awlwcdm1Demande vLwcdm1Demande = jwlwcdm1.new Nwlwcdm1Awlwcdm1Demande();
		Jwlwcdm1.Nwlwcdm1Awlwcdm1Reponse vLwcdm1reponse = jwlwcdm1.new Nwlwcdm1Awlwcdm1Reponse();

		//vLwcdm1Demande.cd_etat_cmd 	= f_cd_etat_cmd;
		vLwcdm1Demande.cd_cible 	= f_cd_cible;
		vLwcdm1Demande.code_titre 	= f_code_titre;
		vLwcdm1Demande.cd_cmd 		= f_cd_cmd;
		vLwcdm1Demande.dt_trt 		= f_dt_trt;
		vLwcdm1Demande.dt_parution 	= f_dt_parution;
		
		vLwcdm1.demande = vLwcdm1Demande;
		vLwcdm1.reponse = vLwcdm1reponse;
		
		jwlwcdm1.setNwlwcdm1Awlwcdm1(vLwcdm1);
		
		// CALL SERVER
		jwlwcdm1.nwlwcdm1();
		
		// Verification du code retour
		vWebent = jwlwcdm1.getNwlwcdm1Axwebent();
		System.out.println("Code retour nwlwcdm1() = " + vWebent.code_retour.intValue());
		
		if(vWebent.code_retour.intValue() != 0){
			for(int i=0; i < vWebent.nb_ano.intValue(); i++){
			   System.out.println(vWebent.t_ano[i].code_ano + "[" + vWebent.t_ano[i].type_ano + "] :  " + vWebent.t_ano[i].lib_ano.trim() + " ");
		   	}
		}
		else{
			System.out.println ("Suite normale");
		}
		
		return jwlwcdm1;
	   } // End createListeCommandes
	   
	public static Jwlwcdm1 copieListeCommandes(              
			String f_id_cmd_cc,
			String f_cd_cible_cc,
			String f_code_titre,
			String f_cd_cmd,
			String f_cd_etat_cmd,
			String f_dt_trt,
			String f_dt_parution,
			String groupe_exploitant,
			String numero_session,
			String utilisateur,
			String cd_cible,
			String cd_stegrp,
			Broker broker) throws BrokerException {
		// Initialisation des variables en entrees
	    Jwlwcdm1 jwlwcdm1 		  = new Jwlwcdm1(broker, Constantes.SERVER_ADRESSE);	
		// Initialisation de la vWebent depuis les informations de connexion
		Jwlwcdm1.Nwlwcdm1Axwebent vWebent = jwlwcdm1.new Nwlwcdm1Axwebent();
		vWebent.dbid 			  = new BigDecimal (Constantes.DBID);
		vWebent.cible_exploitant  = Constantes.CD_CIBLE;
		vWebent.groupe_exploitant = groupe_exploitant;
		vWebent.numero_session 	  = new BigDecimal (numero_session);
		vWebent.utilisateur    	  = utilisateur;
		vWebent.transaction 	  = "WLWSTLST";
		vWebent.fonction 		  = "CREAT";
		vWebent.cd_cible 		  = cd_cible;
		vWebent.cd_stegrp 		  = cd_stegrp;
		vWebent.cd_application 	  = Constantes.CD_APPLICATION;
		jwlwcdm1.setNwlwcdm1Axwebent (vWebent);
		
		// Initialisation de la demande (tous a vide pour l instant)
		Jwlwcdm1.Nwlwcdm1Awlwcdm1 vLwcdm1 				    = jwlwcdm1.new Nwlwcdm1Awlwcdm1();
		Jwlwcdm1.Nwlwcdm1Awlwcdm1Demande vLwcdm1Demande = jwlwcdm1.new Nwlwcdm1Awlwcdm1Demande();
		Jwlwcdm1.Nwlwcdm1Awlwcdm1Reponse vLwcdm1reponse = jwlwcdm1.new Nwlwcdm1Awlwcdm1Reponse();
		Jwlwcdm1.Nwlwcdm1Awlwcdm1Copie vLwcdm1copie		= jwlwcdm1.new Nwlwcdm1Awlwcdm1Copie();
		
		vLwcdm1Demande.code_titre 	= f_code_titre;
		vLwcdm1Demande.cd_cmd 		= f_cd_cmd;
		vLwcdm1Demande.dt_trt 		= f_dt_trt;
		vLwcdm1Demande.dt_parution 	= f_dt_parution;
		vLwcdm1Demande.cd_etat_cmd 	= f_cd_etat_cmd;

		//vLwcdm1Demande.cd_etat_cmd 	= f_cd_etat_cmd;
		vLwcdm1copie.top_cc			= "O";
		vLwcdm1copie.cd_cible_cc	= f_cd_cible_cc;
		if(!"".equals(f_id_cmd_cc) && f_id_cmd_cc!=null){
			vLwcdm1copie.id_cmd_cc		= new BigDecimal(f_id_cmd_cc);
		}
		
		vLwcdm1.demande = vLwcdm1Demande;
		vLwcdm1.reponse = vLwcdm1reponse;
		vLwcdm1.copie = vLwcdm1copie ;
		
		jwlwcdm1.setNwlwcdm1Awlwcdm1(vLwcdm1);
		
		// CALL SERVER
		jwlwcdm1.nwlwcdm1();
		
		// Verification du code retour
		vWebent = jwlwcdm1.getNwlwcdm1Axwebent();
		System.out.println("Code retour nwlwcdm1() = " + vWebent.code_retour.intValue());
		
		if(vWebent.code_retour.intValue() != 0){
			for(int i=0; i < vWebent.nb_ano.intValue(); i++){
			   System.out.println(vWebent.t_ano[i].code_ano + "[" + vWebent.t_ano[i].type_ano + "] :  " + vWebent.t_ano[i].lib_ano.trim() + " ");
		   	}
		}
		else{
			System.out.println ("Suite normale");
		}
		
		return jwlwcdm1;
	   } // End copieListeCommandes
	
	/**
	 * <p>Titre : setListeCommandes</p>
	 * <p>Copyright : Copyright (c) 2012</p>
	 * <p>Societe : ENSOR</p>
	 * @author AR & DR & PY <i>12/09/2012</i>
	 * @version 1.0
	 */
	public static Jwlwcdm1 getCommandeById(
			String f_cd_cible_cc,
			String f_id_cmd_cc,
			String groupe_exploitant,
			String numero_session,
			String utilisateur,
			String cd_cible,
			String cd_stegrp,
			Broker broker) throws BrokerException {
		// Initialisation des variables en entrees
	    Jwlwcdm1 jwlwcdm1 		  = new Jwlwcdm1(broker, Constantes.SERVER_ADRESSE);	
		// Initialisation de la vWebent depuis les informations de connexion
		Jwlwcdm1.Nwlwcdm1Axwebent vWebent = jwlwcdm1.new Nwlwcdm1Axwebent();
		vWebent.dbid 			  = new BigDecimal (Constantes.DBID);
		vWebent.cible_exploitant  = Constantes.CD_CIBLE;
		vWebent.groupe_exploitant = groupe_exploitant;
		vWebent.numero_session 	  = new BigDecimal (numero_session);
		vWebent.utilisateur    	  = utilisateur;
		vWebent.transaction 	  = "WLWSTLST";
		vWebent.fonction 		  = "VISU";
		vWebent.cd_cible 		  = cd_cible;
		vWebent.cd_stegrp 		  = cd_stegrp;
		vWebent.cd_application 	  = Constantes.CD_APPLICATION;
		jwlwcdm1.setNwlwcdm1Axwebent (vWebent);
		
		// Initialisation de la demande (tous a vide pour l instant)
		Jwlwcdm1.Nwlwcdm1Awlwcdm1 vLwcdm1 				    = jwlwcdm1.new Nwlwcdm1Awlwcdm1();
		Jwlwcdm1.Nwlwcdm1Awlwcdm1Copie vLwcdm1copie		= jwlwcdm1.new Nwlwcdm1Awlwcdm1Copie();
		
		vLwcdm1copie.cd_cible_cc 	= f_cd_cible_cc;
		if(!"".equals(f_id_cmd_cc) && f_id_cmd_cc!=null){
			vLwcdm1copie.id_cmd_cc		= new BigDecimal(f_id_cmd_cc);
		}
			
		vLwcdm1.copie = vLwcdm1copie;
		jwlwcdm1.setNwlwcdm1Awlwcdm1(vLwcdm1);
		
		// CALL SERVER
		jwlwcdm1.nwlwcdm1();
		
		// Verification du code retour
		vWebent = jwlwcdm1.getNwlwcdm1Axwebent();
		System.out.println("Code retour nwlwcdm1() = " + vWebent.code_retour.intValue());
		
		if(vWebent.code_retour.intValue() != 0){
			for(int i=0; i < vWebent.nb_ano.intValue(); i++){
			   System.out.println(vWebent.t_ano[i].code_ano + "[" + vWebent.t_ano[i].type_ano + "] :  " + vWebent.t_ano[i].lib_ano.trim() + " ");
		   	}
		}
		else{
			System.out.println ("Affichage reponse");
			//affichage de reponse
			Jwlwcdm1.Nwlwcdm1Awlwcdm1 jwlwcdm1Reponse = jwlwcdm1.getNwlwcdm1Awlwcdm1() ;
			Jwlwcdm1.Nwlwcdm1Awlwcdm1Reponse reponse = jwlwcdm1Reponse.reponse;
			
			System.out.println("ID-CMD = " 				+ reponse.id_cmd) ;
			System.out.println("CD-CIBLE-REPONSE = " 	+ reponse.cd_cible_reponse) ;
			System.out.println("CODE-TITRE-REPONSE = " 	+ reponse.code_titre_reponse) ;
			System.out.println("LIB-TITRE = " 			+ reponse.lib_titre) ;
			System.out.println("CD-CMD-REPONSE = "		+ reponse.cd_cmd_reponse) ;
			System.out.println("LIB-CMD = "				+ reponse.lib_cmd) ;
			System.out.println("CD-ETAT-CMD-REPONSE = "	+ reponse.cd_etat_cmd_reponse) ;
			System.out.println("DT-PARUTION-REPONSE = " + reponse.dt_parution_reponse) ;
			System.out.println("JOUR = "				+ reponse.jour) ;
			System.out.println("K-PARUTION = "			+ reponse.k_parution) ;
			System.out.println("DT-TRT-REPONSE = "		+ reponse.dt_trt_reponse) ;
			System.out.println("TYPE-PARUTION-PRESSE = "+ reponse.type_parution_presse) ;
			System.out.println("TOP-COIFFE = "			+ reponse.top_coiffe) ;
			System.out.println("TOP-SUPP-AUTORISE = "	+ reponse.top_supp_autorise) ;
			System.out.println("DT-DISTRIB = "			+ reponse.dt_distrib) ;
			System.out.println("NOM-CIBLE = "			+ reponse.nom_cible) ;
			System.out.println("TYPE-CMD = "			+ reponse.type_cmd) ;
		}
		return jwlwcdm1;
	   } // End getCommandeById
	
	   /**
		 * <p>Titre : main</p>
		 * <p>Description : Programme principal de tests</p>
		 * <p>Copyright : Copyright (c) 2012</p>
		 * <p>Societe : ENSOR</p>
		 * @author AR & DR & PY <i>25/03/2012</i>
		 * @version 1.0
		 */
	   public static void main(String[] args) throws BrokerException {
			Constantes.loadProperties("LW") ;
			JxweblogWeb.setUtilisateur ("MADAA02");
			JxweblogWeb.setPassword ("MADAA62");
			Broker broker 				    	= JxweblogWeb.logonBroker();
			Jxweblog jxweblog 				    = JxweblogWeb.getConnexion(broker);
			Jxweblog.NxweblogAxwebent connexion = jxweblog.getNxweblogAxwebent();
			
			String groupe_exploitant = connexion.groupe_exploitant;
			String numero_session 	 = Integer.toString(connexion.numero_session.intValue());
			String utilisateur 		 = connexion.utilisateur;
			String cd_cible 		 = connexion.cd_cible;
			String cd_stegrp 		 = connexion.cd_stegrp;
			
			//Test de INTEROGATION
			//---------Donnee Test---------------
			/*String f_code_titre  = "FIQ";
			String f_cd_cmd  	 = "TEXPPOST";
			String f_dt_parution = "20120927";
			//---------Donnee Test---------------
			getListeCommandes(f_code_titre, f_cd_cmd, f_dt_parution, 
					groupe_exploitant, numero_session, utilisateur, cd_cible, cd_stegrp, broker);
			*/
			
			
			//Test de MODIFICATION
			//---------Donnee Test---------------
			/*String f_cd_cible    = null;
			String f_code_titre  = "FIQ";
			String f_dt_parution = "20120927";
			String f_dt_trt 	 = "20120801";
			String f_cd_cmd      = "TEXPPOST";
			String f_etat_cmd	 = "P";
			//---------Donnee Test---------------
			setListeCommandes(f_cd_cible, f_code_titre, f_cd_cmd, f_dt_trt, f_dt_parution, f_etat_cmd,
							groupe_exploitant, numero_session, utilisateur, cd_cible, cd_stegrp, broker);
			*/
			
			
			/*//Test de CREATION
			//---------Donnee Test---------------
			String f_cd_cible    = null;
			String f_code_titre  = "FIQ";
			String f_cd_cmd  	 = "TEXPPREV";
			String f_dt_parution = "20121001";
			String f_dt_trt 	 = "20120927";
			//---------Donnee Test---------------
			createListeCommandes(f_cd_cible,
					f_code_titre, f_cd_cmd, f_dt_trt, f_dt_parution, 
					groupe_exploitant, numero_session, utilisateur, cd_cible, cd_stegrp, broker);
			*/
			
			/*//Test de SUPPRESSION
			//---------Donnee Test---------------
			String f_code_titre  = "FIQ";
			String f_cd_cmd      = "TEXPPREV";
			String f_dt_parution = "20120920";
			String f_dt_tt 		 = "20120920";
			//---------Donnee Test---------------
			deleteListeCommandes(f_code_titre, f_cd_cmd, f_dt_parution, f_dt_tt, 
					groupe_exploitant, numero_session, utilisateur, cd_cible, cd_stegrp, broker);
	   
			*/
			//Test COPIE
			//---------Donnee Test---------------
			/*String f_id_cmd_cc 	 = "843" ;
			String f_cd_cible_cc = "50" ;
			String f_code_titre  = "FMG" ;
			String f_cd_cmd 	 = "TEXPPOST" ;
			String f_cd_etat_cmd = "P" ;
			String f_dt_trt 	 = "20121016" ;
			String f_dt_parution = "20121031" ;
			//---------Donnee Test---------------
			copieListeCommandes(f_id_cmd_cc, f_cd_cible_cc, f_code_titre,
					f_cd_cmd, f_cd_etat_cmd, f_dt_trt, f_dt_parution,
					groupe_exploitant, numero_session, utilisateur, cd_cible, cd_stegrp, broker);*/
			//TEST GET BY ID
			String f_id_cmd_cc 	 = "1" ;
			String f_cd_cible_cc = "50" ;
			getCommandeById(
				f_cd_cible_cc,
				f_id_cmd_cc,
				groupe_exploitant, numero_session, utilisateur, cd_cible, cd_stegrp, broker) ;
			
			
	   }			
}