Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 984 → Rev 985

/trunk/src/org/tela_botanica/client/modeles/commentaire/CommentaireListe.java
New file
0,0 → 1,38
package org.tela_botanica.client.modeles.commentaire;
 
import org.tela_botanica.client.modeles.aDonneeListe;
 
import com.google.gwt.json.client.JSONArray;
import com.google.gwt.json.client.JSONObject;
 
public class CommentaireListe extends aDonneeListe<Commentaire> {
 
private static final long serialVersionUID = 2600314321196345072L;
 
public CommentaireListe() {
super();
}
public CommentaireListe(int taille) {
super(taille);
}
/**
* Constructeur pour une liste de commentaires
* @param dates
*/
public CommentaireListe(JSONArray commentaires) {
super(commentaires.size());
boolean chargerCollectionACommentaire = true;
int taille = commentaires.size();
for (int i = 0; i < taille; i++) {
JSONObject commentaireCourant = commentaires.get(i).isObject() ;
if (commentaireCourant != null) {
Commentaire commentaire = new Commentaire(commentaireCourant, chargerCollectionACommentaire);
this.put(commentaire.getId(), commentaire);
}
}
}
}