Subversion Repositories eFlore/Applications.del

Rev

Rev 500 | Rev 822 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 500 Rev 629
Line 45... Line 45...
45
 
45
 
46
	public void setIdImage(String idImage) {
46
	public void setIdImage(String idImage) {
47
		this.idImage = idImage;
47
		this.idImage = idImage;
Line -... Line 48...
-
 
48
	}
48
	}
49
 
Line -... Line 50...
-
 
50
	// Impossible d'utiliser le type générique Map ici, pourquoi ? je ne sais pas !
-
 
51
	private HashMap<String, HashMap<String, VoteProtocole>> votesProtocoles = new HashMap<String, HashMap<String, VoteProtocole>>();
-
 
52
 
-
 
53
	public void ajouterVoteProtocole(VoteProtocole voteProcotole) {
49
 
54
		getVotesProtocoles(voteProcotole.getIdProtocole()).put(voteProcotole.getContributeur(), voteProcotole);
50
	private Map<String, List<VoteProtocole>> voteProtocoles = new HashMap<String, List<VoteProtocole>>();
55
	}
51
 
56
	
52
	public List<VoteProtocole> getVoteProtocoles(String id_protocole) {
57
	public HashMap<String, VoteProtocole> getVotesProtocoles(String id_protocole) {
53
		if(!voteProtocoles.containsKey(""+id_protocole) || voteProtocoles.get(""+id_protocole) == null) {
58
		if(!votesProtocoles.containsKey(""+id_protocole) || votesProtocoles.get(""+id_protocole) == null) {
-
 
59
			votesProtocoles.put(""+id_protocole, new HashMap<String, VoteProtocole>());
-
 
60
		}
-
 
61
		return votesProtocoles.get(id_protocole+"");
-
 
62
	}
54
			voteProtocoles.put(""+id_protocole, new ArrayList<VoteProtocole>());
63
	
Line 55... Line 64...
55
		}
64
	public HashMap<String, VoteProtocole> getVotesProtocoles(int id_protocole) {	
56
		return voteProtocoles.get(id_protocole+"");
65
		return getVotesProtocoles(id_protocole+"");
57
	}
66
	}
Line 58... Line 67...
58
	
67
	
59
	public List<VoteProtocole> getVotesProtocoles(int id_protocole) {	
68
	public HashMap<String, HashMap<String, VoteProtocole>> getListeVotesProtocoles() {
60
		return getVoteProtocoles(id_protocole+"");
69
		return votesProtocoles;
Line 61... Line 70...
61
	}
70
	}
62
	
71
	
63
	public void setVoteProtocoles(Map<String, List<VoteProtocole>> voteProtocoles) {
72
	public void setVoteProtocoles(HashMap<String, HashMap<String, VoteProtocole>> voteProtocoles) {
Line 64... Line 73...
64
		this.voteProtocoles = voteProtocoles;
73
		this.votesProtocoles = voteProtocoles;
65
	}
74
	}
66
 
75