Subversion Repositories eFlore/Applications.del

Rev

Rev 907 | Rev 919 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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