Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/WQInfoRecord.java @ 245:1e73d5a4859c
Added new WQ info service and data structures.
flys-client/trunk@1825 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 04 May 2011 14:54:38 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
244:1bc787eeb556 | 245:1e73d5a4859c |
---|---|
1 package de.intevation.flys.client.shared.model; | |
2 | |
3 import com.smartgwt.client.widgets.grid.ListGridRecord; | |
4 | |
5 | |
6 /** | |
7 * The WQInfoRecord is a wrapper to put WQ Info objects into | |
8 * a ListGrid. | |
9 * | |
10 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> | |
11 */ | |
12 public class WQInfoRecord extends ListGridRecord { | |
13 | |
14 /** The artifact collection. */ | |
15 protected WQInfoObject wqInfo; | |
16 | |
17 | |
18 /** | |
19 * The default constructor. | |
20 * | |
21 * @param info The wq info object. | |
22 */ | |
23 public WQInfoRecord(WQInfoObject info) { | |
24 this.wqInfo = info; | |
25 | |
26 setName(info.getName()); | |
27 setType(info.getType()); | |
28 if (info.getValue() != null) | |
29 setValue(info.getValue()); | |
30 else | |
31 setValue(info.getValue()); | |
32 } | |
33 | |
34 | |
35 public void setName(String name) { | |
36 setAttribute("name", name); | |
37 } | |
38 | |
39 | |
40 public String getName() { | |
41 return getAttributeAsString("name"); | |
42 } | |
43 | |
44 | |
45 public void setType(String type) { | |
46 setAttribute("type", type); | |
47 } | |
48 | |
49 | |
50 public String getType() { | |
51 return getAttributeAsString("type"); | |
52 } | |
53 | |
54 public void setValue(double value) { | |
55 setAttribute("value", value); | |
56 } | |
57 | |
58 | |
59 public double getValue() { | |
60 return getAttributeAsDouble("value"); | |
61 } | |
62 | |
63 | |
64 public WQInfoObject getWQInfo() { | |
65 return wqInfo; | |
66 } | |
67 } | |
68 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |