Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 1513 Rev 1573
Line 8... Line 8...
8
import org.tela_botanica.client.Mediateur;
8
import org.tela_botanica.client.Mediateur;
9
import org.tela_botanica.client.modeles.aDonnee;
9
import org.tela_botanica.client.modeles.aDonnee;
10
import org.tela_botanica.client.modeles.collection.CollectionAPublication;
10
import org.tela_botanica.client.modeles.collection.CollectionAPublication;
11
import org.tela_botanica.client.modeles.publication.PublicationAPersonneListe;
11
import org.tela_botanica.client.modeles.publication.PublicationAPersonneListe;
12
import org.tela_botanica.client.util.Debug;
12
import org.tela_botanica.client.util.Debug;
-
 
13
import org.tela_botanica.client.util.Log;
13
import org.tela_botanica.client.util.UtilString;
14
import org.tela_botanica.client.util.UtilString;
Line 14... Line 15...
14
 
15
 
15
import com.extjs.gxt.ui.client.data.ModelData;
16
import com.extjs.gxt.ui.client.data.ModelData;
16
import com.google.gwt.core.client.GWT;
17
import com.google.gwt.core.client.GWT;
Line 20... Line 21...
20
public class Personne extends aDonnee {
21
public class Personne extends aDonnee {
Line 21... Line 22...
21
 
22
 
Line 22... Line 23...
22
	private static final long serialVersionUID = -6974716696155349332L;
23
	private static final long serialVersionUID = -6974716696155349332L;
23
 
-
 
24
	public static final String PREFIXE = "cp";
24
 
25
	private boolean removePrefix = true;
25
	public static final String PREFIXE = "cp";
26
	public static final String TELEPHONE_FIXE = "FIX";
26
	public static final String TELEPHONE_FIXE = "FIX";
27
	public static final String TELEPHONE_GSM = "GSM";
27
	public static final String TELEPHONE_GSM = "GSM";
28
	public static final String TELEPHONE_FAX = "FAX";
28
	public static final String TELEPHONE_FAX = "FAX";
29
	public static final String ETRE_DECEDE = "30745";
29
	public static final String ETRE_DECEDE = "30745";
Line 30... Line 30...
30
	public static final String ETRE_VIVANT = "30746";
30
	public static final String ETRE_VIVANT = "30746";
Line 31... Line 31...
31
	public static String[] champsObligatoires = {"cp_id_personne"};
31
	public static String[] champsObligatoires = {"cp_id_personne"};
32
	
-
 
Line 33... Line 32...
33
	private PublicationAPersonneListe publicationsLiees= null;
32
	
34
	
33
	private PublicationAPersonneListe publicationsLiees= null;
35
	public Personne() {
34
	
Line 36... Line 35...
36
	}
35
	public Personne() {}
37
 
36
 
38
	public Personne(ModelData model) {
37
	public Personne(ModelData model) {
Line 39... Line 38...
39
		creerPersonne(model, false);
38
		creerPersonne(model, false);
40
	}
-
 
41
	
39
	}
Line 42... Line 40...
42
	public Personne(ModelData model, boolean removePrefix) {
40
	
Line 43... Line 41...
43
		creerPersonne(model, removePrefix);
41
	public Personne(ModelData model, boolean removePrefix) {
Line 132... Line 130...
132
		}
130
		}
133
	}
131
	}
Line 134... Line 132...
134
	
132
	
135
	// ID PERSONNE
133
	// ID PERSONNE
136
	public String getId() {
134
	public String getId() {
137
		if (removePrefix) return renvoyerValeurCorrecte("id_personne");
135
		Log.debug("Dans getId() Personne : "+this.toString());
138
		else return renvoyerValeurCorrecte(PREFIXE+"_id_personne");
136
		return renvoyerValeurCorrecte("id_personne");
139
	}
137
	}
140
	public void setId(String personneId) {
138
	public void setId(String personneId) {
141
		if (removePrefix) this.set("id_personne", personneId);
139
		if (removePrefix) this.set("id_personne", personneId);
142
		else this.set(PREFIXE+"_id_personne", personneId);
140
		else this.set(PREFIXE+"_id_personne", personneId);