Subversion Repositories eFlore/Applications.coel

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1918 aurelien 1
package org.tela_botanica.client.modeles;
2
 
3
import java.util.Collection;
4
import java.util.HashMap;
5
import java.util.Map;
6
 
7
import com.extjs.gxt.ui.client.data.ModelData;
8
 
9
public class SimpleModelData implements ModelData {
10
 
11
	private Map<String, Object> modele = new HashMap<String, Object>();
12
 
13
	public SimpleModelData(String cle, String valeur, String ordre) {
14
		this.set("cle", cle);
15
		this.set("valeur", valeur);
16
		this.set("ordre", ordre);
17
	}
18
 
19
	public String getValeur() {
20
		return (String)modele.get("valeur");
21
	}
22
 
23
	public String getCle() {
24
		return (String)modele.get("cle");
25
	}
26
 
27
	public String getOrdre() {
28
		return (String)modele.get("ordre");
29
	}
30
 
31
	@Override
32
	public String get(String property) {
33
		return (String)modele.get(property);
34
	}
35
 
36
	@Override
37
	public Map<String, Object> getProperties() {
38
		return modele;
39
	}
40
 
41
	@Override
42
	public Collection<String> getPropertyNames() {
43
		return modele.keySet();
44
	}
45
 
46
	@Override
47
	public String remove(String property) {
48
		return (String)modele.remove(property);
49
	}
50
 
51
	@Override
52
	public <Object> Object set(String property, Object value) {
53
		modele.put(property, value);
54
		return value;
55
	}
56
 
57
}