1 23 24 31 package org.enhydra.dods.trans; 32 33 36 public class Column { 37 38 41 protected String name = null; 42 43 46 protected boolean is_reference = DefaultTagValues.COLUMN_IS_REFERENCE; 47 48 51 protected String ref_name = null; 52 53 56 protected boolean ref_constarint = DefaultTagValues.COLUMN_REF_CONSTARINT; 57 58 61 protected boolean ref_is_abstarct = DefaultTagValues.COLUMN_REF_IS_ABSTARCT; 62 63 66 protected boolean ref_is_foreign_key = DefaultTagValues.COLUMN_REF_IS_FOREIGN_KEY; 67 68 71 protected String ref_package = null; 72 73 76 protected String ref_foreign_key_column_name = null; 77 78 81 protected String ref_foreign_key_group = null; 82 83 86 protected boolean is_constant = DefaultTagValues.COLUMN_IS_CONSTANT; 87 88 91 protected String javadoc = null; 92 93 96 protected String db_type = DefaultTagValues.COLUMN_DB_TYPE; 97 98 101 protected String java_type = DefaultTagValues.COLUMN_JAVA_TYPE; 102 103 106 protected String java_default_value = null; 107 108 111 protected boolean used_for_query = DefaultTagValues.COLUMN_USED_FOR_QUERY; 112 113 116 protected boolean can_be_null = DefaultTagValues.COLUMN_CAN_BE_NULL; 117 118 121 protected boolean is_primary_key = DefaultTagValues.COLUMN_IS_PRIMARY_KEY; 122 123 126 protected String size = null; 127 128 131 protected boolean is_array = DefaultTagValues.COLUMN_IS_ARRAY; 132 133 136 protected boolean is_secure = DefaultTagValues.COLUMN_SECURITY; 137 138 141 protected boolean is_insecure = DefaultTagValues.COLUMN_NON_SECURITY; 142 public Column(boolean genSecure, boolean genInsecure) { 143 is_secure = genSecure; 144 is_insecure = genInsecure; 145 } 146 147 public Column() {} 148 149 155 public String name() { 156 return name; 157 } 158 159 164 public boolean isReference() { 165 return is_reference; 166 } 167 168 173 public String refName() { 174 return ref_name; 175 } 176 177 181 public boolean refConstarint() { 182 return ref_constarint; 183 } 184 185 190 public boolean refIsAbstarct() { 191 return ref_is_abstarct; 192 } 193 194 199 public boolean refIsForeignKey() { 200 return ref_is_foreign_key; 201 } 202 203 208 public String refPackage() { 209 return ref_package; 210 } 211 212 217 public String refForeignKeyColumnName() { 218 return ref_foreign_key_column_name; 219 } 220 221 226 public String refForeignKeyGroup() { 227 return ref_foreign_key_group; 228 } 229 230 235 public boolean isConstant() { 236 return is_constant; 237 } 238 239 244 public String javadoc() { 245 return javadoc; 246 } 247 248 253 public String dbType() { 254 return db_type; 255 } 256 257 262 public String javaType() { 263 return java_type; 264 } 265 266 271 public String javaDefaultValue() { 272 return java_default_value; 273 } 274 275 280 public boolean usedForQuery() { 281 return used_for_query; 282 } 283 284 289 public boolean canBeNull() { 290 return can_be_null; 291 } 292 293 298 public boolean isPrimaryKey() { 299 return is_primary_key; 300 } 301 302 307 public String size() { 308 return size; 309 } 310 311 316 public boolean isArray() { 317 return is_array; 318 } 319 320 325 public boolean isSecure() { 326 return is_secure; 327 } 328 329 334 public boolean isInSecure() { 335 return is_insecure; 336 } 337 338 344 public void name(String name) { 345 this.name = name; 346 } 347 348 352 public void refName(String ref_name) { 353 this.ref_name = ref_name; 354 this.is_reference = true; 355 } 356 357 362 public void refConstarint(boolean ref_constarint) { 363 this.ref_constarint = ref_constarint; 364 } 365 366 371 public void refIsAbstarct(boolean ref_is_abstarct) { 372 this.ref_is_abstarct = ref_is_abstarct; 373 } 374 375 380 public void refIsForeignKey(boolean ref_is_foreign_key) { 381 this.ref_is_foreign_key = ref_is_foreign_key; 382 } 383 384 389 public void refPackage(String ref_package) { 390 this.ref_package = ref_package; 391 } 392 393 398 public void refForeignKeyColumnName(String ref_foreign_key_column_name) { 399 this.ref_foreign_key_column_name = ref_foreign_key_column_name; 400 } 401 402 407 public void refForeignKeyGroup(String ref_foreign_key_group) { 408 this.ref_foreign_key_group = ref_foreign_key_group; 409 } 410 411 416 public void isConstant(boolean is_constant) { 417 this.is_constant = is_constant; 418 } 419 420 425 public void javadoc(String javadoc) { 426 this.javadoc = javadoc; 427 } 428 429 434 public void dbType(String db_type) { 435 this.db_type = db_type; 436 } 437 438 443 public void javaType(String java_type) { 444 this.java_type = java_type; 445 } 446 447 452 public void javaDefaultValue(String java_default_value) { 453 this.java_default_value = java_default_value; 454 } 455 456 461 public void usedForQuery(boolean used_for_query) { 462 this.used_for_query = used_for_query; 463 } 464 465 470 public void canBeNull(boolean can_be_null) { 471 this.can_be_null = can_be_null; 472 } 473 474 479 public void isPrimaryKey(boolean is_primary_key) { 480 this.is_primary_key = is_primary_key; 481 } 482 483 488 public void size(String size) { 489 this.size = size; 490 } 491 492 497 public void isArray(boolean is_array) { 498 this.is_array = is_array; 499 } 500 501 506 public void isSecure(boolean is_secure) { 507 this.is_secure = is_secure; 508 } 509 510 515 public void isInSecure(boolean is_Insecure) { 516 this.is_insecure = is_Insecure; 517 } 518 519 524 public String toString() { 525 StringBuffer ret = new StringBuffer ("name=").append(name).append(" is_reference=").append(is_reference).append(" ref_name=").append(ref_name); 526 527 ret.append(" ref_constarint=").append(ref_constarint).append(" ref_is_abstarct=").append(ref_is_abstarct); 528 ret.append(" ref_is_foreign_key=").append(ref_is_foreign_key).append(" ref_package=").append(ref_package); 529 ret.append(" ref_foreign_key_column_name=").append(ref_foreign_key_column_name).append(" ref_foreign_key_group=").append(ref_foreign_key_group); 530 ret.append(" is_constant=").append(is_constant).append(" javadoc=").append(javadoc); 531 ret.append(" db_type=").append(db_type).append(" java_type=").append(java_type); 532 ret.append(" java_default_value=").append(java_default_value).append(" used_for_query=").append(used_for_query); 533 ret.append(" can_be_null=").append(can_be_null).append(" is_primary_key=").append(is_primary_key); 534 ret.append(" size=").append(size).append(" is_array=").append(is_array); 535 return ret.toString(); 536 } 537 538 public static void main(String [] args) { 539 Column column = new Column(); 540 541 System.out.println("Column: \n" + column); 542 } 543 } 544 | Popular Tags |