Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 934 → Rev 935

/trunk/src/org/tela_botanica/client/modeles/collection/CollectionAPersonneListe.java
New file
0,0 → 1,41
package org.tela_botanica.client.modeles.collection;
 
import org.tela_botanica.client.modeles.aDonneeListe;
 
import com.google.gwt.json.client.JSONArray;
import com.google.gwt.json.client.JSONObject;
 
/**
* Table de hachage composée d'informations sur les Structures et les Personnes, renvoyé par un objet de type DAO
* La clé est une concaténation des clés primaires de la table coel_structure_a_personne séparées par un tiret "-".
*
* @author david delon
*
*/
public class CollectionAPersonneListe extends aDonneeListe<CollectionAPersonne> {
 
private static final long serialVersionUID = 1L;
 
public CollectionAPersonneListe() {
super();
}
public CollectionAPersonneListe(int taille) {
super(taille);
}
public CollectionAPersonneListe(JSONArray structures) {
super(structures.size()) ;
final int taillemax = structures.size();
for (int i = 0; i < taillemax; i++) {
JSONObject collectionAPersonneCourante = structures.get(i).isObject() ;
if (collectionAPersonneCourante != null) {
CollectionAPersonne collectionAPersonne = new CollectionAPersonne(collectionAPersonneCourante);
this.put(collectionAPersonne.getId(), collectionAPersonne);
}
}
}
}