KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > webdocwf > util > loader > generator > RelationshipsAttributes


1
2 /*
3 LoaderGenerator - tool for generated xml, sql and doml file needed for Octopus.
4
5
6     Copyright (C) 2003 Together
7
8     This library is free software; you can redistribute it and/or
9     modify it under the terms of the GNU Lesser General Public
10     License as published by the Free Software Foundation; either
11     version 2.1 of the License, or (at your option) any later version.
12
13     This library is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16     Lesser General Public License for more details.
17
18     You should have received a copy of the GNU Lesser General Public
19     License along with this library; if not, write to the Free Software
20     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */

22
23 package org.webdocwf.util.loader.generator;
24
25
26 /**
27  *
28  * RelationshipsAttributes class stores the value of table relationships parameters,
29  * such as primary keys, indexes, foreign key, and table names.
30  * @author Radoslav Dutina
31  * @version 1.0
32  */

33 public class RelationshipsAttributes {
34
35   private static String JavaDoc tableName;
36   private static String JavaDoc[] primaryKeys={"This table has no primary keys!"};
37   private static String JavaDoc[] indexVariables={"This table has no indexes keys!"};
38   private static String JavaDoc[] foreignVariables={"This table has no foreign keys!"};
39
40
41   /**
42    * This method sets the value of tableName parameter.
43    * @param table_Name is the value of parameter.
44    */

45   public static void setTableName(String JavaDoc table_Name){
46     tableName=table_Name;
47   }
48
49   /**
50    * This method read the value of tableName parameter.
51    * @return value of parameter.
52    */

53   public static String JavaDoc getTableName(){
54     return tableName;
55   }
56
57   /**
58    * This method sets the value of primaryKeys parameter.
59    * @param primary_Keys is the value of parameter.
60    */

61   public static void setPrimaryKeys(String JavaDoc[] primary_Keys){
62     primaryKeys=primary_Keys;
63   }
64
65   /**
66    * This method read the value of primaryKeys parameter.
67    * @return value of parameter.
68    */

69   public static String JavaDoc[] getPrimaryKeys(){
70     return primaryKeys;
71   }
72
73   /**
74    * This method sets the value of indexVariables parameter.
75    * @param index_Variables is the value of parameter.
76    */

77   public static void setIndexVariables(String JavaDoc[] index_Variables){
78     indexVariables=index_Variables;
79   }
80
81   /**
82    * This method read the value of indexVariables parameter.
83    * @return value of parameter.
84    */

85   public static String JavaDoc[] getIndexVariables(){
86     return indexVariables;
87   }
88
89   /**
90    * This method sets the value of foreignVariables parameter.
91    * @param foreign_Variables is the value of parameter.
92    */

93   public static void setForeignVariables(String JavaDoc[] foreign_Variables){
94    
95     foreignVariables=foreign_Variables;
96   }
97
98   /**
99    * This method read the value of foreignVariables parameter.
100    * @return value of parameter.
101    */

102   public static String JavaDoc[] getForeignVariables(){
103     return foreignVariables;
104   }
105
106   /**
107    *This method reset all parameters.
108    */

109   public static void resetAllVariables(){
110     tableName="";
111     primaryKeys=null;
112     indexVariables=null;
113     foreignVariables=null;
114
115   }
116
117 }
Popular Tags