Subversion Repositories eFlore/Applications.coel

Rev

Rev 935 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
875 jpm 1
package org.tela_botanica.client.modeles;
2
 
3
import com.google.gwt.json.client.JSONArray;
4
import com.google.gwt.json.client.JSONObject;
5
 
6
/**
7
 * Table de hachage composée d'informations sur les Structures et les Personnes, renvoyé par un objet de type DAO
8
 * La clé est une concaténation des clés primaires de la table coel_structure_a_personne séparées par un tiret "-".
9
 *
10
 * @author david delon
11
 *
12
 */
13
public class CollectionAPersonneListe extends aDonneeListe<CollectionAPersonne> {
14
 
15
	private static final long serialVersionUID = 1L;
16
 
17
	public CollectionAPersonneListe() {
18
		super();
19
	}
20
 
21
	public CollectionAPersonneListe(int taille) {
22
		super(taille);
23
	}
24
 
25
	public CollectionAPersonneListe(JSONArray structures) {
26
		super(structures.size()) ;
27
		final int taillemax = structures.size();
28
 
29
		for (int i = 0; i < taillemax; i++) {
30
			JSONObject collectionAPersonneCourante = structures.get(i).isObject() ;
31
 
32
			if (collectionAPersonneCourante != null)	{
33
				CollectionAPersonne collectionAPersonne = new CollectionAPersonne(collectionAPersonneCourante);
34
				this.put(collectionAPersonne.getId(), collectionAPersonne);
35
			}
36
		}
37
	}
38
 
39
}