comparison artifact-database/src/main/java/de/intevation/artifactdatabase/data/DefaultStateData.java @ 110:33271242e303

Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class. artifacts/trunk@1301 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 07 Feb 2011 17:35:16 +0000
parents
children 62dd8438885f
comparison
equal deleted inserted replaced
109:ab646e0f5569 110:33271242e303
1 /*
2 * Copyright (c) 2011 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 package de.intevation.artifactdatabase.data;
9
10
11 /**
12 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
13 */
14 public class DefaultStateData implements StateData {
15
16 /** The name of the data. */
17 protected String name;
18
19 /** The description of the data. */
20 protected String description;
21
22 /** The type of the data. */
23 protected String type;
24
25 /** The value. */
26 protected Object value;
27
28
29 /**
30 * The default constructor. It creates empty StateData objects with no
31 * value.
32 *
33 * @param name The name.
34 * @param description The description.
35 * @param type The type.
36 */
37 public DefaultStateData(String name, String description, String type) {
38 this.name = name;
39 this.description = description;
40 this.type = type;
41 }
42
43
44 /**
45 * Returns the name of the data object.
46 *
47 * @return the name.
48 */
49 public String getName() {
50 return name;
51 }
52
53
54 /**
55 * Returns the description of the data object.
56 *
57 * @return the description of the data object.
58 */
59 public String getDescription() {
60 return description;
61 }
62
63
64 /**
65 * Returns the type of the data object as string.
66 *
67 * @return the type as string.
68 */
69 public String getType() {
70 return type;
71 }
72
73
74 /**
75 * Returns the value of the data object.
76 *
77 * @return the value.
78 */
79 public Object getValue() {
80 return value;
81 }
82
83
84 /**
85 * Set the value of this data object.
86 *
87 * @param value The new value for this data object.
88 */
89 public void setValue(Object value) {
90 this.value = value;
91 }
92 }
93 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org