comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/DefaultInputValue.java @ 875:5e9efdda6894

merged gnv-artifacts/1.0
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:13:56 +0200
parents 05bf8534a35a
children f953c9a559d8
comparison
equal deleted inserted replaced
722:bb3ffe7d719e 875:5e9efdda6894
1 package de.intevation.gnv.state;
2
3 /**
4 * The default implementation of <code>InputValue</code>. InputValue objects are
5 * used to store meta information about <code>InputData</code> objects.
6 *
7 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
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,
23 boolean multiselect) {
24 this(name, type, multiselect, 1);
25 this.defaultValue = defaultValue;
26
27 }
28
29
30 public DefaultInputValue(String name, String type, boolean multiselect,
31 int usedInQueries) {
32 this.name = name;
33 this.type = type;
34 this.multiselect = multiselect;
35 this.usedInQueries = usedInQueries;
36 }
37
38
39 public String getName() {
40 return this.name;
41 }
42
43
44 public String getType() {
45 return this.type;
46 }
47
48 /**
49 * Returns the information as string.
50 *
51 * @return information as string.
52 */
53 @Override
54 public String toString() {
55 return "InputValue " + this.name + " ==> " + this.type
56 + "==> multiselect: " + this.multiselect;
57 }
58
59
60 public boolean isMultiselect() {
61 return this.multiselect;
62 }
63
64
65 public int usedInQueries() {
66 return this.usedInQueries;
67 }
68
69
70 public String getDefaultValue() {
71 return this.defaultValue;
72 }
73
74 }
75 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org