Rev 1049 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
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);
}
}
}
}