View Javadoc

1   package org.devaki.nextobjects.workspace.models;
2   /*
3   
4   nextobjects Copyright (C) 2001-2005 Emmanuel Florent
5   
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by the
8   Free Software Foundation; either version 2 of the License, or (at your
9   option) any later version.
10  
11  This program is distributed in the hope that it will
12  be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13  of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the GNU General Public License for more details.
15  
16  You should have received a copy of the GNU General Public License along
17  with this program; if not, write to the Free Software Foundation, Inc., 59
18  Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  
20  */
21  import java.io.Serializable;
22  /***
23   * This class represent a database kind - was a stub
24   * @TODO refactor database.java seeking torque-gen/db-commons
25    * @author <a href="mailto:eflorent@devaki.org">Emmanuel Florent</a>
26   */
27  public class Database implements Serializable
28  {
29      /***
30       * Datatabase name
31       */
32      private String name;
33      /***
34       * Database code
35       */
36      private String code;
37      /***
38       * Database driver
39       */
40      private String driver;
41      /***
42       * Database description
43       */
44      private String description;
45      /***
46       * Initialize
47       * @param pName the name
48       * @param pCode the code
49       * @param pDriver the driver
50       * @param pDescription the description
51       */
52      public Database(
53          final String pName,
54          final String pCode,
55          final String pDriver,
56          final String pDescription)
57      {
58          this.name = pName;
59          this.code = pCode;
60          this.driver = pDriver;
61          this.description = pDescription;
62      }
63      /***
64       * Return the name of the database
65       * @return the namae
66       */
67      public final String toString()
68      {
69          return this.name;
70      }
71      /***
72       * Return the code of the database
73       * @return the code
74       */
75      public final String getCode()
76      {
77          return this.code;
78      }
79      /***
80       * Return the driver of the database
81       * @return the driver
82       */
83      public final String getDriver()
84      {
85          return this.driver;
86      }
87      /***
88       * Return the description of the database
89       * @return the description
90       */
91      public final String getDescription()
92      {
93          return this.description;
94      }
95  }