001: /*
002: LoaderGenerator - tool for generated xml, sql and doml file needed for Octopus.
003:
004:
005: Copyright (C) 2003 Together
006:
007: This library is free software; you can redistribute it and/or
008: modify it under the terms of the GNU Lesser General Public
009: License as published by the Free Software Foundation; either
010: version 2.1 of the License, or (at your option) any later version.
011:
012: This library is distributed in the hope that it will be useful,
013: but WITHOUT ANY WARRANTY; without even the implied warranty of
014: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: Lesser General Public License for more details.
016:
017: You should have received a copy of the GNU Lesser General Public
018: License along with this library; if not, write to the Free Software
019: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020: */
021:
022: package org.webdocwf.util.loader.generator;
023:
024: /**
025: *
026: * RelationshipsAttributes class stores the value of table relationships parameters,
027: * such as primary keys, indexes, foreign key, and table names.
028: * @author Radoslav Dutina
029: * @version 1.0
030: */
031: public class RelationshipsAttributes {
032:
033: private static String tableName;
034: private static String[] primaryKeys = { "This table has no primary keys!" };
035: private static String[] indexVariables = { "This table has no indexes keys!" };
036: private static String[] foreignVariables = { "This table has no foreign keys!" };
037:
038: /**
039: * This method sets the value of tableName parameter.
040: * @param table_Name is the value of parameter.
041: */
042: public static void setTableName(String table_Name) {
043: tableName = table_Name;
044: }
045:
046: /**
047: * This method read the value of tableName parameter.
048: * @return value of parameter.
049: */
050: public static String getTableName() {
051: return tableName;
052: }
053:
054: /**
055: * This method sets the value of primaryKeys parameter.
056: * @param primary_Keys is the value of parameter.
057: */
058: public static void setPrimaryKeys(String[] primary_Keys) {
059: primaryKeys = primary_Keys;
060: }
061:
062: /**
063: * This method read the value of primaryKeys parameter.
064: * @return value of parameter.
065: */
066: public static String[] getPrimaryKeys() {
067: return primaryKeys;
068: }
069:
070: /**
071: * This method sets the value of indexVariables parameter.
072: * @param index_Variables is the value of parameter.
073: */
074: public static void setIndexVariables(String[] index_Variables) {
075: indexVariables = index_Variables;
076: }
077:
078: /**
079: * This method read the value of indexVariables parameter.
080: * @return value of parameter.
081: */
082: public static String[] getIndexVariables() {
083: return indexVariables;
084: }
085:
086: /**
087: * This method sets the value of foreignVariables parameter.
088: * @param foreign_Variables is the value of parameter.
089: */
090: public static void setForeignVariables(String[] foreign_Variables) {
091:
092: foreignVariables = foreign_Variables;
093: }
094:
095: /**
096: * This method read the value of foreignVariables parameter.
097: * @return value of parameter.
098: */
099: public static String[] getForeignVariables() {
100: return foreignVariables;
101: }
102:
103: /**
104: *This method reset all parameters.
105: */
106: public static void resetAllVariables() {
107: tableName = "";
108: primaryKeys = null;
109: indexVariables = null;
110: foreignVariables = null;
111:
112: }
113:
114: }
|