1 2 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 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 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 119 public void setName(String _name) { 120 name = _name; 121 } 122 123 127 public String getName() { 128 return name; 129 } 130 131 135 public void setLogMode(String log_Mode) { 136 logMode = log_Mode; 137 } 138 139 143 public String getLogMode() { 144 return logMode; 145 } 146 147 151 public void setOnErrorContinue(String on_Error_Continue) { 152 onErrorContinue = on_Error_Continue; 153 } 154 155 159 public String getOnErrorContinue() { 160 return onErrorContinue; 161 } 162 163 167 public void setCommit(String _Commit) { 168 commit = _Commit; 169 } 170 171 175 public String getCommit() { 176 return commit; 177 } 178 179 183 public void setHref(String _href) { 184 href = _href; 185 } 186 187 191 public String getHref() { 192 return href; 193 } 194 195 199 public void setParse(String _parse) { 200 parse = _parse; 201 } 202 203 207 public String getParse() { 208 return parse; 209 } 210 214 private void setLogger() { 215 this.logger = StandardLogger.getCentralLogger(); 216 } 217 } | Popular Tags |