Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 775 Rev 901
Line 11... Line 11...
11
	
11
	
12
	public static final String PREFIXE = "cpuap";
12
	public static final String PREFIXE = "cpuap";
13
	public static final String ROLE_AUTEUR = "2360";
13
	public static final String ROLE_AUTEUR = "2360";
Line -... Line 14...
-
 
14
	private Personne personneLiee = null;
-
 
15
	
14
	private Personne personneLiee = null;
16
	public PublicationAPersonne() {}
15
	
17
	
Line 16... Line 18...
16
	public PublicationAPersonne(JSONObject pubAPersListe) {
18
	public PublicationAPersonne(JSONObject pubAPersListe) {
17
		personneLiee = new Personne(pubAPersListe);
19
		personneLiee = new Personne(pubAPersListe);
Line 44... Line 46...
44
	public Personne getPersonne() {
46
	public Personne getPersonne() {
45
		return personneLiee;
47
		return personneLiee;
46
	}
48
	}
47
	public void setPersonne(Personne personne) {
49
	public void setPersonne(Personne personne) {
48
		personneLiee = personne;
50
		personneLiee = personne;
-
 
51
		if (personne != null) {
-
 
52
			setIdPersonne(personne.getId());
-
 
53
		}
-
 
54
	}
-
 
55
	
-
 
56
	// ID
-
 
57
	public String getId() {
-
 
58
		String idPublication = getIdPublication();
-
 
59
		String idPersonne = getIdPersonne();
-
 
60
		String idRole = getIdRole();
-
 
61
		if (idPublication.equals("") && idPersonne.equals("") && idRole.equals("")) {
-
 
62
			return null;
-
 
63
		} else {
-
 
64
			return (idPublication+"-"+idPersonne+"-"+idRole);
-
 
65
		}
49
	}
66
	}
Line -... Line 67...
-
 
67
	
-
 
68
	// ID PUBLICATION
-
 
69
	public String getIdPublication() {
-
 
70
		return renvoyerValeurCorrecte("id_publication");
-
 
71
	}
-
 
72
	public void setIdPublication(String id) {
-
 
73
		set("id_publication", id);
-
 
74
	}
-
 
75
	
-
 
76
	// ID PERSONNE
-
 
77
	public String getIdPersonne() {
-
 
78
		return renvoyerValeurCorrecte("id_personne");
-
 
79
	}
-
 
80
	public void setIdPersonne(String id) {
-
 
81
		set("id_personne", id);
-
 
82
	}
-
 
83
	
-
 
84
	// ID RĂ´LE
-
 
85
	public String getIdRole() {
-
 
86
		return renvoyerValeurCorrecte("id_role");
-
 
87
	}
-
 
88
	public void setIdRole(String id) {
-
 
89
		set("id_role", id);
-
 
90
	}
-
 
91
		
-
 
92
	// TYPE
-
 
93
	public String getType() {
-
 
94
		return renvoyerValeurCorrecte("ce_truk_type");
-
 
95
	}
-
 
96
	public void setType(String type) {
-
 
97
		set("ce_truk_type", type);
-
 
98
	}
-
 
99
	public void setFonction(String type, String valeur) {
-
 
100
		setChaineDenormaliseUnique("ce_truk_type", type, valeur);
50
	
101
	}
51
}
102
}