Changeset 199 for ether_megapoli/trunk/persistence
- Timestamp:
- 09/16/11 16:23:06 (13 years ago)
- 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 2 2 3 3 import com.ether.Data; 4 import com.ether.Pair; 4 5 import com.ether.PersistenceException; 5 6 import com.medias.Nombre; … … 85 86 .add( Projections.property( "localisation.localisationLon" ) ) ) ); 86 87 87 criteria.addOrder( Order.asc( " localisation.localisationLon" ) );88 criteria.addOrder( Order.asc( "measure.mesureDate" ) ); 88 89 89 90 final List<Object[]> objects = selectAllByCriteria( Object[].class, criteria ); … … 135 136 final List<Double> parameterValues = new ArrayList<Double>( objects.size() ); 136 137 137 int i = 0;138 final List<Pair<Double, Double>> latLonList = new ArrayList<Pair<Double, Double>>(); 138 139 for( final Object[] value : objects ) 139 140 { 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 } 144 156 } 145 157 -
ether_megapoli/trunk/persistence/implementation/hibernate-domain.cfg.xml
r186 r199 7 7 <session-factory> 8 8 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"/> 35 35 36 36 </session-factory> -
ether_megapoli/trunk/persistence/implementation/hibernate.cfg.xml
r154 r199 17 17 <prop key="hibernate.bytecode.use_reflection_optimizer">false</prop> 18 18 <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> 21 21 <prop key="hibernate.connection.username">postgres</prop> 22 22 <prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop> -
ether_megapoli/trunk/persistence/implementation/hibernate.properties
r171 r199 1 1 hibernate.connection.driver_class = org.postgresql.Driver 2 hibernate.connection.url=jdbc:postgresql://darkstar. ipslnet:5432/MEGAPOLI_VM32 hibernate.connection.url=jdbc:postgresql://darkstar.private.ipsl.fr:5432/megapoli_2 3 3 hibernate.connection.username=postgres 4 4 #hibernate.c3p0.min_size=5
Note: See TracChangeset
for help on using the changeset viewer.