Ignore:
Timestamp:
04/26/10 19:12:49 (14 years ago)
Author:
cbipsl
Message:

maj eccad V3.2

Location:
ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance
Files:
59 edited

Legend:

Unmodified
Added
Removed
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/GestionFichier.java

    r68 r70  
    3636         out.close(); 
    3737        } catch (IOException e) { 
    38          //system.out.println(e.toString()); 
     38                        e.printStackTrace(); 
    3939        }  
    4040        } 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/PropertiesDatabase.java

    r68 r70  
    1212         
    1313        public PropertiesDatabase() { 
    14                 LoggerPerso.log(PropertiesDatabase.class, LoggerPerso.DEBUG, "chargement fichier de properties"); 
     14//              LoggerPerso.log(PropertiesDatabase.class, LoggerPerso.DEBUG, "chargement fichier de properties"); 
    1515                String fichierProp = Lanceur.class.getResource("").getPath() + "/../../../../../propriete/serveur.properties"; 
    1616                fichierProp.replaceAll("%20", " "); 
    1717                prop = new Properties(); 
    1818                try { 
    19                         LoggerPerso.log(PropertiesDatabase.class, LoggerPerso.DEBUG, "chargement de : " + fichierProp); 
     19//                      LoggerPerso.log(PropertiesDatabase.class, LoggerPerso.DEBUG, "chargement de : " + fichierProp); 
    2020                        prop.load(new FileInputStream(fichierProp)); 
    2121                } catch (Exception e) { 
     
    3636                info.setDb_passwd(prop.getProperty("password")); 
    3737                 
    38                 LoggerPerso.log(PropertiesDatabase.class, LoggerPerso.DEBUG, "chargement :" + info); 
     38//              LoggerPerso.log(PropertiesDatabase.class, LoggerPerso.DEBUG, "chargement :" + info); 
    3939                return info; 
    4040        } 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/SGBD_jdbc.java

    r68 r70  
    1717import org.medias.eccad.modele.Parametre; 
    1818import org.medias.eccad.modele.Produit; 
     19import org.medias.eccad.modele.Secteur; 
    1920import org.postgresql.ds.PGPoolingDataSource; 
    2021import org.postgresql.largeobject.LargeObject; 
     
    2829        public SGBD_jdbc(InfoConnectBean info) { 
    2930                con = null; 
    30                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "construction connection"); 
     31//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "construction connection"); 
    3132                if (pooling == null) { 
    32                         LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "creation pooling :: " + info); 
     33//                      LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "creation pooling :: " + info); 
    3334                        pooling = new PGPoolingDataSource(); 
    3435                        pooling.setDatabaseName(info.getDb_name()); 
     
    188189                } 
    189190                 
    190                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListParametre::taille::"+liste_param.size()); 
     191//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListParametre::taille::"+liste_param.size()); 
    191192                return liste_param; 
    192193        } 
     
    198199                 
    199200                requete = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
    200                 sql = "select distinct id_produit, title_produit, begintime_produit, endtime_produit from produit join grille using (id_produit) where id_param = " + id_param + ";"; 
     201                sql = "select distinct id_produit, title_produit, begintime_produit, endtime_produit, order_produit from produit join grille using (id_produit) where id_param = " + id_param + " order by order_produit;"; 
    201202                 
    202203                ResultSet resultat = requete.executeQuery(sql); 
     
    209210                } 
    210211                 
    211                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListProduit::taille::"+liste_param.size()); 
     212//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListProduit::taille::"+liste_param.size()); 
    212213                return liste_param; 
    213214                 
     
    228229                } 
    229230                 
    230                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getParametreById::nom::"+ param.getNom()); 
     231//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getParametreById::nom::"+ param.getNom()); 
    231232 
    232233                return param; 
     
    250251                } 
    251252                 
    252                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getProduitById::nom::"+ produit.getNom() + "::date::" + produit.getBeginDate()); 
     253//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getProduitById::nom::"+ produit.getNom() + "::date::" + produit.getBeginDate()); 
    253254 
    254255                return produit; 
     
    263264                requete = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
    264265                sql = "select distinct valeurs_grille, date_grille from grille where id_produit = " + id_produit + " and date_grille >= '" + date_debut + "' and date_grille <= '" + date_fin + "' order by date_grille;"; 
    265                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListGrille::requete :: " + sql); 
     266//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListGrille::requete :: " + sql); 
    266267                ResultSet resultat = requete.executeQuery(sql); 
    267268                 
     
    270271                } 
    271272                 
    272                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListGrille::taille::"+liste_param.size() + "id_produit::" + id_produit); 
     273//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListGrille::taille::"+liste_param.size() + "id_produit::" + id_produit); 
    273274                return liste_param; 
    274275        } 
    275276         
    276          
     277        public List<Secteur> getListSectorByParam(int id_param) throws SQLException { 
     278                Statement requete; 
     279                String sql; 
     280                List<Secteur> liste_secteur = new LinkedList<Secteur>(); 
     281                 
     282                requete = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
     283                sql = "select id_secteur, fullname_secteur, id_categorieparametre from secteur; "; 
     284                 
     285                ResultSet resultat = requete.executeQuery(sql); 
     286                 
     287                while (resultat.next()) { 
     288                        liste_secteur.add(new Secteur(resultat.getInt("id_secteur"), resultat.getString("fullname_secteur"))); 
     289                } 
     290                 
     291                //LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListSecteur::taille::"+liste_secteur.size()); 
     292                return liste_secteur; 
     293                 
     294        } 
    277295         
    278296} 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/ServicePersistance.java

    r68 r70  
    11package org.medias.eccad.persistance; 
    22 
     3import java.util.ArrayList; 
    34import java.util.List; 
    45 
    5  
    6 import org.medias.eccad.helpers.LoggerPerso; 
    76import org.medias.eccad.helpers.SpringBeanFactory; 
    87import org.medias.eccad.modele.*; 
     
    109import org.medias.eccad.persistance.dao.MappingDAO; 
    1110import org.medias.eccad.persistance.dao.ParametreDAO; 
     11import org.medias.eccad.persistance.dao.RcpDAO; 
     12import org.medias.eccad.persistance.dao.SecteurDAO; 
    1213import org.medias.eccad.persistance.dao.CatParametreDAO; 
    1314import org.medias.eccad.persistance.dao.ProduitDAO; 
    1415import org.medias.eccad.persistance.exception.PersistanceException; 
    15 import org.medias.eccad.persistance.jdbc.CatParametreDAOjdbc; 
    1616import org.springframework.beans.factory.xml.XmlBeanFactory; 
    1717 
     
    2121         
    2222        public ServicePersistance() { 
    23                 LoggerPerso.log(ServicePersistance.class, LoggerPerso.DEBUG, "création du service"); 
     23//              LoggerPerso.log(ServicePersistance.class, LoggerPerso.DEBUG, "création du service"); 
    2424                xmlbean = SpringBeanFactory.getXmlFactory(); 
    2525        } 
    2626         
    2727        public List<CatParametre> getListcatParametre() { 
    28                 LoggerPerso.log(ServicePersistance.class, LoggerPerso.DEBUG, "load DAOCAT"); 
     28//              LoggerPerso.log(ServicePersistance.class, LoggerPerso.DEBUG, "load DAOCAT"); 
    2929                List<CatParametre> liste_catParam; 
    3030                CatParametreDAO catParamdao = (CatParametreDAO) xmlbean.getBean("catParametreDAO"); 
    3131                try { 
    32                         LoggerPerso.log(ServicePersistance.class, LoggerPerso.DEBUG, "try...!"); 
    33                         liste_catParam = catParamdao.getListcatParametre(); 
     32                         liste_catParam = catParamdao.getListcatParametre(); 
    3433 
    3534                } catch (PersistanceException e) { 
     
    6766        } 
    6867         
     68        public List<Secteur> getListSectorByParam(int id_param, int id_prod, int id_rcp) { 
     69                List<Secteur> liste_secteur; 
     70                SecteurDAO secteur = (SecteurDAO) xmlbean.getBean("secteurDAO"); 
     71                 
     72                try { 
     73                         liste_secteur = secteur.getListSectorByParam(id_param,id_prod,id_rcp); 
     74                } catch (PersistanceException e) { 
     75                        e.printStackTrace(); 
     76                        return null; 
     77                } 
     78                return liste_secteur; 
     79        } 
     80         
     81        public List<Secteur> getListSecteur() { 
     82                List<Secteur> liste_secteur; 
     83                SecteurDAO secteurdao = (SecteurDAO) xmlbean.getBean("secteurDAO"); 
     84                try { 
     85                         liste_secteur = secteurdao.getListSecteur(); 
     86                } catch (PersistanceException e) { 
     87                        e.printStackTrace(); 
     88                        return null; 
     89                } 
     90                 
     91                return liste_secteur; 
     92        } 
     93         
     94        public List<Rcp> getListRcpByParam(int id_param, int id_prod, int id_sector) { 
     95                List<Rcp> liste_rcp; 
     96                RcpDAO rcpdao = (RcpDAO) xmlbean.getBean("rcpDAO"); 
     97                 
     98                try { 
     99                         liste_rcp = rcpdao.getListRcpByParam(id_param,id_prod,id_sector); 
     100                } catch (PersistanceException e) { 
     101                        e.printStackTrace(); 
     102                        return null; 
     103                } 
     104                return liste_rcp; 
     105        } 
     106         
    69107        public List<Produit> getListProductByParam(int id_param) { 
    70108                List<Produit> liste_param; 
     
    91129                } 
    92130 
    93                 LoggerPerso.log(ServicePersistance.class, LoggerPerso.DEBUG, "getProduitById::nom::"+ produit.getNom() + "::date::" + produit.getBeginDate()); 
     131//              LoggerPerso.log(ServicePersistance.class, LoggerPerso.DEBUG, "getProduitById::nom::"+ produit.getNom() + "::date::" + produit.getBeginDate()); 
    94132                return produit; 
    95133        } 
    96134         
    97         public List<Grille> getListGrille(long id_produit, long id_parametre,String date_debut, String date_fin) { 
     135        public Secteur getSecteurByID(long id_secteur) { 
     136                Secteur secteur = null; 
     137                SecteurDAO secteurdao = (SecteurDAO) xmlbean.getBean("secteurDAO"); 
     138                 
     139                try { 
     140                        secteur = secteurdao.getSecteurById(id_secteur); 
     141                } catch (PersistanceException e) { 
     142                        e.printStackTrace(); 
     143                        return null; 
     144                } 
     145 
     146//              LoggerPerso.log(ServicePersistance.class, LoggerPerso.DEBUG, "getSecteurById::nom::"+ secteur.getNom()); 
     147                return secteur; 
     148        } 
     149 
     150        public Rcp getRcpByID(long id_rcp) { 
     151                Rcp rcp = null; 
     152                RcpDAO rcpdao = (RcpDAO) xmlbean.getBean("rcpDAO"); 
     153                 
     154                try { 
     155                        rcp = rcpdao.getRcpById(id_rcp); 
     156                } catch (PersistanceException e) { 
     157                        e.printStackTrace(); 
     158                        return null; 
     159                } 
     160                return rcp; 
     161        } 
     162         
     163        public List<Grille> getListGrille(long id_produit, long id_parametre, long id_secteur, long id_rcp, String date_debut, String date_fin, String nomProd, String legend, String typeProd) { 
    98164                List<Grille> grille; 
    99165                GrilleDAO grilledao = (GrilleDAO) xmlbean.getBean("grilleDAO"); 
    100166                try { 
    101                         grille = grilledao.getListGrille(id_produit, id_parametre, date_debut, date_fin); 
     167                        grille = grilledao.getListGrille(id_produit, id_parametre, id_secteur, id_rcp, date_debut, date_fin, nomProd, legend, typeProd); 
    102168                } catch (PersistanceException e) { 
    103169                        e.printStackTrace(); 
     
    121187        } 
    122188         
     189        public List<String> getListAlt(long id_secteur, String date_debut) { 
     190                List<String> liste_alt; 
     191                GrilleDAO grilledao = (GrilleDAO) xmlbean.getBean("grilleDAO"); 
     192                try { 
     193                        liste_alt = grilledao.getListAlt(id_secteur, date_debut); 
     194                } catch (PersistanceException e) { 
     195                        e.printStackTrace(); 
     196                        return null; 
     197                } 
     198 
     199                return liste_alt; 
     200        } 
     201         
     202        public List<Grille> getListMasques(String codifMasque) { 
     203                List<Grille> liste_reg; 
     204                GrilleDAO grilledao = (GrilleDAO) xmlbean.getBean("grilleDAO"); 
     205                try { 
     206                        liste_reg = grilledao.getListMasques(codifMasque); 
     207                } catch (PersistanceException e) { 
     208                        e.printStackTrace(); 
     209                        return null; 
     210                } 
     211 
     212                return liste_reg; 
     213        } 
     214 
    123215        public Parametre getParametreById(int id_param) { 
    124216                Parametre param = null; 
     
    151243                return mapping.getVisualisation(type_produit); 
    152244        } 
     245 
     246        public String getTypeCodif(long idGrille) { 
     247                String typeCodif; 
     248                GrilleDAO grilledao = (GrilleDAO) xmlbean.getBean("grilleDAO"); 
     249                try { 
     250                        typeCodif = grilledao.getTypeCodif(idGrille); 
     251                } catch (PersistanceException e) { 
     252                        e.printStackTrace(); 
     253                        return null; 
     254                } 
     255                return typeCodif; 
     256        } 
     257 
     258        public ArrayList<String> getDates(long idProduit, long idParametre,     long idSecteur, long idRcp, String nomprod) { 
     259                ArrayList<String> dates; 
     260                GrilleDAO grilledao = (GrilleDAO) xmlbean.getBean("grilleDAO"); 
     261                try { 
     262                        dates = grilledao.getDates(idProduit, idParametre, idSecteur, idRcp, nomprod); 
     263                } catch (PersistanceException e) { 
     264                        e.printStackTrace(); 
     265                        return null; 
     266                } 
     267 
     268                return dates; 
     269        } 
    153270} 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/dao/ColorTabDAO.java

    r68 r70  
    88 
    99public interface ColorTabDAO { 
    10         public abstract ColorTab getColorMapByID(long id)  throws PersistanceException; 
     10        public abstract ColorTab getColorMapByID(long id, long idClass)  throws PersistanceException; 
    1111        public abstract ColorTab getColorMapByParam(int idparam) throws PersistanceException; 
    12         public abstract ColorTab getColorMapByGrille(long id_grille) throws PersistanceException; 
    13         public abstract List<ColorMap> getListColorTabByGrille(long id_grille) throws PersistanceException; 
    14         public abstract List<ColorMap> getListColorTab() throws PersistanceException; 
    15         public abstract List<ColorMap> getListColorMapDynamique() throws PersistanceException; 
     12        public abstract ColorTab getColorMapByGrille() throws PersistanceException; 
     13        public abstract List<ColorMap> getListColorTabByGrille() throws PersistanceException; 
    1614} 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/dao/FactoryDAO.java

    r68 r70  
    44        public GrilleDAO getGrilleDAO(); 
    55        public ParametreDAO getParametreDAO(); 
     6        public SecteurDAO getSecteurDAO(); 
    67        public ProduitDAO getProduitDAO(); 
    78} 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/dao/GrilleDAO.java

    r68 r70  
    11package org.medias.eccad.persistance.dao; 
    22 
     3import java.util.ArrayList; 
    34import java.util.List; 
    45 
     
    78 
    89public interface GrilleDAO { 
    9         public List<Grille> getListGrille(long id_produit,long id_parametre, String date_debut, String date_fin) throws PersistanceException; 
     10        public List<Grille> getListGrille(long id_produit,long id_parametre, long id_secteur, long id_rcp, String date_debut, String date_fin, String nomProd, String legend, String typeProd) throws PersistanceException; 
    1011        public List<Grille> getListGrille(long id_produit, String date_debut, String date_fin) throws PersistanceException; 
     12        public List<String> getListAlt(long id_secteur, String date_debut) throws PersistanceException; 
     13        public List<Grille> getListMasques(String codifMasque) throws PersistanceException; 
    1114        public float[][] getGrilleValue(int oid) throws PersistanceException; 
    1215        public String getCodification(long id_grille) throws PersistanceException; 
     
    1619        public float getGrilleResolution(long id_grille) throws PersistanceException; 
    1720        public float getProduitResolution(long id_produit) throws PersistanceException; 
     21        public String getTypeCodif(long idGrille) throws PersistanceException; 
     22        public ArrayList<String> getDates(long idProduit, long idParametre,     long idSecteur, long idRcp, String nomProd) throws PersistanceException; 
    1823} 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/dummy/ColorTabDAOdummy.java

    r68 r70  
    2121        } 
    2222         
    23         public ColorTab getColorMapByGrille(long oid) { 
     23        public ColorTab getColorMapByGrille() { 
    2424                ColorTab colortab = new ColorTab(); 
    2525                colortab.setMin(min); 
     
    4444 
    4545        public ColorTab getColorMapByParam(int id_param) { 
    46                 return getColorMapByGrille(0); 
     46                return getColorMapByGrille(); 
    4747        } 
    4848 
    49         public List<ColorMap> getListColorTabByGrille(long oid) throws PersistanceException { 
     49        public List<ColorMap> getListColorTabByGrille() throws PersistanceException { 
    5050                List<ColorMap> liste = new LinkedList<ColorMap>(); 
    5151                 
     
    5858        } 
    5959 
    60         public List<ColorMap> getListColorTab() throws PersistanceException { 
    61                 List<ColorMap> liste = new LinkedList<ColorMap>(); 
    62                                  
    63                 return liste; 
    64         } 
    65  
    66         public ColorTab getColorMapByID(long id) throws PersistanceException { 
     60        public ColorTab getColorMapByID(long id, long idClass) throws PersistanceException { 
    6761                // TODO Auto-generated method stub 
    6862                return null; 
     
    7367                return null; 
    7468        } 
    75          
    76          
    7769 
    7870} 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/dummy/GrilleDAOdummy.java

    r68 r70  
    11package org.medias.eccad.persistance.dummy; 
    22 
     3import java.util.ArrayList; 
    34import java.util.LinkedList; 
    45import java.util.List; 
     
    2021                return data; 
    2122        } 
    22         public List<Grille> getListGrille(long id_produit,long id_parametre, String date_debut, 
    23                         String date_fin) throws PersistanceException { 
     23        public List<Grille> getListGrille(long id_produit,long id_parametre, long id_secteur, long id_rcp, String date_debut, 
     24                        String date_fin, String nomProd, String legend, String typeProd) throws PersistanceException { 
    2425                 
    2526                Grille grille; 
     
    104105                return 0; 
    105106        } 
     107        public String getTypeCodif(long idGrille) { 
     108                // TODO Auto-generated method stub 
     109                return null; 
     110        } 
     111 
     112        public ArrayList<String> getDates(long idProduit, long idParametre, 
     113                        long idSecteur, long idRcp, String nomProd) 
     114                        throws PersistanceException { 
     115                // TODO Auto-generated method stub 
     116                return null; 
     117        } 
     118        public List<String> getListAlt(long idSecteur, String dateDebut) 
     119                        throws PersistanceException { 
     120                // TODO Auto-generated method stub 
     121                return null; 
     122        } 
     123        public List<Grille> getListMasques(String codifMasque) throws PersistanceException { 
     124                // TODO Auto-generated method stub 
     125                return null; 
     126        } 
     127 
    106128 
    107129} 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/HibernateSGBD.java

    r68 r70  
    55 
    66/** 
    7  * Permet l'intéraction avec un système de gestion persistante de l'information 
     7 * Permet l'intï¿œraction avec un systï¿œme de gestion persistante de l'information 
    88 * @author Jean PINAUD 
    99 * 
     
    1414         
    1515        /** 
    16          * Début de la transaction 
     16         * Dï¿œbut de la transaction 
    1717         * 
    1818         */ 
    1919        public void connexion() { 
    20 //              //system.out.println("<<< Hibernate::Connexion >>>"); 
    2120                session = HibernateUtil.currentSession(); 
    2221                tx = session.beginTransaction(); 
     
    4342         
    4443        /** 
    45          * Constructeur par défaut 
     44         * Constructeur par dï¿œfaut 
    4645         * 
    4746         */ 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/HibernateUtil.java

    r68 r70  
    44import org.hibernate.*; 
    55import org.hibernate.cfg.*; 
    6 import org.medias.eccad.helpers.LoggerPerso; 
    76 
    87/** 
     
    2423 public static Session currentSession() 
    2524                throws HibernateException { 
    26          LoggerPerso.log(HibernateUtil.class, LoggerPerso.DEBUG, "--  connexion  --"); 
     25//       LoggerPerso.log(HibernateUtil.class, LoggerPerso.DEBUG, "--  connexion  --"); 
    2726  try { 
    2827           if (sessionFactory == null) { 
     
    3029                   } 
    3130                } catch (HibernateException ex) { 
    32                    throw new RuntimeException("Problème de configuration : " 
     31                   throw new RuntimeException("ProblÚme de configuration : " 
    3332                   + ex.getMessage(), ex); 
    3433                } 
     
    5049 public static void closeSession() 
    5150                throws HibernateException { 
    52          LoggerPerso.log(HibernateUtil.class, LoggerPerso.DEBUG, "--  deconnexion  --"); 
     51//       LoggerPerso.log(HibernateUtil.class, LoggerPerso.DEBUG, "--  deconnexion  --"); 
    5352   Session s = (Session) session.get(); 
    5453   session.set(null); 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/XmlDAOhibernate.java

    r68 r70  
    33import java.util.List; 
    44 
    5 import org.medias.eccad.helpers.CharactereHelper; 
    65import org.medias.eccad.persistance.dao.XmlDAO; 
    76import org.medias.eccad.persistance.hibernate.domaine.Produit; 
     
    109 
    1110        public String getXmlByProduit(long id) { 
    12                 List resultat; 
     11                List<?> resultat; 
    1312                Produit produitTO; 
    1413                connexion(); 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Categorieparametre.java

    r68 r70  
    1414 
    1515        // Fields     
     16 
     17        /** 
     18         *  
     19         */ 
     20        private static final long serialVersionUID = 1L; 
    1621 
    1722        private int idCategorieparametre; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Code.java

    r68 r70  
    99 
    1010        // Fields     
     11 
     12        /** 
     13         *  
     14         */ 
     15        private static final long serialVersionUID = 1L; 
    1116 
    1217        private int idCode; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Codification.java

    r68 r70  
    1212 
    1313        // Fields     
     14 
     15        /** 
     16         *  
     17         */ 
     18        private static final long serialVersionUID = 1L; 
    1419 
    1520        private int idCodification; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Color.java

    r68 r70  
    1212 
    1313        // Fields     
     14 
     15        /** 
     16         *  
     17         */ 
     18        private static final long serialVersionUID = 1L; 
    1419 
    1520        private int colId; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/ColorIndex.java

    r68 r70  
    99 
    1010        // Fields     
     11 
     12        /** 
     13         *  
     14         */ 
     15        private static final long serialVersionUID = 1L; 
    1116 
    1217        private ColorIndexId id; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/ColorIndexId.java

    r68 r70  
    99 
    1010        // Fields     
     11 
     12        /** 
     13         *  
     14         */ 
     15        private static final long serialVersionUID = 1L; 
    1116 
    1217        private int cmId; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Colormap.java

    r68 r70  
    1212 
    1313        // Fields     
     14 
     15        /** 
     16         *  
     17         */ 
     18        private static final long serialVersionUID = 1L; 
    1419 
    1520        private int cmId; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Concerne.java

    r68 r70  
    99 
    1010        // Fields     
     11 
     12        /** 
     13         *  
     14         */ 
     15        private static final long serialVersionUID = 1L; 
    1116 
    1217        private ConcerneId id; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/ConcerneId.java

    r68 r70  
    99 
    1010        // Fields     
     11 
     12        /** 
     13         *  
     14         */ 
     15        private static final long serialVersionUID = 1L; 
    1116 
    1217        private int idProduit; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Contact.java

    r68 r70  
    99 
    1010        // Fields     
     11 
     12        /** 
     13         *  
     14         */ 
     15        private static final long serialVersionUID = 1L; 
    1116 
    1217        private ContactId id; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/ContactId.java

    r68 r70  
    99 
    1010        // Fields     
     11 
     12        /** 
     13         *  
     14         */ 
     15        private static final long serialVersionUID = 1L; 
    1116 
    1217        private int idProduit; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Domaine.java

    r68 r70  
    1414 
    1515        // Fields     
     16 
     17        /** 
     18         *  
     19         */ 
     20        private static final long serialVersionUID = 1L; 
    1621 
    1722        private int idDomaine; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Fichier.java

    r68 r70  
    1111 
    1212        // Fields     
     13 
     14        /** 
     15         *  
     16         */ 
     17        private static final long serialVersionUID = 1L; 
    1318 
    1419        private int idFichier; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Fournit.java

    r68 r70  
    99 
    1010        // Fields     
     11 
     12        /** 
     13         *  
     14         */ 
     15        private static final long serialVersionUID = 1L; 
    1116 
    1217        private FournitId id; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/FournitId.java

    r68 r70  
    99 
    1010        // Fields     
     11 
     12        /** 
     13         *  
     14         */ 
     15        private static final long serialVersionUID = 1L; 
    1116 
    1217        private int idProduit; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Grille.java

    r68 r70  
    22 
    33// Generated 1 Juin 2007 15:03:29 by Hibernate Tools 3.2.0.beta7 
    4  
    5 import java.io.Serializable; 
    6 import java.util.Date; 
    74 
    85/** 
     
    129 
    1310        // Fields     
     11 
     12        /** 
     13         *  
     14         */ 
     15        private static final long serialVersionUID = 1L; 
    1416 
    1517        private int idGrille; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/LienpersonneId.java

    r68 r70  
    99 
    1010        // Fields     
     11 
     12        /** 
     13         *  
     14         */ 
     15        private static final long serialVersionUID = 1L; 
    1116 
    1217        private int idMetadata; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Metadata.hbm.xml

    r68 r70  
    2424            <one-to-many class="org.medias.eccad.persistance.hibernate.domaine.Produit" /> 
    2525        </set> 
    26         <set name="lienorganismes" inverse="true"> 
    27             <key> 
    28                 <column name="id_metadata" not-null="true" /> 
    29             </key> 
    30             <one-to-many class="org.medias.eccad.persistance.hibernate.domaine.Lienorganisme" /> 
    31         </set> 
    3226        <set name="lienpersonnes" inverse="true"> 
    3327            <key> 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Metadata.java

    r68 r70  
    3030        private Set<Produit> produits = new HashSet<Produit>(0); 
    3131 
    32         private Set<Lienorganisme> lienorganismes = new HashSet<Lienorganisme>(0); 
    33  
    3432        private Set<Lienpersonne> lienpersonnes = new HashSet<Lienpersonne>(0); 
    3533 
     
    4846        /** full constructor */ 
    4947        public Metadata(int idMetadata, String nameMetadata, String dateMetadata, 
    50                         String versionMetadata, Set<Produit> produits, 
    51                         Set<Lienorganisme> lienorganismes, Set<Lienpersonne> lienpersonnes) { 
     48                        String versionMetadata, Set<Produit> produits, Set<Lienpersonne> lienpersonnes) { 
    5249                this.idMetadata = idMetadata; 
    5350                this.nameMetadata = nameMetadata; 
     
    5552                this.versionMetadata = versionMetadata; 
    5653                this.produits = produits; 
    57                 this.lienorganismes = lienorganismes; 
    5854                this.lienpersonnes = lienpersonnes; 
    5955        } 
     
    7066                valeur += "\n"; 
    7167                valeur += XmlHelper.createNode("versionMetadata", versionMetadata); 
    72                 valeur += "\n"; 
    73                 valeur += XmlHelper.listToString("organismes", lienorganismes); 
    7468                valeur += "\n"; 
    7569                valeur += XmlHelper.listToString("personnes", lienpersonnes); 
     
    124118        } 
    125119 
    126         public Set<Lienorganisme> getLienorganismes() { 
    127                 return this.lienorganismes; 
    128         } 
    129  
    130         public void setLienorganismes(Set<Lienorganisme> lienorganismes) { 
    131                 this.lienorganismes = lienorganismes; 
    132         } 
    133  
    134120        public Set<Lienpersonne> getLienpersonnes() { 
    135121                return this.lienpersonnes; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Organisme.hbm.xml

    r68 r70  
    4242            <one-to-many class="org.medias.eccad.persistance.hibernate.domaine.Fournit" /> 
    4343        </set> 
    44         <set name="lienorganismes" inverse="true"> 
    45             <key> 
    46                 <column name="id_organisme" not-null="true" /> 
    47             </key> 
    48             <one-to-many class="org.medias.eccad.persistance.hibernate.domaine.Lienorganisme" /> 
    49         </set> 
    5044    </class> 
    5145</hibernate-mapping> 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Organisme.java

    r68 r70  
    1414 
    1515        // Fields     
     16 
     17        /** 
     18         *  
     19         */ 
     20        private static final long serialVersionUID = 1L; 
    1621 
    1722        private int idOrganisme; 
     
    3742        private Set<Fournit> fournits = new HashSet<Fournit>(0); 
    3843 
    39         private Set<Lienorganisme> lienorganismes = new HashSet<Lienorganisme>(0); 
    40  
    4144        // Constructors 
    4245 
     
    5558                        String faxOrganisme, String urlOrganisme, String addressOrganisme, 
    5659                        String zipcodeOrganisme, String cityOrganisme, 
    57                         String countryOrganisme, Set<Fournit> fournits, 
    58                         Set<Lienorganisme> lienorganismes) { 
     60                        String countryOrganisme, Set<Fournit> fournits) { 
    5961                this.idOrganisme = idOrganisme; 
    6062                this.fullnameOrganisme = fullnameOrganisme; 
     
    6870                this.countryOrganisme = countryOrganisme; 
    6971                this.fournits = fournits; 
    70                 this.lienorganismes = lienorganismes; 
    7172        } 
    7273 
     
    194195        } 
    195196 
    196         public Set<Lienorganisme> getLienorganismes() { 
    197                 return this.lienorganismes; 
    198         } 
    199  
    200         public void setLienorganismes(Set<Lienorganisme> lienorganismes) { 
    201                 this.lienorganismes = lienorganismes; 
    202         } 
    203  
    204197} 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/ParamColor.java

    r68 r70  
    99 
    1010        // Fields     
     11 
     12        /** 
     13         *  
     14         */ 
     15        private static final long serialVersionUID = 1L; 
    1116 
    1217        private ParamColorId id; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/ParamColorId.java

    r68 r70  
    99 
    1010        // Fields     
     11 
     12        /** 
     13         *  
     14         */ 
     15        private static final long serialVersionUID = 1L; 
    1116 
    1217        private int cmId; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Parametre.java

    r68 r70  
    1414 
    1515        // Fields     
     16 
     17        /** 
     18         *  
     19         */ 
     20        private static final long serialVersionUID = 1L; 
    1621 
    1722        private int idParam; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Personne.java

    r68 r70  
    1414 
    1515        // Fields     
     16 
     17        /** 
     18         *  
     19         */ 
     20        private static final long serialVersionUID = 1L; 
    1621 
    1722        private int idPersonne; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Produit.java

    r68 r70  
    99 
    1010import org.medias.eccad.helpers.CharactereHelper; 
    11 import org.medias.eccad.helpers.LoggerPerso; 
    1211import org.medias.eccad.helpers.XmlHelper; 
    1312 
     
    159158                valeur += "<metadonnees>" + "\n"; 
    160159                 
    161                 valeur += "<produit>" + "\n";            
    162                 LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "produit"); 
     160                valeur += "<produit>" + "\n"; 
     161//              LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "produit"); 
    163162                valeur += XmlHelper.createNode("idProduit", Integer.toString(idProduit)); 
    164163                valeur += XmlHelper.createNode("titleProduit", titleProduit); 
     
    185184                valeur += XmlHelper.createNode("headerProduit", headerProduit); 
    186185                valeur += XmlHelper.createNode("versionProduit", versionProduit); 
    187                 LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "produit_origine"); 
     186//              LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "produit_origine"); 
    188187                valeur += XmlHelper.objectToString(produitorig); 
    189                 LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "reference"); 
     188//              LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "reference"); 
    190189                valeur += XmlHelper.listToString("referenceses", concernes); 
    191                 LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "fin produit"); 
     190//              LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "fin produit"); 
    192191                valeur += "</produit>" + "\n"; 
    193192 
    194                 LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "domaine"); 
     193//              LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "domaine"); 
    195194                valeur += XmlHelper.objectToString(domaine); 
    196                 LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "typeproduit"); 
     195//              LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "typeproduit"); 
    197196                valeur += XmlHelper.objectToString(typeproduit); 
    198                 LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "metadata_produit"); 
     197//              LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "metadata_produit"); 
    199198                valeur += XmlHelper.objectToString(metadata); 
    200199 
    201200                //valeur += "<fichiers>" + listToString(fichiers) + "</fichiers>" + "\n"; 
    202                 LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "organismes"); 
     201//              LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "organismes"); 
    203202                valeur += XmlHelper.listToString("organismes", fournits); 
    204                 LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "parametre"); 
     203//              LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "parametre"); 
    205204                valeur += XmlHelper.listToString("parametre", grilles, 1) + "\n"; 
    206205                //valeur += "<requetes>" + listToString(requetes) + "</requetes>" + "\n"; 
    207                 LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "contacts"); 
     206//              LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "contacts"); 
    208207                valeur += XmlHelper.listToString("contacts", contacts); 
    209208                valeur += "</metadonnees>" + "\n"; 
    210209                 
    211210                valeur = CharactereHelper.getEncodage(valeur, "ISO-8859-1"); 
    212                 LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "replace all"); 
     211//              LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "replace all"); 
    213212                valeur = valeur.replaceAll("&", "&amp;"); 
    214                 LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "fin retour valeur"); 
     213//              LoggerPerso.log(Produit.class, LoggerPerso.DEBUG, "fin retour valeur"); 
    215214                return valeur; 
    216215        } 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Produitorig.hbm.xml

    r68 r70  
    1515            <column name="title_produitorig" length="128" unique="true" /> 
    1616        </property> 
    17         <property name="orgProduitorig" type="string"> 
    18             <column name="org_produitorig" length="128" /> 
    19         </property> 
    20         <property name="dateProduitorig" type="date"> 
    21             <column name="date_produitorig" length="4" /> 
     17        <property name="dateProduitorig" type="string"> 
     18            <column name="date_produitorig" length="128" /> 
    2219        </property> 
    2320        <property name="editionProduitorig" type="string"> 
    2421            <column name="edition_produitorig" length="128" /> 
    2522        </property> 
    26         <property name="begintimeProduitorig" type="date"> 
    27             <column name="begintime_produitorig" length="4" /> 
     23        <property name="begintimeProduitorig" type="string"> 
     24            <column name="begintime_produitorig" length="128" /> 
    2825        </property> 
    29         <property name="endtimeProduitorig" type="date"> 
    30             <column name="endtime_produitorig" length="4" /> 
     26        <property name="endtimeProduitorig" type="string"> 
     27            <column name="endtime_produitorig" length="128" /> 
    3128        </property> 
    3229        <property name="earthellipsProduitorig" type="string"> 
     
    3835        <property name="spatialresProduitorig" type="string"> 
    3936            <column name="spatialres_produitorig" length="128" /> 
    40         </property> 
    41         <property name="projectionProduitorig" type="string"> 
    42             <column name="projection_produitorig" length="128" /> 
    4337        </property> 
    4438        <property name="methodProduitorig" type="string"> 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Produitorig.java

    r68 r70  
    33// Generated 1 Juin 2007 15:03:29 by Hibernate Tools 3.2.0.beta7 
    44 
    5 import java.util.Date; 
    65import java.util.HashSet; 
    76import java.util.Set; 
     
    1615        // Fields     
    1716 
     17        /** 
     18         *  
     19         */ 
     20        private static final long serialVersionUID = 1L; 
     21 
    1822        private int idProduitorig; 
    1923 
     
    2226        private String titleProduitorig; 
    2327 
    24         private String orgProduitorig; 
    25  
    26         private Date dateProduitorig; 
     28        private String dateProduitorig; 
    2729 
    2830        private String editionProduitorig; 
    2931 
    30         private Date begintimeProduitorig; 
    31  
    32         private Date endtimeProduitorig; 
     32        private String begintimeProduitorig; 
     33 
     34        private String endtimeProduitorig; 
    3335 
    3436        private String earthellipsProduitorig; 
     
    3739 
    3840        private String spatialresProduitorig; 
    39  
    40         private String projectionProduitorig; 
    4141 
    4242        private String methodProduitorig; 
     
    6161        /** full constructor */ 
    6262        public Produitorig(int idProduitorig, Domaine domaine, 
    63                         String titleProduitorig, String orgProduitorig, 
    64                         Date dateProduitorig, String editionProduitorig, 
    65                         Date begintimeProduitorig, Date endtimeProduitorig, 
     63                        String titleProduitorig, 
     64                        String dateProduitorig, String editionProduitorig, 
     65                        String begintimeProduitorig, String endtimeProduitorig, 
    6666                        String earthellipsProduitorig, String temporalresProduitorig, 
    67                         String spatialresProduitorig, String projectionProduitorig, 
     67                        String spatialresProduitorig, 
    6868                        String methodProduitorig, String dataurlProduitorig, 
    6969                        String documentationProduitorig, Set<Produit> produits) { 
     
    7171                this.domaine = domaine; 
    7272                this.titleProduitorig = titleProduitorig; 
    73                 this.orgProduitorig = orgProduitorig; 
    7473                this.dateProduitorig = dateProduitorig; 
    7574                this.editionProduitorig = editionProduitorig; 
     
    7978                this.temporalresProduitorig = temporalresProduitorig; 
    8079                this.spatialresProduitorig = spatialresProduitorig; 
    81                 this.projectionProduitorig = projectionProduitorig; 
    8280                this.methodProduitorig = methodProduitorig; 
    8381                this.dataurlProduitorig = dataurlProduitorig; 
     
    9593                valeur += XmlHelper.createNode("titleProduitorig", titleProduitorig); 
    9694                valeur += XmlHelper.objectToString(domaine); 
    97                 valeur += XmlHelper.createNode("orgProduitorig", orgProduitorig); 
    9895                valeur += XmlHelper.createNode("dateProduitorig", dateProduitorig); 
    9996                valeur += XmlHelper.createNode("editionProduitorig", editionProduitorig); 
     
    103100                valeur += XmlHelper.createNode("temporalresProduitorig", temporalresProduitorig); 
    104101                valeur += XmlHelper.createNode("spatialresProduitorig", spatialresProduitorig); 
    105                 valeur += XmlHelper.createNode("projectionProduitorig", projectionProduitorig); 
    106102                valeur += XmlHelper.createNode("methodProduitorig", methodProduitorig); 
    107103                valeur += XmlHelper.createNode("dataurlProduitorig", dataurlProduitorig); 
     
    112108                valeur += "<domaine>" + domaine + "</domaine>" + "\n"; 
    113109                valeur += "<titleProduitorig>" + titleProduitorig + "</titleProduitorig>" + "\n"; 
    114                 valeur += "<orgProduitorig>" + orgProduitorig + "</orgProduitorig>" + "\n"; 
    115110                valeur += "<dateProduitorig>" + dateProduitorig + "</dateProduitorig>" + "\n"; 
    116111                valeur += "<editionProduitorig>" + editionProduitorig + "</editionProduitorig>" + "\n"; 
     
    120115                valeur += "<temporalresProduitorig>" + temporalresProduitorig + "</temporalresProduitorig>" + "\n"; 
    121116                valeur += "<spatialresProduitorig>" + spatialresProduitorig + "</spatialresProduitorig>" + "\n"; 
    122                 valeur += "<projectionProduitorig>" + projectionProduitorig + "</projectionProduitorig>" + "\n"; 
    123117                valeur += "<methodProduitorig>" + methodProduitorig + "</methodProduitorig>" + "\n"; 
    124118                valeur += "<dataurlProduitorig>" + dataurlProduitorig + "</dataurlProduitorig>" + "\n"; 
     
    155149        } 
    156150 
    157         public String getOrgProduitorig() { 
    158                 return this.orgProduitorig; 
    159         } 
    160  
    161         public void setOrgProduitorig(String orgProduitorig) { 
    162                 this.orgProduitorig = orgProduitorig; 
    163         } 
    164  
    165         public Date getDateProduitorig() { 
     151        public String getDateProduitorig() { 
    166152                return this.dateProduitorig; 
    167153        } 
    168154 
    169         public void setDateProduitorig(Date dateProduitorig) { 
     155        public void setDateProduitorig(String dateProduitorig) { 
    170156                this.dateProduitorig = dateProduitorig; 
    171157        } 
     
    179165        } 
    180166 
    181         public Date getBegintimeProduitorig() { 
     167        public String getBegintimeProduitorig() { 
    182168                return this.begintimeProduitorig; 
    183169        } 
    184170 
    185         public void setBegintimeProduitorig(Date begintimeProduitorig) { 
     171        public void setBegintimeProduitorig(String begintimeProduitorig) { 
    186172                this.begintimeProduitorig = begintimeProduitorig; 
    187173        } 
    188174 
    189         public Date getEndtimeProduitorig() { 
     175        public String getEndtimeProduitorig() { 
    190176                return this.endtimeProduitorig; 
    191177        } 
    192178 
    193         public void setEndtimeProduitorig(Date endtimeProduitorig) { 
     179        public void setEndtimeProduitorig(String endtimeProduitorig) { 
    194180                this.endtimeProduitorig = endtimeProduitorig; 
    195181        } 
     
    219205        } 
    220206 
    221         public String getProjectionProduitorig() { 
    222                 return this.projectionProduitorig; 
    223         } 
    224  
    225         public void setProjectionProduitorig(String projectionProduitorig) { 
    226                 this.projectionProduitorig = projectionProduitorig; 
    227         } 
    228  
    229207        public String getMethodProduitorig() { 
    230208                return this.methodProduitorig; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Requete.java

    r68 r70  
    1111 
    1212        // Fields     
     13 
     14        /** 
     15         *  
     16         */ 
     17        private static final long serialVersionUID = 1L; 
    1318 
    1419        private int idRequete; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Typecodification.java

    r68 r70  
    1212 
    1313        // Fields     
     14 
     15        /** 
     16         *  
     17         */ 
     18        private static final long serialVersionUID = 1L; 
    1419 
    1520        private int idTypecodification; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Typeproduit.java

    r68 r70  
    1414 
    1515        // Fields     
     16 
     17        /** 
     18         *  
     19         */ 
     20        private static final long serialVersionUID = 1L; 
    1621 
    1722        private int idTypeproduit; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/hibernate/domaine/Unite.java

    r68 r70  
    1414 
    1515        // Fields     
     16 
     17        /** 
     18         *  
     19         */ 
     20        private static final long serialVersionUID = 1L; 
    1621 
    1722        private int idUnite; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/jdbc/CatParametreDAOjdbc.java

    r68 r70  
    88import java.util.List; 
    99 
    10 import org.medias.eccad.helpers.LoggerPerso; 
    1110import org.medias.eccad.modele.CatParametre; 
    1211import org.medias.eccad.persistance.dao.CatParametreDAO; 
     
    3332                conn = getConnection(); 
    3433                 
    35                 try {LoggerPerso.log(CatParametreDAOjdbc.class, LoggerPerso.DEBUG, "DAOjdbc youhou!!"); 
     34                try { 
    3635                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
    37                         sql = "select distinct id_categorieparametre, fullname_categorieparametre from categorieparametre join parametre using (id_categorieparametre) join grille using (id_param);"; 
    38                          
     36//                      sql = "select distinct id_categorieparametre, fullname_categorieparametre, order_categorieparametre" + 
     37//                                      " from categorieparametre join parametre using (id_categorieparametre)" + 
     38//                                      " join grille using (id_param) order by order_categorieparametre;"; 
     39                        sql = "select distinct id_categorieparametre, fullname_categorieparametre" + 
     40                                        ", order_categorieparametre from categorieparametre" + 
     41                                        " where id_categorieparametre in (select id_categorieparametre from parametre" + 
     42                                        " where id_param in (select id_param from grille)) order by order_categorieparametre;"; 
    3943                        resultat = requete.executeQuery(sql); 
    4044                 
     
    5155                } 
    5256                 
    53                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListCatParametre::taille::"+liste_catParam.size()); 
     57//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListCatParametre::taille::"+liste_catParam.size()); 
    5458 
    5559                return liste_catParam; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/jdbc/CodeDAOjdbc.java

    r68 r70  
    2121                try { 
    2222                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
    23                         sql = " select legend_code"  
    24                                 + " from grille join codification using (id_codification)" 
    25                                 + " join code using (id_codification) where id_grille = " + id_grille + " order by id_code;"; 
    26                          
     23//                      sql = " select num_code,legend_code"  
     24//                              + " from grille join codification using (id_codification)" 
     25//                              + " join code using (id_codification) where id_grille = " + id_grille + " order by num_code;"; 
     26                        sql = " select number_code,legend_code"  
     27                        + " from grille left join code on id_grille = num_code" 
     28                        + " where id_grille = " + id_grille + " order by number_code;"; 
     29 
    2730                        ResultSet resultat = requete.executeQuery(sql); 
    28                          
     31                        String legend = ""; 
    2932                        while (resultat.next()) { 
    30                                 code.add(resultat.getString("legend_code").toLowerCase()); 
     33                                legend = resultat.getString("legend_code"); 
     34                                code.add(resultat.getString("number_code")+"-"+legend); 
     35                        } 
     36                        if (code.size() == 1) { 
     37                                code.set(0, "1-"+legend); 
    3138                        } 
    3239                } 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/jdbc/ColorTabDAOjdbc.java

    r68 r70  
    99import java.util.List; 
    1010 
    11  
    12 import org.medias.eccad.helpers.LoggerPerso; 
    1311import org.medias.eccad.modele.ColorMap; 
    1412import org.medias.eccad.modele.ColorTab; 
     
    1715 
    1816public class ColorTabDAOjdbc extends GeneriqueDAOjdbc implements ColorTabDAO { 
    19  
    20          
    21          
    22          
    23         public ColorTab getColorMapByGrille(long id_grille) throws PersistanceException { 
     17         
     18        public ColorTab getColorMapByGrille() throws PersistanceException { 
    2419                ColorTab colortab = new ColorTab(); 
    25                 colortab = getTableDefault(id_grille, colortab); 
     20                colortab = getTableDefault(colortab); 
    2621                //colortab = getMinMax(oid, colortab); 
    2722                 
     
    2924        } 
    3025         
    31         public List<ColorMap> getListColorTab() throws PersistanceException { 
    32                 String sql = " select cm_name, "  
    33                            + " from colormap " 
    34                            + " order by cm_id;"; 
    35                            //+ " join grille using (id_param) " 
    36                             
    37                  
    38                 Statement requete = null; 
    39                 ResultSet resultat = null; 
    40                 Connection conn = getConnection(); 
    41                  
    42                 LoggerPerso.log(ColorTabDAOjdbc.class, LoggerPerso.DEBUG, " récupération liste de colortab " + sql); 
     26        public List<ColorMap> getListClassMap() throws PersistanceException { 
     27                String sql = " select clm_id, clm_name, num_order from class_map order by clm_id";               
     28                 
     29                Statement requete = null; 
     30                ResultSet resultat = null; 
     31                Connection conn = getConnection(); 
     32                 
     33//              LoggerPerso.log(ColorTabDAOjdbc.class, LoggerPerso.DEBUG, " récupération liste de colortab " + sql); 
    4334                 
    4435                try { 
     
    5445                try { 
    5546                        while (resultat.next()) { 
    56                                 liste_colormap.add(new ColorMap(resultat.getLong("cm_id"), resultat.getString("cm_name"), resultat.getInt("pc_defaut"))); 
     47                                liste_colormap.add(new ColorMap(resultat.getLong("clm_id"), resultat.getString("clm_name"), resultat.getInt("num_order"))); 
    5748                        } 
    5849                } 
     
    6758        } 
    6859         
    69         public List<ColorMap> getListColorTabByGrille(long id_grille) throws PersistanceException { 
    70                 String sql = " select distinct cm_id, cm_name, pc_defaut"  
     60        public List<ColorMap> getListColorTabByGrille() throws PersistanceException { 
     61                /*String sql = " select distinct cm_id, cm_name, pc_defaut"  
    7162                           + " from colormap join param_color using (cm_id) " 
    7263                           + " join grille using (id_param) " 
    73                            + " where id_grille = " + id_grille + " order by pc_defaut desc;"; 
    74                  
    75                 Statement requete = null; 
    76                 ResultSet resultat = null; 
    77                 Connection conn = getConnection(); 
    78                  
    79                 LoggerPerso.log(ColorTabDAOjdbc.class, LoggerPerso.DEBUG, " récupération liste de colortab " + sql); 
     64                           + " where id_grille = " + id_grille + " order by pc_defaut desc;";*/ 
     65                 
     66                String sql = " select clm_id as cm_id, clm_name as cm_name, num_order as pc_defaut from class_map order by clm_id"; 
     67                 
     68                Statement requete = null; 
     69                ResultSet resultat = null; 
     70                Connection conn = getConnection(); 
     71                 
     72//              LoggerPerso.log(ColorTabDAOjdbc.class, LoggerPerso.DEBUG, " récupération liste de colortab " + sql); 
    8073                 
    8174                try { 
     
    10497        } 
    10598         
    106         private ColorTab getTableDefault(long id_grille, ColorTab colortab) throws PersistanceException { 
    107                 Statement requete = null; 
    108                 String sql = " select distinct col_r, col_g, col_b, ci_min, ci_max"  
     99        private ColorTab getTableDefault(ColorTab colortab) throws PersistanceException { 
     100                Statement requete = null; 
     101                /*String sql = " select distinct col_r, col_g, col_b, ci_min, ci_max"  
    109102                                   + " from color join color_index using (col_id)" 
    110103                                   + " join param_color using (cm_id) " 
    111104                                   + " join grille   using (id_param) " 
    112                                    + " where id_grille = " + id_grille +" and pc_defaut = 1 order by ci_max;"; 
    113                 Connection conn = getConnection(); 
    114                  
    115                 ResultSet resultat = null; 
    116                  
    117                  
    118                 LoggerPerso.log(ColorTabDAOjdbc.class, LoggerPerso.DEBUG, "*************************************REQUETE = " + sql); 
     105                                   + " where id_grille = " + id_grille +" and pc_defaut = 1 order by ci_max;";*/ 
     106 
     107                String sql = " select distinct col_r, col_g, col_b, class_index.num_order" 
     108                                   + " from color join class_index using (col_id)" 
     109                                   + " join class_map using (clm_id) " 
     110                                   + " where class_map.num_order=1 order by class_index.num_order;"; 
     111                Connection conn = getConnection(); 
     112                 
     113                ResultSet resultat = null; 
     114                 
     115//              LoggerPerso.log(ColorTabDAOjdbc.class, LoggerPerso.DEBUG, "*************************************REQUETE = " + sql); 
    119116                try { 
    120117                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
     
    129126                int i=0; 
    130127 
    131                  
     128                float ci_min=-1; 
     129                float ci_max=0; 
    132130                 
    133131                try { 
    134132                        while (resultat.next()) { 
    135133                                liste_couleur.add(new Color(resultat.getInt("col_r"), resultat.getInt("col_g"), resultat.getInt("col_b"))); 
    136                                 liste_min.add(resultat.getFloat("ci_min")); 
    137                                 colortab.setMax(resultat.getFloat("ci_max")); 
     134                                //liste_min.add(resultat.getFloat("ci_min")); 
     135                                //colortab.setMax(resultat.getFloat("ci_max")); 
     136                                 
     137                                liste_min.add(ci_min); 
     138                                colortab.setMax(ci_max); 
     139                                 
     140                                if (ci_min==-1) ci_min=0; 
     141                                else ci_min=ci_min+10; 
     142                                 
     143                                ci_max=ci_max+10; 
    138144                                i++; 
    139145                        } 
     
    164170        } 
    165171 
    166         public ColorTab getColorMapByID(long id) throws PersistanceException { 
     172        public ColorTab getColorMapByID(long id, long idClass) throws PersistanceException { 
    167173                Statement requete = null; 
    168174                ColorTab colortab = new ColorTab(); 
    169175                 
    170                 String sql = " select distinct col_r, col_g, col_b, ci_min, ci_max, cm_name"  
     176                /*String sql = " select distinct col_r, col_g, col_b, ci_min, ci_max, cm_name"  
    171177                                   + " from color join color_index using (col_id) join colormap using (cm_id)" 
    172                                    + " where cm_id = " + id +" order by ci_min;"; 
    173                 Connection conn = getConnection(); 
    174                  
    175                 ResultSet resultat = null; 
    176                  
    177                  
    178                 LoggerPerso.log(ColorTabDAOjdbc.class, LoggerPerso.DEBUG, "REQUETE = " + sql); 
     178                                   + " where cm_id = " + id +" order by ci_min;";*/ 
     179 
     180                String sql="select distinct col_r, col_g, col_b, clm_name as cm_name, ci.num_order, val_min, val_max"  
     181                        +" from color as co, class_index as ci, class_map as cm, class_distribution as cd"  
     182                        +" where co.col_id=ci.col_id and ci.clm_id=cm.clm_id and cm.clm_id="+id+" and cd.scl_id="+idClass 
     183                        +" and cd.num_order=ci.num_order order by ci.num_order;"; 
     184                Connection conn = getConnection(); 
     185                 
     186                ResultSet resultat = null; 
     187 
     188//              LoggerPerso.log(ColorTabDAOjdbc.class, LoggerPerso.DEBUG, "REQUETE = " + sql); 
    179189                try { 
    180190                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
     
    189199                int i=0; 
    190200 
    191                  
    192                  
    193                 try { 
    194                          
     201                try { 
    195202                        while (resultat.next()) { 
    196203                                colortab.setName(resultat.getString("cm_name")); 
    197204                                liste_couleur.add(new Color(resultat.getInt("col_r"), resultat.getInt("col_g"), resultat.getInt("col_b"))); 
    198                                 liste_min.add(resultat.getFloat("ci_min")); 
    199                                 colortab.setMax(resultat.getFloat("ci_max")); 
     205                                liste_min.add(resultat.getFloat("val_min")); 
     206                                colortab.setMax(resultat.getFloat("val_max")); 
     207//                              LoggerPerso.log(ColorTabDAOjdbc.class, LoggerPerso.DEBUG, "NAME="+resultat.getString("cm_name")+", RANGE = " +resultat.getFloat("val_min")+" - "+resultat.getFloat("val_max")); 
    200208                                i++; 
    201209                        } 
     
    221229        } 
    222230 
    223         public List<ColorMap> getListColorMapDynamique() throws PersistanceException { 
     231/*      public List<ColorMap> getListColorMapDynamique() throws PersistanceException { 
    224232                String sql = " select distinct clm_id, clm_name"  
    225                            + " from class_map " 
    226                            + " where clm_name ilike '%exponential%' or clm_name ilike '%linear%' or clm_name ilike '%logarithm%' order by clm_name;"; 
    227                  
    228                  
    229                  
    230                 Statement requete = null; 
    231                 ResultSet resultat = null; 
    232                 Connection conn = getConnection(); 
    233                  
    234                 LoggerPerso.log(ColorTabDAOjdbc.class, LoggerPerso.DEBUG, " récupération liste de colortab " + sql); 
     233                           + " from class_map order by clm_id"; 
     234                           //+ " where clm_name like '%exponential%' or clm_name like '%linear%' or clm_name like '%logarithm%' order by clm_name;"; 
     235                 
     236                 
     237                Statement requete = null; 
     238                ResultSet resultat = null; 
     239                Connection conn = getConnection(); 
     240                 
     241//              LoggerPerso.log(ColorTabDAOjdbc.class, LoggerPerso.DEBUG, " récupération liste de colortab " + sql); 
    235242                 
    236243                try { 
     
    246253                try { 
    247254                        while (resultat.next()) { 
    248                                 liste_colormap.add(new ColorMap(resultat.getLong("cm_id"), resultat.getString("cm_name"), 0)); 
     255                                liste_colormap.add(new ColorMap(resultat.getLong("clm_id"), resultat.getString("clm_name"), 0)); 
    249256                        } 
    250257                } 
     
    257264                 
    258265                return liste_colormap; 
    259         } 
     266        }*/ 
    260267 
    261268} 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/jdbc/FactoryDAOjdbc.java

    r68 r70  
    44import org.medias.eccad.persistance.dao.GrilleDAO; 
    55import org.medias.eccad.persistance.dao.ParametreDAO; 
     6import org.medias.eccad.persistance.dao.SecteurDAO; 
    67import org.medias.eccad.persistance.dao.ProduitDAO; 
    78 
     
    2425                return new ParametreDAOjdbc(sgbd); 
    2526        } 
     27         
     28        public SecteurDAO getSecteurDAO() { 
     29                return new SecteurDAOjdbc(sgbd); 
     30        } 
    2631 
    2732        public ProduitDAO getProduitDAO() { 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/jdbc/GeneriqueDAOjdbc.java

    r68 r70  
    44import java.sql.SQLException; 
    55 
    6  
    7 import org.medias.eccad.helpers.LoggerPerso; 
    86import org.medias.eccad.persistance.exception.PersistanceException; 
    97 
     
    4038                        throw new PersistanceException(sqle, "impossible de se connecter au sgbd :: ParametreDAOjdbc.getListParametre"); 
    4139                } 
    42                 LoggerPerso.log(GeneriqueDAOjdbc.class, LoggerPerso.DEBUG, "-- jdbc connexion -- "); 
    4340                return conn; 
    4441        } 
    4542         
    4643        protected void closeConnection() { 
    47                 LoggerPerso.log(GeneriqueDAOjdbc.class, LoggerPerso.DEBUG, "-- jdbc deconnexion -- "); 
    4844                sgbd.deconnexion(); 
    4945        } 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/jdbc/GrilleDAOjdbc.java

    r68 r70  
    22 
    33import java.sql.Connection; 
     4import java.sql.Date; 
    45import java.sql.ResultSet; 
    56import java.sql.SQLException; 
    67import java.sql.Statement; 
     8import java.util.ArrayList; 
     9import java.util.Collections; 
    710import java.util.LinkedList; 
    811import java.util.List; 
    912 
    10  
    1113import org.medias.eccad.helpers.Donnees; 
    12 import org.medias.eccad.helpers.LoggerPerso; 
    1314import org.medias.eccad.modele.Grille; 
    1415import org.medias.eccad.persistance.jdbc.SGBD_jdbc; 
     
    2829        } 
    2930         
    30         public List<Grille> getListGrille(long id_produit,long id_parametre, String date_debut, String date_fin)  throws PersistanceException{ 
     31        public List<Grille> getListGrille(long id_produit,long id_parametre, long id_secteur, long id_rcp, String date_debut, String date_fin, String nomProd, String legend, String typeProd)  throws PersistanceException{ 
     32                Statement requete; 
     33                String sql; 
     34                List<Grille> liste_gril = new LinkedList<Grille>(); 
     35                Connection conn = getConnection(); 
     36 
     37                try { 
     38                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
     39                        sql = "select distinct date_grille, id_grille, legend_code, number_code" + 
     40                                        " from grille" + 
     41                                        " left join code on ((id_grille = num_code) and (grille.id_codification = code.id_codification))" + 
     42                                        " where id_produit = "+id_produit+" and id_param = "+id_parametre; 
     43                        if (nomProd.equals("IPCC")) { 
     44                                if (id_secteur > 0) { 
     45                                        sql+=" and id_secteur="+id_secteur;                                      
     46                                } 
     47                                if (id_rcp > 0 ) { 
     48                                        sql+=" and id_rcp="+id_rcp; 
     49                                } else { 
     50                                        sql+=" and id_rcp is null"; 
     51                                } 
     52                                if (legend != null) { 
     53                                        sql+=" and legend_code = '"+legend+"'"; 
     54                                } 
     55                        } 
     56                        if (date_debut != null) { 
     57                                sql += " and date_grille >= '" + date_debut + "' and date_grille <= '" + date_fin + "'"; 
     58                                if (typeProd.equals("monoplan")) { 
     59                                        sql += " order by id_grille, number_code"; 
     60                                } else { 
     61                                        sql += " order by date_grille, number_code"; 
     62                                } 
     63                        } else { 
     64                                sql += " order by id_grille"; 
     65                        } 
     66                        sql += ";"; 
     67//LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListGrille::requete grille :: " + sql); 
     68                        ResultSet resultat = requete.executeQuery(sql); 
     69                         
     70                        Date date; 
     71                        long idGrille, idGrillePrec = 0; 
     72                        String datePrec = ""; 
     73                        int numberCode; 
     74                        // NB: On ne stocke qu'une seule grille : 
     75                        // - par plan (dans le cas d'un produit multiplan) 
     76                        // - par date (dans le cas d'un produit temporel) 
     77                        // - par masque (dans le cas d'un produit monoplan) 
     78                        while (resultat.next()) { 
     79                                date = resultat.getDate("date_grille"); 
     80                                idGrille = resultat.getLong("id_grille"); 
     81                                numberCode = resultat.getInt("number_code"); 
     82                                if (typeProd.equals("multiplan") ||  
     83                                        !date.toString().equals(datePrec) ||  
     84                                        (typeProd.equals("monoplan") && idGrille != idGrillePrec)) { 
     85                                        // Cas monoplan: on place la grille contenant l'ensemble des masques en premiÚre position 
     86//                                      if (typeProd.equals("monoplan") && numberCode == 0) { 
     87//                                              liste_gril.add(0,new Grille(idGrille, date, resultat.getString("legend_code"),numberCode)); 
     88//                                      } else { 
     89                                                liste_gril.add(new Grille(idGrille, date, resultat.getString("legend_code"),numberCode)); 
     90//                                      } 
     91                                } 
     92                                datePrec = date.toString(); 
     93                                idGrillePrec = idGrille; 
     94                        } 
     95                        // Pour un produit monoplan, on trie les grilles par numéro de code 
     96                        if (typeProd.equals("monoplan")) { 
     97                                Collections.sort(liste_gril,new Grille().new ComparatorNumberCode()); 
     98                        } 
     99                } 
     100                catch (SQLException sqle) { 
     101                        throw new PersistanceException(sqle, "erreur lors de l'execution de la requete :: GrilleDAOjdbc.getListGrille"); 
     102                } 
     103                finally { 
     104                        closeConnection(); 
     105                } 
     106//System.out.println("nbgrilles="+liste_gril.size()); 
     107                return liste_gril; 
     108        } 
     109 
     110        public List<Grille> getListGrille(long id_produit, String date_debut, String date_fin)  throws PersistanceException{ 
    31111                Statement requete; 
    32112                String sql; 
     
    36116                try { 
    37117                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
    38                         sql = "select distinct id_grille, valeurs_grille, date_grille, legend_code from grille left join code on ((id_grille = num_code) and (grille.id_codification = code.id_codification)) where id_produit = " + id_produit+" and id_param = "+id_parametre; 
     118                        sql = "select distinct id_grille, valeurs_grille, date_grille, legend_code, number_code from grille" + 
     119//                              " inner join codification using (id_codification)" + 
     120//                              " inner join type_codification using (id_typecodification)" + 
     121                                " left join code on ((id_grille = num_code)" + 
     122                                " and (grille.id_codification = code.id_codification)) where id_produit = " + id_produit; 
     123//                              " inner join codification using (id_codification) left join code using (id_codification)" + 
     124//                              " where id_produit = " + id_produit; 
    39125                         
    40126                        if (date_debut != null) 
    41                                 sql += " and date_grille >= '" + date_debut + "' and date_grille <= '" + date_fin + "' order by date_grille"; 
     127                                sql += " and date_grille >= '" + date_debut + "' and date_grille <= '" + date_fin + "' order by date_grille, number_code"; 
    42128                        else 
    43                                 sql += " order by id_grille"; 
     129                                sql += " order by number_code, id_grille"; 
    44130                         
    45131                        sql += ";"; 
    46132                         
    47                         LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListGrille::requete :: " + sql); 
     133//                      LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListGrille2::requete :: " + sql); 
    48134                        ResultSet resultat = requete.executeQuery(sql); 
    49135                         
    50136                        while (resultat.next()) { 
    51                                 liste_param.add(new Grille(resultat.getLong("id_grille"), resultat.getDate("date_grille"), resultat.getString("legend_code"))); 
     137                                liste_param.add(new Grille(resultat.getLong("id_grille"), resultat.getDate("date_grille"), resultat.getString("legend_code"), resultat.getInt("number_code"))); 
    52138                        } 
    53139                } 
     
    58144                        closeConnection(); 
    59145                } 
    60                          
    61                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListGrille::taille::"+liste_param.size() + "id_produit::" + id_produit); 
     146 
     147//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListGrille::taille::"+liste_param.size() + "id_produit::" + id_produit); 
    62148                return liste_param; 
    63149        } 
    64150 
    65          
    66          
    67         public List<Grille> getListGrille(long id_produit, String date_debut, String date_fin)  throws PersistanceException{ 
    68                 Statement requete; 
    69                 String sql; 
    70                 List<Grille> liste_param = new LinkedList<Grille>(); 
    71                 Connection conn = getConnection(); 
    72                  
    73                 try { 
    74                         requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
    75                         sql = "select distinct id_grille, valeurs_grille, date_grille, legend_code from grille left join code on ((id_grille = num_code) and (grille.id_codification = code.id_codification)) where id_produit = " + id_produit; 
    76                          
     151        public List<String> getListAlt(long id_secteur, String date_debut) throws PersistanceException{ 
     152                Statement requete; 
     153                String sql; 
     154                List<String> liste_alt = new LinkedList<String>(); 
     155                Connection conn = getConnection(); 
     156 
     157                try { 
     158                        // On récupÚre les altitudes 
     159                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
     160                        //sql = "select distinct cast(legend_code as decimal) as altitude from grille" + 
     161                        sql = "select distinct legend_code, number_code from grille" + 
     162                                        " left join code on ((id_grille = num_code) and (grille.id_codification = code.id_codification))" + 
     163                                        " where id_secteur = "+id_secteur; 
    77164                        if (date_debut != null) 
    78                                 sql += " and date_grille >= '" + date_debut + "' and date_grille <= '" + date_fin + "' order by date_grille"; 
    79                         else 
    80                                 sql += " order by id_grille"; 
    81                          
    82                         sql += ";"; 
    83                          
    84                         LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListGrille::requete :: " + sql); 
    85                         ResultSet resultat = requete.executeQuery(sql); 
    86                          
     165                                sql += " and date_grille = '" + date_debut+"'"; 
     166                        sql += " order by number_code;"; 
     167                        ResultSet resultat = requete.executeQuery(sql); 
    87168                        while (resultat.next()) { 
    88                                 liste_param.add(new Grille(resultat.getLong("id_grille"), resultat.getDate("date_grille"), resultat.getString("legend_code"))); 
    89                         } 
    90                 } 
    91                 catch (SQLException sqle) { 
    92                         throw new PersistanceException(sqle, "erreur lors de l'execution de la requete :: GrilleDAOjdbc.getListGrille"); 
    93                 } 
    94                 finally { 
    95                         closeConnection(); 
    96                 } 
    97                          
    98                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListGrille::taille::"+liste_param.size() + "id_produit::" + id_produit); 
    99                 return liste_param; 
    100         } 
    101  
    102          
    103          
     169                                liste_alt.add(resultat.getString("legend_code")); 
     170                        } 
     171                } 
     172                catch (SQLException sqle) { 
     173                        throw new PersistanceException(sqle, "erreur lors de l'execution de la requete :: GrilleDAOjdbc.getListAlt"); 
     174                } 
     175                finally { 
     176                        closeConnection(); 
     177                } 
     178                return liste_alt; 
     179        } 
     180 
     181        public List<Grille> getListMasques(String codifMasque) throws PersistanceException{ 
     182                Statement requete; 
     183                String sql; 
     184                List<Grille> liste_reg = new LinkedList<Grille>(); 
     185                Connection conn = getConnection(); 
     186 
     187                try { 
     188                        // On récupÚre les régions 
     189                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
     190                        sql = "select distinct legend_code, number_code, id_grille from grille" + 
     191                        " inner join codification using (id_codification) left join code on (id_grille = num_code)" + 
     192                        " where nom_codification = '"+codifMasque+"' order by id_grille, number_code;"; 
     193                        ResultSet resultat = requete.executeQuery(sql); 
     194                        long idGrille, idGrillePrec = 0; 
     195                        while (resultat.next()) { 
     196                                idGrille = resultat.getLong("id_grille"); 
     197                                if (idGrille != idGrillePrec) { 
     198                                        liste_reg.add(new Grille(idGrille, null, resultat.getString("legend_code"),resultat.getInt("number_code"))); 
     199                                } 
     200                                idGrillePrec = idGrille; 
     201                        } 
     202                        Collections.sort(liste_reg,new Grille().new ComparatorNumberCode()); 
     203                } 
     204                catch (SQLException sqle) { 
     205                        throw new PersistanceException(sqle, "erreur lors de l'execution de la requete :: GrilleDAOjdbc.getListAlt"); 
     206                } 
     207                finally { 
     208                        closeConnection(); 
     209                } 
     210                return liste_reg; 
     211        } 
    104212         
    105213        public float[][] getGrilleValue(int oid) throws PersistanceException { 
     
    184292                try { 
    185293                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
    186                         sql = " select name_typeCodification" +""  
     294                        sql = " select name_typecodification" 
    187295                                + " from grille join codification using (id_codification)" 
    188296                                + " join typecodification using (id_typeCodification) where id_grille = " + id_grille + ";"; 
    189297                         
    190298                        ResultSet resultat = requete.executeQuery(sql); 
    191                         LoggerPerso.log(GrilleDAOjdbc.class, LoggerPerso.DEBUG, "getCodification :: " + sql);    
     299//                      LoggerPerso.log(GrilleDAOjdbc.class, LoggerPerso.DEBUG, "getCodification :: " + sql);    
    192300                        if (resultat.next()) { 
    193301                                codification = resultat.getString("name_typeCodification").toLowerCase(); 
     
    216324                         
    217325                        ResultSet resultat = requete.executeQuery(sql); 
    218                         LoggerPerso.log(GrilleDAOjdbc.class, LoggerPerso.DEBUG, "getCodification :: " + sql);    
     326//                      LoggerPerso.log(GrilleDAOjdbc.class, LoggerPerso.DEBUG, "getCodification :: " + sql);    
    219327                        if (resultat.next()) { 
    220328                                date = resultat.getString("date_grille").toLowerCase(); 
     
    237345 
    238346        public Grille getGrille(long id_grille) throws PersistanceException { 
    239                 String sql = "select * from grille where id_grille = " + id_grille + ";"; 
     347                 
     348                String sql = "select * from grille"; 
     349                sql += " left join code on id_grille = num_code"; 
     350                sql += " where id_grille = " + id_grille + ";"; 
    240351                Statement requete; 
    241352                Connection conn = getConnection(); 
     
    252363                                grille.setId_param(resultat.getLong("id_param")); 
    253364                                grille.setId_produit(resultat.getLong("id_produit")); 
     365                                grille.setId_secteur(resultat.getLong("id_secteur")); 
     366                                grille.setId_rcp(resultat.getLong("id_rcp")); 
     367                                grille.setLegend(resultat.getString("legend_code")); 
    254368                        } 
    255369                } 
     
    275389                        if (resultat.next()) { 
    276390                                resol = (float)360/resultat.getLong("ncol_grille"); 
    277                                 resultat.getLong("nlign_grille"); 
     391                        //      resultat.getLong("nlign_grille"); 
    278392                        } 
    279393                } 
     
    299413                        if (resultat.next()) { 
    300414                                resol = (float)360/resultat.getLong("ncol_grille"); 
    301                                 resultat.getLong("nlign_grille"); 
     415//                              resultat.getLong("nlign_grille"); 
    302416                        } 
    303417                } 
     
    310424                return resol; 
    311425        } 
    312          
    313          
     426 
     427        public String getTypeCodif(long idGrille) throws PersistanceException { 
     428                String sql = "select name_typecodification from grille" + 
     429                                " inner join codification using (id_codification)" + 
     430                                " inner join typecodification using (id_typecodification)" + 
     431                                " where id_grille = " + idGrille + ";"; 
     432                Statement requete; 
     433                Connection conn = getConnection(); 
     434                String typeCodif = null; 
     435                try { 
     436                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
     437                         
     438                         
     439                        ResultSet resultat = requete.executeQuery(sql); 
     440                                 
     441                        if (resultat.next()) { 
     442                                typeCodif = resultat.getString("name_typecodification"); 
     443                        } 
     444                } 
     445                catch (SQLException sqle) { 
     446                        throw new PersistanceException(sqle, "getTypeCodif " + sql); 
     447                } 
     448                finally { 
     449                        closeConnection(); 
     450                } 
     451                return typeCodif; 
     452        } 
     453 
     454        public ArrayList<String> getDates(long idProduit, long idParametre,     long idSecteur, long idRcp, String nomProd) throws PersistanceException { 
     455                Statement requete; 
     456                String sql; 
     457                ArrayList<String> dates = new ArrayList<String>(); 
     458                Connection conn = getConnection(); 
     459 
     460                try { 
     461                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
     462//                      sql = "select min(date_grille) as min, max(date_grille) as max from grille" + 
     463                        sql = "select min(date_grille) as min, (cast(max(date_grille+deltadate_grille) as date)-1) as max, min(deltadate_grille) as delta from grille" + 
     464                                " where id_produit = "+idProduit+" and id_param = "+idParametre; 
     465                        if (nomProd.equals("IPCC")) { 
     466                                if (idSecteur > 0) { 
     467                                        sql+=" and id_secteur="+idSecteur;                                       
     468                                } 
     469                                if (idRcp > 0 ) { 
     470                                        sql+=" and id_rcp="+idRcp; 
     471                                } else { 
     472                                        sql+=" and id_rcp is null"; 
     473                                } 
     474                        } 
     475                        sql += ";"; 
     476                        ResultSet resultat = requete.executeQuery(sql); 
     477                        if (resultat.next()) { 
     478                                dates.add(resultat.getDate("min").toString()); 
     479                                dates.add(resultat.getDate("max").toString()); 
     480                                dates.add(resultat.getString("delta")); 
     481                        } 
     482                } 
     483                catch (SQLException sqle) { 
     484                        throw new PersistanceException(sqle, "erreur lors de l'execution de la requete :: GrilleDAOjdbc.getDates"); 
     485                } 
     486                finally { 
     487                        closeConnection(); 
     488                } 
     489                return dates; 
     490        } 
    314491} 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/jdbc/ParametreDAOjdbc.java

    r68 r70  
    99import java.util.List; 
    1010 
    11  
    12 import org.medias.eccad.helpers.LoggerPerso; 
    1311import org.medias.eccad.modele.Parametre; 
    1412import org.medias.eccad.persistance.jdbc.SGBD_jdbc; 
     
    6260                } 
    6361                 
    64                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListParametre::taille::"+liste_param.size()); 
     62//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListParametre::taille::"+liste_param.size()); 
    6563 
    6664                return liste_param; 
     
    8482                try { 
    8583                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
    86                         sql = "select distinct id_param, fullname_param, shortname_param, order_param from parametre join grille using (id_param) join produit using (id_produit) join typeproduit using (id_typeproduit) where id_categorieparametre= "+id_CatParam+" and name_typeproduit not ilike 'array' order by order_param;"; 
    87                          
     84//                      sql = "select distinct id_param, fullname_param, shortname_param, order_param from parametre" + 
     85//                                      " join grille using (id_param) join produit using (id_produit)" + 
     86//                                      " join typeproduit using (id_typeproduit)" + 
     87//                                      " where id_categorieparametre= "+id_CatParam+ 
     88//                                      " and name_typeproduit not ilike 'array' order by order_param;"; 
     89                        sql = "select distinct id_param, fullname_param, shortname_param, order_param from parametre" + 
     90                        " where id_param in (select id_param from grille join produit using (id_produit)" + 
     91                        " join typeproduit using (id_typeproduit)" + 
     92                        " where name_typeproduit not ilike 'array')" + 
     93                        " and id_categorieparametre="+id_CatParam+" order by order_param;"; 
    8894                        resultat = requete.executeQuery(sql); 
    8995                 
    9096                         
    9197                        while (resultat.next()) { 
    92                                 if (resultat.getString("shortname_param").equals("NULL")) 
     98                                if (resultat.getString("shortname_param").equals("NULL") || resultat.getString("shortname_param").equals("")) 
    9399                                        liste_param.add(new Parametre(resultat.getInt("id_param"), resultat.getString("fullname_param"))); 
    94100                                else 
     
    103109                } 
    104110                 
    105                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListParametre::taille::"+liste_param.size()); 
     111//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListParametre::taille::"+liste_param.size()); 
    106112 
    107113                return liste_param; 
     
    126132                try { 
    127133                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
    128                         sql = "select distinct id_param, fullname_param, shortname_param, order_param, shortName_unite from parametre join unite using (id_unite) where id_param = " + id_param + " order by order_param;"; 
    129                         LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "sql getParametreById="+sql); 
     134                        sql = "select distinct id_param, fullname_param, shortname_param, order_param, shortName_unite, clm_default_id, scl_default_id" + 
     135                                        " from parametre p" + 
     136                                        " inner join unite using (id_unite)" + 
     137                                        " where id_param = " + id_param + " order by order_param;"; 
    130138                         
    131139                        ResultSet resultat = requete.executeQuery(sql); 
    132140                         
    133141                        if (resultat.next()) { 
    134                                 param = new Parametre(resultat.getInt("id_param"), resultat.getString("fullname_param"), resultat.getString("shortname_param"),resultat.getString("order_param")); 
     142                                param = new Parametre(resultat.getInt("id_param"), resultat.getString("fullname_param") 
     143                                                , resultat.getString("shortname_param"),resultat.getString("order_param")); 
    135144                                param.setUnite(resultat.getString("shortName_unite")); 
     145                                param.setColormapDefault(resultat.getInt("clm_default_id")); 
     146                                param.setClassdisDefault(resultat.getInt("scl_default_id")); 
    136147                        } 
    137148                } 
     
    142153                        closeConnection(); 
    143154                } 
    144                          
    145                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getParametreById::nom::"+ param.getNom()); 
     155 
     156//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getParametreById::nom::"+ param.getNom()); 
    146157 
    147158                return param; 
     
    159170                try { 
    160171                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
    161                         sql = "select distinct id_param, fullname_param, shortname_param, order_param, shortName_unite from parametre join grille using (id_param) join unite using (id_unite) where id_grille = " + id_grille + " order by order_param;"; 
     172                        sql = "select distinct id_param, fullname_param, shortname_param, order_param, shortname_unite from parametre join grille using (id_param) join unite using (id_unite) where id_grille = " + id_grille + " order by order_param;"; 
    162173                         
    163174                        ResultSet resultat = requete.executeQuery(sql); 
     
    168179                                String unite = null; 
    169180                                try { 
    170                                          temp = resultat.getString("shortName_unite").getBytes("ISO-8859-1"); 
    171                                 } catch (UnsupportedEncodingException e) {      } 
     181                                         temp = resultat.getString("shortname_unite").getBytes("ISO-8859-1"); 
     182                                } catch (UnsupportedEncodingException e) {e.printStackTrace();} 
    172183                                 
    173184                                if (temp != null) 
     
    182193                        closeConnection(); 
    183194                } 
    184                          
    185                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getParametreById::nom::"+ param.getNom()); 
     195 
     196//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getParametreById::nom::"+ param.getNom()); 
    186197 
    187198                return param; 
     
    213224                        closeConnection(); 
    214225                } 
    215                          
    216                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getParametreById::nom::"+ param.getNom()); 
     226 
     227//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getParametreById::nom::"+ param.getNom()); 
    217228 
    218229                return param; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/jdbc/ProduitDAOjdbc.java

    r68 r70  
    1010 
    1111import org.medias.eccad.helpers.CharactereHelper; 
    12 import org.medias.eccad.helpers.LoggerPerso; 
    1312import org.medias.eccad.modele.Produit; 
    1413import org.medias.eccad.persistance.jdbc.SGBD_jdbc; 
     
    3433                try { 
    3534                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
    36                         sql = "select distinct id_produit, title_produit, begintime_produit, endtime_produit, header_produit from produit join grille using (id_produit) where id_param = " + id_param + ";"; 
    37                          
     35                        sql = "select distinct id_produit, title_produit, begintime_produit, endtime_produit, header_produit, order_produit from produit join grille using (id_produit) where id_param = " + id_param + " order by order_produit;"; 
    3836                        ResultSet resultat = requete.executeQuery(sql); 
    3937                         
     
    5553                } 
    5654                 
    57                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListProduit::taille::"+liste_param.size()+"\nSQL::" + sql); 
    5855                return liste_param; 
    5956        } 
     
    8986                try { 
    9087                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
    91                         sql = "select distinct id_produit, title_produit, begintime_produit, endtime_produit, header_produit, temporalRes_produit, name_typeproduit from produit join typeproduit using (id_typeproduit) where id_produit = " + id_produit + ";"; 
     88                        sql = "select distinct id_produit, title_produit, begintime_produit" + 
     89                                        ", endtime_produit, header_produit, temporalRes_produit, name_typeproduit" + 
     90                                        ", textcitation_produit, useconst_produit, informpub_produit" + 
     91                                        " from produit join typeproduit using (id_typeproduit)" + 
     92                                        " where id_produit = " + id_produit + ";"; 
    9293                         
    9394                        ResultSet resultat = requete.executeQuery(sql); 
     
    101102                                produit.setTemporalres(CharactereHelper.getEncodage(resultat.getString("temporalRes_produit"), "ISO-8859-1")); 
    102103                                produit.setType(CharactereHelper.getEncodage(resultat.getString("name_typeproduit"), "ISO-8859-1")); 
     104                                produit.setCitation(CharactereHelper.getEncodage(resultat.getString("textcitation_produit"), "ISO-8859-1")); 
     105                                produit.setUseconst(CharactereHelper.getEncodage(resultat.getString("useconst_produit"), "ISO-8859-1")); 
     106                                produit.setInformpub(CharactereHelper.getEncodage(resultat.getString("informpub_produit"), "ISO-8859-1")); 
    103107                        } 
    104108                } 
     
    109113                        closeConnection(); 
    110114                } 
    111                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getProduitById::nom::"+ produit.getNom() + "::date::" + produit.getBeginDate()); 
     115//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getProduitById::nom::"+ produit.getNom() + "::date::" + produit.getBeginDate()); 
    112116 
    113117                return produit; 
     
    122126                try { 
    123127                        requete = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); 
    124                         sql = "select distinct id_produit, title_produit, begintime_produit, endtime_produit, header_produit from produit join lienproduit using (id_produit) "; 
     128                        sql = "select distinct id_produit, title_produit, begintime_produit, endtime_produit, header_produit from produit join lienproduit using (id_produit)"; 
    125129                         
    126130                        if (id_produit != null) { 
     
    149153                } 
    150154                 
    151                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListProductByLink::taille::"+liste_produit.size()); 
     155//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "getListProductByLink::taille::"+liste_produit.size()); 
    152156                return liste_produit; 
    153157        } 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/jdbc/SGBD_jdbc.java

    r68 r70  
    1616        public SGBD_jdbc(InfoConnectBean n_info) { 
    1717                con = null; 
    18                 LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "construction connection"); 
     18//              LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "construction connection"); 
    1919                if (pooling == null) { 
    2020                        info = n_info; 
    21                         LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "creation pooling :: " + info); 
     21//                      LoggerPerso.log(SGBD_jdbc.class, LoggerPerso.DEBUG, "creation pooling :: " + info); 
    2222                        pooling = new PGPoolingDataSource(); 
    2323                        pooling.setDatabaseName(info.getDb_name()); 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/test/MainTest.java

    r68 r70  
    11package org.medias.eccad.persistance.test; 
    22 
    3 import java.util.List; 
    43 
    54import org.medias.eccad.helpers.SpringBeanFactory; 
    6 import org.medias.eccad.modele.Grille; 
    75import org.medias.eccad.persistance.exception.PersistanceException; 
    86import org.medias.eccad.persistance.jdbc.GrilleTestjdbc; 
     
    1715                //system.out.println(System.currentTimeMillis()); 
    1816                GrilleTestjdbc grilletest = (GrilleTestjdbc) SpringBeanFactory.getXmlFactory("test").getBean("grilleDAO"); 
    19                 List<Grille> liste = grilletest.getListGrille(27,3, "2003-11-01", "2008-01-01"); 
     17//              List<Grille> liste = grilletest.getListGrille(27,3, "2003-11-01", "2008-01-01"); 
    2018                //system.out.println(System.currentTimeMillis()); 
    2119                //system.out.println(liste.size()); 
    2220                grilletest.connection(); 
    2321                 
    24                 for (Grille grille : liste) { 
     22//              for (Grille grille : liste) { 
    2523                        //grilletest.getGrilleValue(grille.getOid()); 
    26                 } 
     24//              } 
    2725                //system.out.println(System.currentTimeMillis()); 
    2826                grilletest.disconnect(); 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/test/TestColorTabDAO.java

    r68 r70  
    11package org.medias.eccad.persistance.test; 
    2  
    3 import java.util.List; 
    4  
    5 import org.medias.eccad.helpers.SpringBeanFactory; 
    6 import org.medias.eccad.modele.ColorMap; 
    7 import org.medias.eccad.modele.ColorTab; 
    8 import org.medias.eccad.persistance.dao.CodeDAO; 
    9 import org.medias.eccad.persistance.dao.ColorTabDAO; 
    10 import org.medias.eccad.persistance.exception.PersistanceException; 
    112 
    123import junit.framework.TestCase; 
     
    1910 
    2011        public void testGetColorMapByGrille() { 
    21                 ColorTabDAO colortabDAO = (ColorTabDAO) SpringBeanFactory.getXmlFactory("test").getBean("colorTabDAO"); 
    22                 ColorTab colortab = null; 
    23                 try { 
    24                         colortab = colortabDAO.getColorMapByGrille(845767287); 
    25                 } catch (PersistanceException e) { 
     12//              ColorTabDAO colortabDAO = (ColorTabDAO) SpringBeanFactory.getXmlFactory("test").getBean("colorTabDAO"); 
     13//              ColorTab colortab = null; 
     14//              try { 
     15//                      colortab = colortabDAO.getColorMapByGrille(845767287); 
     16//              } catch (PersistanceException e) { 
    2617                        // TODO Auto-generated catch block 
    27                         e.printStackTrace(); 
    28                 } 
     18//                      e.printStackTrace(); 
     19//              } 
    2920                //system.out.println(colortab.toString()); 
    3021        } 
    3122 
    3223        public void testGetListColorMapByGrille() { 
    33                 ColorTabDAO colortabDAO = (ColorTabDAO) SpringBeanFactory.getXmlFactory("test").getBean("colorTabDAO"); 
    34                 List<ColorMap> colortab = null; 
    35                 try { 
    36                         colortab = colortabDAO.getListColorTabByGrille(10); 
    37                 } catch (PersistanceException e) { 
     24//              ColorTabDAO colortabDAO = (ColorTabDAO) SpringBeanFactory.getXmlFactory("test").getBean("colorTabDAO"); 
     25//              List<ColorMap> colortab = null; 
     26//              try { 
     27//                      colortab = colortabDAO.getListColorTabByGrille(10); 
     28//              } catch (PersistanceException e) { 
    3829                        // TODO Auto-generated catch block 
    39                         e.printStackTrace(); 
    40                 } 
     30//                      e.printStackTrace(); 
     31//              } 
    4132                 
    4233                //system.out.println(colortab.size()); 
     
    4536         
    4637        public void testGetCode() { 
    47                 CodeDAO codedao = (CodeDAO) SpringBeanFactory.getXmlFactory("test").getBean("codeDAO"); 
    48                 List<String> codes = null; 
     38//              CodeDAO codedao = (CodeDAO) SpringBeanFactory.getXmlFactory("test").getBean("codeDAO"); 
     39//              List<String> codes = null; 
    4940         
    50                 try { 
    51                         codes = codedao.getListCodeByGrille(845767287); 
    52                 } catch (PersistanceException e) { 
     41//              try { 
     42//                      codes = codedao.getListCodeByGrille(845767287); 
     43//              } catch (PersistanceException e) { 
    5344                // TODO Auto-generated catch block 
    54                 e.printStackTrace(); 
    55         } 
     45//              e.printStackTrace(); 
     46//      } 
    5647        //system.out.println(codes.toString()); 
    5748        } 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/test/TestMetierDessin.java

    r68 r70  
    11package org.medias.eccad.persistance.test; 
    22 
    3  
    4 import org.medias.eccad.helpers.LoggerPerso; 
    5 import org.medias.eccad.metier.ServiceMetier; 
    6 import org.medias.eccad.modele.Zone; 
    73 
    84import junit.framework.TestCase; 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/test/TestPerformance.java

    r68 r70  
    11package org.medias.eccad.persistance.test; 
    22 
    3 import java.sql.Date; 
    4 import java.util.GregorianCalendar; 
    5 import java.util.List; 
    6  
    73import org.medias.eccad.helpers.SpringBeanFactory; 
    8 import org.medias.eccad.modele.Grille; 
    94import org.medias.eccad.persistance.exception.PersistanceException; 
    105import org.medias.eccad.persistance.jdbc.GrilleTestjdbc; 
     
    2318                //system.out.println(System.currentTimeMillis()); 
    2419                GrilleTestjdbc grilletest = (GrilleTestjdbc) SpringBeanFactory.getXmlFactory("test").getBean("grilleDAO"); 
    25                 List<Grille> liste = grilletest.getListGrille(27,3, "2003-11-01", "2008-01-01"); 
     20//              List<Grille> liste = grilletest.getListGrille(27,3, "2003-11-01", "2008-01-01"); 
    2621                //system.out.println(System.currentTimeMillis()); 
    2722                //system.out.println(liste.size()); 
    2823                grilletest.connection(); 
    2924                 
    30                 for (Grille grille : liste) { 
     25//              for (Grille grille : liste) { 
    3126                        //grilletest.getGrilleValue(grille.getId_grille()); 
    32                 } 
     27//              } 
    3328                //system.out.println(System.currentTimeMillis()); 
    3429                grilletest.disconnect(); 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/test/TestServiceMetadata.java

    r68 r70  
    11package org.medias.eccad.persistance.test; 
    2  
    3 import org.medias.eccad.metier.ServiceMetadata; 
    42 
    53import junit.framework.TestCase; 
     
    1311 
    1412        public void testGetXMLTransformResult() { 
    15                 ServiceMetadata service_meta = new ServiceMetadata(); 
    16                         String xml = service_meta.getXmlMetadata(4); 
     13//              ServiceMetadata service_meta = new ServiceMetadata(); 
     14//                      String xml = service_meta.getXmlMetadata(4); 
    1715                //system.out.println(xml); 
    1816                //system.out.println(service_meta.getXMLTransformResult(xml, "metadata.xslt")); 
  • ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/persistance/test/TestXmlDAOhibernate.java

    r68 r70  
    11package org.medias.eccad.persistance.test; 
    22 
    3 import org.medias.eccad.persistance.dao.XmlDAO; 
    4 import org.medias.eccad.persistance.hibernate.XmlDAOhibernate; 
    53 
    64import junit.framework.TestCase; 
     
    1311 
    1412        public void testGetXmlByProduit() { 
    15                 XmlDAO xmldao = new XmlDAOhibernate(); 
     13//              XmlDAO xmldao = new XmlDAOhibernate(); 
    1614                //system.out.println(xmldao.getXmlByProduit(4)); 
    1715        } 
Note: See TracChangeset for help on using the changeset viewer.