1 /*
2 * PROJECT : DAR Runtime and Tools
3 * COPYRIGHT : Copyright (C) 1999-2004 tim.stephenson@enableit.org
4 * LICENSE : GNU LESSER GENERAL PUBLIC LICENSE
5 * Version 2.1, February 1999
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21 package org.enableit.db;
22
23
24 /***
25 * Represent a database column.
26 *
27 * <p>Intended only as a helper to the DataLoader class
28 * (perhaps should have been an inner class).</p>
29 *
30 * @version v1.3
31 */
32 public class Column {
33 /***
34 * CVS info about this class and its current version
35 */
36 public static final String ABOUT = "$Id: Column.java,v 1.6 2004/03/19 19:10:33 tim Exp $";
37
38 // Properties -----------------------------------------------------------------
39
40 /***
41 * The column name.
42 */
43 private String name;
44
45 /***
46 * The column datatype.
47 */
48 private String datatype;
49
50 // Constructors ---------------------------------------------------------------
51
52 /***
53 * Default Constructor.
54 */
55 public Column() {
56 }
57
58 /***
59 * Constructor that sets the column's name.
60 * @param name The column name.
61 */
62 public Column(String name) {
63 this.name = name;
64 }
65
66 /***
67 * Constructor that sets the column's name and datatype.
68 * @param name The column name.
69 * @param datatype The column datatype (database type name, not Java name).
70 */
71 public Column(String name, String datatype) {
72 this.name = name;
73 this.datatype = datatype;
74 }
75
76 // Mutator Methods ------------------------------------------------------------
77
78 /***
79 * @param The column's datatype.
80 */
81 public void setDatatype(String datatype) {
82 this.datatype = datatype;
83 }
84
85 // Accessor methods -----------------------------------------------------------
86
87 /***
88 * @return The column's name.
89 */
90 public String getName() {
91 return this.name;
92 }
93
94 /***
95 * @return the column's name.
96 */
97 public String getDatatype() {
98 return this.datatype;
99 }
100 }
This page was automatically generated by Maven