Subversion Repositories eFlore/Applications.coel

Rev

Rev 831 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
808 jpm 1
package org.tela_botanica.client.modeles;
2
 
3
import org.tela_botanica.client.util.UtilString;
4
 
5
import com.extjs.gxt.ui.client.data.BaseModelData;
6
 
7
public class UniteRangement extends BaseModelData {
8
 
9
	private static final long serialVersionUID = 394843761854792528L;
10
	public static final String COMPTE_EXACT = "E";
11
	public static final String COMPTE_APPROXIMATIF = "A";
12
 
13
	public UniteRangement() {
14
 
15
	}
16
 
17
	public UniteRangement(String type, int nombre, String precision, String format) {
18
		setType(type);
19
		setNombre(nombre);
20
		setPrecision(precision);
21
		setFormat(format);
22
	}
23
 
24
	public String getType() {
25
		return renvoyerValeurCorrecte((String) get("type"));
26
	}
27
	public void setType(String type) {
28
		set("type", type);
29
	}
30
 
31
	public String getNombre() {
32
		return get("nombre");
33
	}
34
	public void setNombre(int nombre) {
35
		set("nombre", nombre);
36
	}
37
 
38
	public String getPrecision() {
39
		return renvoyerValeurCorrecte((String) get("precision"));
40
	}
41
	public void setPrecision(String precision) {
42
		set("precision", precision);
43
	}
44
 
45
	public String getFormat() {
46
		return renvoyerValeurCorrecte((String) get("format"));
47
	}
48
	public void setFormat(String format) {
49
		set("format", format);
50
	}
51
 
52
	private String renvoyerValeurCorrecte(String valeur) {
53
		String valeurCorrecte = "";
54
		if (!UtilString.isEmpty(valeur)) {
55
			valeurCorrecte = valeur;
56
		}
57
		return valeurCorrecte;
58
	}
59
}