Subversion Repositories eFlore/Applications.coel

Rev

Rev 277 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
147 gduche 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 Valeurs des listes, renvoyé par un objet de type DAO
277 jp_milcent 8
 * La clé est l'id de l'entite.
147 gduche 9
 *
277 jp_milcent 10
 * @author Grégoire DUCHÉ
147 gduche 11
 *
12
 */
363 jp_milcent 13
public class ProjetListe extends aDonneeListe<Projet> {
147 gduche 14
 
363 jp_milcent 15
	private static final long serialVersionUID = -9030260944108896455L;
16
 
147 gduche 17
	/**
18
	 * Constructeur sans paramètres
19
	 */
268 jp_milcent 20
	public ProjetListe() {
147 gduche 21
		super();
22
	}
23
 
24
	/**
25
	 * Constructeur avec paramètre
26
	 * @param taille la taille de la table de hachage
27
	 */
268 jp_milcent 28
	public ProjetListe(int taille) {
147 gduche 29
		super(taille);
30
	}
31
 
32
	/**
33
	 * Constructeur pour une liste de projets
34
	 * @param dates
35
	 */
268 jp_milcent 36
	public ProjetListe(JSONArray projetsListe) {
147 gduche 37
		super(projetsListe.size());
38
 
39
		final int taillemax = projetsListe.size();
40
		for (int i = 0; i < taillemax; i++) {
41
			JSONObject projetCourant = projetsListe.get(i).isObject() ;
42
 
43
			if (projetCourant != null)	{
44
				Projet projet = new Projet(projetCourant);
45
				this.put(projet.getId(), projet);
46
			}
47
		}
48
	}
363 jp_milcent 49
}