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