4,11 → 4,15 |
import java.util.HashMap; |
import java.util.Map; |
|
import com.google.gwt.user.client.Window; |
|
public class PropositionDetermination extends InterventionForum implements Serializable { |
|
private static final long serialVersionUID = 840032625524143547L; |
private String id, espece, commentaire, numNomenclatural, referentiel, valideePar, dateValidation; |
private int nbCommentaires = 0; |
/** Doit valoir 1 s'il y a un commentaire initial, sinon 0 */ |
private int commentaireInitial = 0; |
private boolean estPropositionInitiale = false; |
|
public boolean estPropositionInitiale() { |
34,6 → 38,14 |
this.observation = observation; |
} |
|
protected void additionnerCommentaireInitial() { |
if (this.commentaire != null && !this.commentaire.equals("")) { |
commentaireInitial = 1; |
} else { |
commentaireInitial = 0; |
} |
} |
|
public boolean estPropositionRetenue() { |
return (this.espece.equals(this.observation.getNomRetenu())); |
} |
80,6 → 92,7 |
|
public void setCommentaire(String commentaire) { |
this.commentaire = commentaire; |
additionnerCommentaireInitial(); |
} |
|
public String getCommentaire() { |
91,20 → 104,12 |
} |
|
public int getTotalCommentaires() { |
// le nombre de commentaire peut avoir été renvoyé par le web service |
// sans que l'on possède la liste des commentaires elle même, auquel cas, il sera différent de 0 |
// et ne doit pas être recalculé |
if (nbCommentaires == 0 && this.listeCommentaires.size() != 0) { |
// wtf ? |
nbCommentaires = super.getTotalCommentaires(); |
if (this.getCommentaire() != null&&this.getCommentaire()!="") { |
nbCommentaires += 1; |
} |
} |
if (this.commentaire != null && !this.commentaire.equals("")) { |
nbCommentaires ++; |
} |
|
return nbCommentaires; |
return nbCommentaires + commentaireInitial; |
} |
|
public String getNumNomenclatural() { |