Ignore:
Timestamp:
09/16/11 16:23:06 (13 years ago)
Author:
vmipsl
Message:

Livraison _ confs

Location:
ether_megapoli/trunk/persistence/implementation
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ether_megapoli/trunk/persistence/implementation/com/ether/dao/ValueDAOImpl.java

    r194 r199  
    22 
    33import com.ether.Data; 
     4import com.ether.Pair; 
    45import com.ether.PersistenceException; 
    56import com.medias.Nombre; 
     
    8586                .add( Projections.property( "localisation.localisationLon" ) ) ) ); 
    8687 
    87         criteria.addOrder( Order.asc( "localisation.localisationLon" ) ); 
     88        criteria.addOrder( Order.asc( "measure.mesureDate" ) ); 
    8889 
    8990        final List<Object[]> objects = selectAllByCriteria( Object[].class, criteria ); 
     
    135136        final List<Double> parameterValues = new ArrayList<Double>( objects.size() ); 
    136137 
    137         int i = 0; 
     138        final List<Pair<Double, Double>> latLonList = new ArrayList<Pair<Double, Double>>(); 
    138139        for( final Object[] value : objects ) 
    139140        { 
    140             parameterValues.add( (Double) value[0] ); 
    141             latitudeValues.add( Double.valueOf( Nombre.latIntToFloat( (Integer) value[1] ) ) ); 
    142             longitudeValues.add( Double.valueOf( Nombre.latIntToFloat( (Integer) value[2] ) ) ); 
    143             i++; 
     141            final Double latitude = Double.valueOf( Nombre.latIntToFloat( (Integer) value[1] ) ); 
     142            final Double longitude = Double.valueOf( Nombre.latIntToFloat( (Integer) value[2] ) ); 
     143 
     144            final Pair<Double, Double> latLon = new Pair( latitude, longitude ); 
     145            if( !latLonList.contains( latLon ) ) 
     146            { 
     147                parameterValues.add( (Double) value[0] ); 
     148                latitudeValues.add( latitude ); 
     149                longitudeValues.add( longitude ); 
     150                latLonList.add( latLon ); 
     151            } 
     152            else 
     153            { 
     154                final String pif = "paf"; 
     155            } 
    144156        } 
    145157 
  • ether_megapoli/trunk/persistence/implementation/hibernate-domain.cfg.xml

    r186 r199  
    77        <session-factory> 
    88 
    9         <!--<mapping resource="com/medias/objects/Adresse.hbm.xml"/>--> 
    10         <!--<mapping resource="com/medias/objects/Bilan.hbm.xml"/>--> 
    11         <!--<mapping resource="com/medias/objects/Capteur.hbm.xml"/>--> 
    12         <!--<mapping resource="com/medias/objects/Categorie.hbm.xml"/>--> 
    13         <!--<mapping resource="com/medias/objects/CategorieParam.hbm.xml"/>--> 
    14         <!--<mapping resource="com/medias/objects/Commentaire.hbm.xml"/>--> 
    15         <!--<mapping resource="com/medias/objects/DeltaMesure.hbm.xml"/>--> 
    16         <!--<mapping resource="com/medias/objects/Fabriquant.hbm.xml"/>--> 
    17         <!--<mapping resource="com/medias/objects/Fichier.hbm.xml"/>--> 
    18         <!--<mapping resource="com/medias/objects/Flag.hbm.xml"/>--> 
    19         <!--<mapping resource="com/medias/objects/Jeu.hbm.xml"/>--> 
    20         <!--<mapping resource="com/medias/objects/Langue.hbm.xml"/>--> 
    21         <!--<mapping resource="com/medias/objects/Localisation.hbm.xml"/>--> 
    22         <!--<mapping resource="com/medias/objects/Mesure.hbm.xml"/>--> 
    23         <!--<mapping resource="com/medias/objects/Organisme.hbm.xml"/>--> 
    24         <!--<mapping resource="com/medias/objects/Parametre.hbm.xml"/>--> 
    25         <!--<mapping resource="com/medias/objects/Personne.hbm.xml"/>--> 
    26         <!--<mapping resource="com/medias/objects/Plateforme.hbm.xml"/>--> 
    27         <!--<mapping resource="com/medias/objects/RequeteNbvalsJeu.hbm.xml"/>--> 
    28         <!--<mapping resource="com/medias/objects/RequetePlatLoc.hbm.xml"/>--> 
    29         <!--<mapping resource="com/medias/objects/Sequence.hbm.xml"/>--> 
    30         <!--<mapping resource="com/medias/objects/TypeCapteur.hbm.xml"/>--> 
    31         <!--<mapping resource="com/medias/objects/TypePlateforme.hbm.xml"/>--> 
    32         <!--<mapping resource="com/medias/objects/Unite.hbm.xml"/>--> 
    33         <!--<mapping resource="com/medias/objects/Valeur.hbm.xml"/>--> 
    34         <!--<mapping resource="com/medias/objects/Zone.hbm.xml"/>--> 
     9        <mapping resource="com/medias/objects/Adresse.hbm.xml"/> 
     10        <mapping resource="com/medias/objects/Bilan.hbm.xml"/> 
     11        <mapping resource="com/medias/objects/Capteur.hbm.xml"/> 
     12        <mapping resource="com/medias/objects/Categorie.hbm.xml"/> 
     13        <mapping resource="com/medias/objects/CategorieParam.hbm.xml"/> 
     14        <mapping resource="com/medias/objects/Commentaire.hbm.xml"/> 
     15        <mapping resource="com/medias/objects/DeltaMesure.hbm.xml"/> 
     16        <mapping resource="com/medias/objects/Fabriquant.hbm.xml"/> 
     17        <mapping resource="com/medias/objects/Fichier.hbm.xml"/> 
     18        <mapping resource="com/medias/objects/Flag.hbm.xml"/> 
     19        <mapping resource="com/medias/objects/Jeu.hbm.xml"/> 
     20        <mapping resource="com/medias/objects/Langue.hbm.xml"/> 
     21        <mapping resource="com/medias/objects/Localisation.hbm.xml"/> 
     22        <mapping resource="com/medias/objects/Mesure.hbm.xml"/> 
     23        <mapping resource="com/medias/objects/Organisme.hbm.xml"/> 
     24        <mapping resource="com/medias/objects/Parametre.hbm.xml"/> 
     25        <mapping resource="com/medias/objects/Personne.hbm.xml"/> 
     26        <mapping resource="com/medias/objects/Plateforme.hbm.xml"/> 
     27        <mapping resource="com/medias/objects/RequeteNbvalsJeu.hbm.xml"/> 
     28        <mapping resource="com/medias/objects/RequetePlatLoc.hbm.xml"/> 
     29        <mapping resource="com/medias/objects/Sequence.hbm.xml"/> 
     30        <mapping resource="com/medias/objects/TypeCapteur.hbm.xml"/> 
     31        <mapping resource="com/medias/objects/TypePlateforme.hbm.xml"/> 
     32        <mapping resource="com/medias/objects/Unite.hbm.xml"/> 
     33        <mapping resource="com/medias/objects/Valeur.hbm.xml"/> 
     34        <mapping resource="com/medias/objects/Zone.hbm.xml"/> 
    3535 
    3636        </session-factory> 
  • ether_megapoli/trunk/persistence/implementation/hibernate.cfg.xml

    r154 r199  
    1717                                <prop key="hibernate.bytecode.use_reflection_optimizer">false</prop> 
    1818                                <prop key="hibernate.connection.driver_class">org.postgresql.Driver</prop> 
    19                                 <prop key="hibernate.connection.url">jdbc:postgresql://darkstar.ipslnet:5432/MEGAPOLI_VM3</prop> 
    20 <!--                            <prop key="hibernate.connection.url">jdbc:postgresql://darkstar.ipslnet:5432/NAFE_TEST</prop>--> 
     19                                <!--<prop key="hibernate.connection.url">jdbc:postgresql://darkstar.ipslnet:5432/megapoli_2</prop>--> 
     20                                <prop key="hibernate.connection.url">jdbc:postgresql://darkstar.private.ipsl.fr:5432/megapoli_2</prop> 
    2121                                <prop key="hibernate.connection.username">postgres</prop> 
    2222                                <prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop> 
  • ether_megapoli/trunk/persistence/implementation/hibernate.properties

    r171 r199  
    11hibernate.connection.driver_class = org.postgresql.Driver 
    2 hibernate.connection.url=jdbc:postgresql://darkstar.ipslnet:5432/MEGAPOLI_VM3 
     2hibernate.connection.url=jdbc:postgresql://darkstar.private.ipsl.fr:5432/megapoli_2 
    33hibernate.connection.username=postgres 
    44#hibernate.c3p0.min_size=5 
Note: See TracChangeset for help on using the changeset viewer.