Subversion Repositories eFlore/Applications.del

Rev

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

Rev Author Line No. Line
9 benjamin 1
package org.tela_botanica.del.client.modeles;
2
 
3
import java.io.Serializable;
227 aurelien 4
import java.util.HashMap;
5
import java.util.Map;
9 benjamin 6
 
663 benjamin 7
public class PropositionDetermination extends InterventionForum implements Serializable {
9 benjamin 8
 
9
	private static final long serialVersionUID = 840032625524143547L;
896 aurelien 10
	private String id, espece, commentaire;
890 gduche 11
 
12
 
232 gduche 13
	private Map<String, VoteDetermination> votesDeterminations = new HashMap<String, VoteDetermination>();
835 aurelien 14
	private Observation observation;
663 benjamin 15
 
890 gduche 16
	public PropositionDetermination(String id, Contributeur contributeur, String texte) {
17
		setId(id);
18
		setContributeur(contributeur);
19
	}
20
 
835 aurelien 21
	public PropositionDetermination(Observation observation) {
22
		this.observation = observation;
23
	}
9 benjamin 24
 
141 aurelien 25
	public void ajouterVoteDetermination(VoteDetermination vd) {
227 aurelien 26
		votesDeterminations.put(vd.getContributeur(), vd);
9 benjamin 27
	}
28
 
896 aurelien 29
	public String getId() {
30
		return id;
31
	}
32
 
33
	public void setId(String id) {
34
		this.id = id;
35
	}
36
 
90 aurelien 37
	public String getEspece() {
38
		return espece;
39
	}
40
 
41
	public void setEspece(String espece) {
42
		this.espece = espece;
43
	}
147 benjamin 44
 
227 aurelien 45
	public Map<String, VoteDetermination> getVotesDeterminations() {
147 benjamin 46
		return votesDeterminations;
47
	}
48
 
227 aurelien 49
	public void setVotesDeterminations(Map<String, VoteDetermination> votesDeterminations) {
147 benjamin 50
		this.votesDeterminations = votesDeterminations;
51
	}
835 aurelien 52
 
53
	public boolean utilisateurAVotePourDetermination(String idContributeur) {
54
		return votesDeterminations.containsKey(idContributeur);
55
	}
658 benjamin 56
 
835 aurelien 57
	public Observation getObservation() {
58
		return observation;
59
	}
60
 
61
	public void setObservation(Observation observation) {
62
		this.observation = observation;
63
	}
896 aurelien 64
 
65
	public void setCommentaire(String commentaire) {
66
		this.commentaire = commentaire;
67
	}
835 aurelien 68
 
907 aurelien 69
	public String getCommentaire() {
896 aurelien 70
		return commentaire;
71
	}
9 benjamin 72
}