Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/DefaultInputValue.java @ 657:af3f56758f59
merged gnv-artifacts/0.5
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:13:53 +0200 |
parents | e964a3d8f7bc |
children | 9a828e5a2390 |
comparison
equal
deleted
inserted
replaced
590:5f5f273c8566 | 657:af3f56758f59 |
---|---|
1 /** | |
2 * | |
3 */ | |
4 package de.intevation.gnv.state; | |
5 | |
6 /** | |
7 * @author Tim Englich <tim.englich@intevation.de> | |
8 * | |
9 */ | |
10 public class DefaultInputValue implements InputValue { | |
11 | |
12 /** | |
13 * The UID of this Class. | |
14 */ | |
15 private static final long serialVersionUID = -8518824299166180986L; | |
16 private String name = null; | |
17 private String type = null; | |
18 private boolean multiselect = false; | |
19 private int usedInQueries = 1; | |
20 private String defaultValue = "N/N"; | |
21 | |
22 public DefaultInputValue(String name, String type, String defaultValue, | |
23 boolean multiselect) { | |
24 this(name, type, multiselect, 1); | |
25 this.defaultValue = defaultValue; | |
26 | |
27 } | |
28 | |
29 /** | |
30 * Constructor | |
31 */ | |
32 public DefaultInputValue(String name, String type, boolean multiselect, | |
33 int usedInQueries) { | |
34 this.name = name; | |
35 this.type = type; | |
36 this.multiselect = multiselect; | |
37 this.usedInQueries = usedInQueries; | |
38 } | |
39 | |
40 /** | |
41 * @see de.intevation.gnv.state.InputValue#getName() | |
42 */ | |
43 public String getName() { | |
44 return this.name; | |
45 } | |
46 | |
47 /** | |
48 * @see de.intevation.gnv.state.InputValue#getType() | |
49 */ | |
50 public String getType() { | |
51 return this.type; | |
52 } | |
53 | |
54 /** | |
55 * @see java.lang.Object#toString() | |
56 */ | |
57 @Override | |
58 public String toString() { | |
59 return "InputValue " + this.name + " ==> " + this.type | |
60 + "==> multiselect: " + this.multiselect; | |
61 } | |
62 | |
63 /** | |
64 * @see de.intevation.gnv.state.InputValue#isMultiselect() | |
65 */ | |
66 public boolean isMultiselect() { | |
67 return this.multiselect; | |
68 } | |
69 | |
70 public int usedInQueries() { | |
71 return this.usedInQueries; | |
72 } | |
73 | |
74 public String getDefaultValue() { | |
75 return this.defaultValue; | |
76 } | |
77 | |
78 } |