View Javadoc
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 import org.webdocwf.util.loader.logging.Logger; 28 import org.webdocwf.util.loader.logging.StandardLogger; 29 30 /*** 31 * 32 * SqlTagAttributes class stores the parameters of sqlTag tag for LoaderJob.xml file. 33 * @author Radoslav Dutina 34 * @version 1.0 35 */ 36 public class SqlTagAttributes { 37 38 private String name = "CreateTables"; 39 private String logMode = "normal"; 40 private String onErrorContinue = "false"; 41 private String commit = "true"; 42 private String href = "sql/CreateTables.sql"; 43 private String parse = "text"; 44 private Logger logger; 45 46 /*** 47 * Construct object SqlTagAttributes with an associated parameter. 48 * @param sqlFileType represents the sql files wich will be created. 49 * sqlFileType=0, created file is CreateTables.sql 50 * sqlFileType=1, created file is CreateIndex.sql 51 * sqlFileType=2, created file is CreatePrimary.sql 52 * sqlFileType=3, created file is CreateIntegrity.sql 53 * sqlFileType=4, created file is DropTables.sql 54 * sqlFileType=5, created file is DropIntegrity.sql 55 */ 56 public SqlTagAttributes(int sqlFileType) { 57 setLogger(); 58 this.logger.write("full", "SqlTagAttributes is started."); 59 if (sqlFileType == 0) { 60 this.name = "DropIntegrity"; 61 this.logMode = "normal"; 62 this.onErrorContinue = "true"; 63 this.commit = "true"; 64 this.href = "sql/DropIntegrity.sql"; 65 this.parse = "text"; 66 } 67 if (sqlFileType == 1) { 68 this.name = "DropTables"; 69 this.logMode = "normal"; 70 this.onErrorContinue = "true"; 71 this.commit = "true"; 72 this.href = "sql/DropTables.sql"; 73 this.parse = "text"; 74 } 75 76 if (sqlFileType == 2) { 77 this.name = "CreateTables"; 78 this.logMode = "normal"; 79 this.onErrorContinue = "false"; 80 this.commit = "true"; 81 this.href = "sql/CreateTables.sql"; 82 this.parse = "text"; 83 } 84 85 if (sqlFileType == 3) { 86 this.name = "CreateIndexes"; 87 this.logMode = "normal"; 88 this.onErrorContinue = "false"; 89 this.commit = "true"; 90 this.href = "sql/CreateIndex.sql"; 91 this.parse = "text"; 92 } 93 94 if (sqlFileType == 4) { 95 this.name = "CreatePrimary"; 96 this.logMode = "normal"; 97 this.onErrorContinue = "false"; 98 this.commit = "true"; 99 this.href = "sql/CreatePrimary.sql"; 100 this.parse = "text"; 101 } 102 103 if (sqlFileType == 5) { 104 this.name = "CreateForeigin"; 105 this.logMode = "normal"; 106 this.onErrorContinue = "false"; 107 this.commit = "true"; 108 this.href = "sql/CreateIntegrity.sql"; 109 this.parse = "text"; 110 } 111 this.logger.write("full", "SqlTagAttributes is finished."); 112 113 } 114 115 /*** 116 * This method sets value of name parameter. 117 * @param _name is value of parameter. 118 */ 119 public void setName(String _name) { 120 name = _name; 121 } 122 123 /*** 124 * This method read value of name parameter. 125 * @return value of parameter. 126 */ 127 public String getName() { 128 return name; 129 } 130 131 /*** 132 * This method sets value of logMode parameter. 133 * @param log_Mode is value of parameter. 134 */ 135 public void setLogMode(String log_Mode) { 136 logMode = log_Mode; 137 } 138 139 /*** 140 * This method read value of logMode parameter. 141 * @return value of parameter. 142 */ 143 public String getLogMode() { 144 return logMode; 145 } 146 147 /*** 148 * This method sets value of onErrorContinue parameter. 149 * @param on_Error_Continue is value of parameter. 150 */ 151 public void setOnErrorContinue(String on_Error_Continue) { 152 onErrorContinue = on_Error_Continue; 153 } 154 155 /*** 156 * This method read value of onErrorContinue parameter. 157 * @return value of parameter. 158 */ 159 public String getOnErrorContinue() { 160 return onErrorContinue; 161 } 162 163 /*** 164 * This method sets value of commit parameter. 165 * @param _Commit is value of parameter. 166 */ 167 public void setCommit(String _Commit) { 168 commit = _Commit; 169 } 170 171 /*** 172 * This method read value of commit parameter. 173 * @return value of parameter. 174 */ 175 public String getCommit() { 176 return commit; 177 } 178 179 /*** 180 * This method sets value of href parameter. 181 * @param _href is value of parameter. 182 */ 183 public void setHref(String _href) { 184 href = _href; 185 } 186 187 /*** 188 * This method read value of href parameter. 189 * @return value of parameter. 190 */ 191 public String getHref() { 192 return href; 193 } 194 195 /*** 196 * This method sets value of parse parameter. 197 * @param _parse is value of parameter. 198 */ 199 public void setParse(String _parse) { 200 parse = _parse; 201 } 202 203 /*** 204 * This method read value of parse parameter. 205 * @return value of parameter. 206 */ 207 public String getParse() { 208 return parse; 209 } 210 /*** 211 * This method will set logger object 212 * @param logger 213 */ 214 private void setLogger() { 215 this.logger = StandardLogger.getCentralLogger(); 216 } 217 }

This page was automatically generated by Maven