Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/DefaultInputValue.java @ 1119:7c4f81f74c47
merged gnv-artifacts
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:00 +0200 |
parents | f953c9a559d8 |
children |
comparison
equal
deleted
inserted
replaced
1027:fca4b5eb8d2f | 1119:7c4f81f74c47 |
---|---|
1 /* | |
2 * Copyright (c) 2010 by Intevation GmbH | |
3 * | |
4 * This program is free software under the LGPL (>=v2.1) | |
5 * Read the file LGPL.txt coming with the software for details | |
6 * or visit http://www.gnu.org/licenses/ if it does not exist. | |
7 */ | |
8 | |
9 package de.intevation.gnv.state; | |
10 | |
11 /** | |
12 * The default implementation of <code>InputValue</code>. InputValue objects are | |
13 * used to store meta information about <code>InputData</code> objects. | |
14 * | |
15 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> | |
16 */ | |
17 public class DefaultInputValue implements InputValue { | |
18 | |
19 /** | |
20 * The UID of this Class. | |
21 */ | |
22 private static final long serialVersionUID = -8518824299166180986L; | |
23 private String name = null; | |
24 private String type = null; | |
25 private boolean multiselect = false; | |
26 private int usedInQueries = 1; | |
27 private String defaultValue = "N/N"; | |
28 | |
29 | |
30 public DefaultInputValue(String name, String type, String defaultValue, | |
31 boolean multiselect) { | |
32 this(name, type, multiselect, 1); | |
33 this.defaultValue = defaultValue; | |
34 | |
35 } | |
36 | |
37 | |
38 public DefaultInputValue(String name, String type, boolean multiselect, | |
39 int usedInQueries) { | |
40 this.name = name; | |
41 this.type = type; | |
42 this.multiselect = multiselect; | |
43 this.usedInQueries = usedInQueries; | |
44 } | |
45 | |
46 | |
47 public String getName() { | |
48 return this.name; | |
49 } | |
50 | |
51 | |
52 public String getType() { | |
53 return this.type; | |
54 } | |
55 | |
56 /** | |
57 * Returns the information as string. | |
58 * | |
59 * @return information as string. | |
60 */ | |
61 @Override | |
62 public String toString() { | |
63 return "InputValue " + this.name + " ==> " + this.type | |
64 + "==> multiselect: " + this.multiselect; | |
65 } | |
66 | |
67 | |
68 public boolean isMultiselect() { | |
69 return this.multiselect; | |
70 } | |
71 | |
72 | |
73 public int usedInQueries() { | |
74 return this.usedInQueries; | |
75 } | |
76 | |
77 | |
78 public String getDefaultValue() { | |
79 return this.defaultValue; | |
80 } | |
81 | |
82 } | |
83 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |