View Javadoc
1 package org.apache.turbine.util.db.map; 2 3 /* ==================================================================== 4 * The Apache Software License, Version 1.1 5 * 6 * Copyright (c) 2001 The Apache Software Foundation. All rights 7 * reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: 12 * 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 16 * 2. Redistributions in binary form must reproduce the above copyright 17 * notice, this list of conditions and the following disclaimer in 18 * the documentation and/or other materials provided with the 19 * distribution. 20 * 21 * 3. The end-user documentation included with the redistribution, 22 * if any, must include the following acknowledgment: 23 * "This product includes software developed by the 24 * Apache Software Foundation (http://www.apache.org/)." 25 * Alternately, this acknowledgment may appear in the software itself, 26 * if and wherever such third-party acknowledgments normally appear. 27 * 28 * 4. The names "Apache" and "Apache Software Foundation" and 29 * "Apache Turbine" must not be used to endorse or promote products 30 * derived from this software without prior written permission. For 31 * written permission, please contact apache@apache.org. 32 * 33 * 5. Products derived from this software may not be called "Apache", 34 * "Apache Turbine", nor may "Apache" appear in their name, without 35 * prior written permission of the Apache Software Foundation. 36 * 37 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 38 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 39 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 40 * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 41 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 43 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 44 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 45 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 46 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 47 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 48 * SUCH DAMAGE. 49 * ==================================================================== 50 * 51 * This software consists of voluntary contributions made by many 52 * individuals on behalf of the Apache Software Foundation. For more 53 * information on the Apache Software Foundation, please see 54 * <http://www.apache.org/>;. 55 */ 56 57 import java.util.Date; 58 import java.util.Hashtable; 59 import org.apache.torque.map.DatabaseMap; 60 import org.apache.torque.map.MapBuilder; 61 import org.apache.torque.map.TableMap; 62 import org.apache.turbine.services.db.TurbineDB; 63 64 /*** 65 * Default Builder for Database/Table/Column Maps within the Turbine 66 * System. If you decide to use your own table schema, then you 67 * probably will want to implement this class on your own. It is then 68 * defined within the TurbineResources.properties file. 69 * 70 * @author <a href="mailto:john.mcnally@clearink.com">John D. McNally</a> 71 * @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a> 72 * @version $Id: TurbineMapBuilder.java,v 1.4 2002/07/11 16:53:21 mpoeschl Exp $ 73 */ 74 public class TurbineMapBuilder implements MapBuilder 75 { 76 /*** 77 * Get the User table. 78 * 79 * @return A String. 80 */ 81 public String getTableUser() 82 { 83 return "TURBINE_USER"; 84 } 85 86 /*** 87 * Get the UserRole table. 88 * 89 * @return A String. 90 */ 91 public String getTableRole() 92 { 93 return "TURBINE_ROLE"; 94 } 95 96 /*** 97 * Get the Permission table. 98 * 99 * @return A String. 100 */ 101 public String getTablePermission() 102 { 103 return "TURBINE_PERMISSION"; 104 } 105 106 /*** 107 * Get the UserGroupRole table. 108 * 109 * @return A String. 110 */ 111 public String getTableUserGroupRole() 112 { 113 return "TURBINE_USER_GROUP_ROLE"; 114 } 115 116 /*** 117 * Get the RolePermission table. 118 * 119 * @return A String. 120 */ 121 public String getTableRolePermission() 122 { 123 return "TURBINE_ROLE_PERMISSION"; 124 } 125 126 /*** 127 * Get the Group table. 128 * 129 * @return A String. 130 */ 131 public String getTableGroup() 132 { 133 return "TURBINE_GROUP"; 134 } 135 136 /*** 137 * Get the Jobentry table. 138 * 139 * @return A String. 140 */ 141 public String getTableJobentry() 142 { 143 return "TURBINE_SCHEDULED_JOB"; 144 } 145 146 /*** 147 * Internal Unique key to the visitor table. Override this if 148 * using your custom table. 149 * 150 * @return A String. 151 */ 152 public String getUserId() 153 { 154 return "USER_ID"; 155 } 156 157 /*** 158 * Fully qualified Unique key to the visitor table. Shouldn't 159 * need to override this as it uses the above methods. 160 * 161 * @return A String. 162 */ 163 public String getUser_UserId() 164 { 165 return getTableUser() + '.' + getUserId(); 166 } 167 168 /*** 169 * Column used to record the last login time for visitor. 170 * Override this if using your custom table. 171 * 172 * @return A String. 173 */ 174 public String getLastLogin() 175 { 176 return "LAST_LOGIN"; 177 } 178 179 /*** 180 * Fully qualified column used to record the last login time for 181 * visitor. Shouldn't need to override this as it uses the above 182 * methods. 183 * 184 * @return A String. 185 */ 186 public String getUser_LastLogin() 187 { 188 return getTableUser() + '.' + getLastLogin(); 189 } 190 191 /*** 192 * Column used to record the users username. Override this if 193 * using your custom table. 194 * 195 * @return A String. 196 */ 197 public String getUsername() 198 { 199 return "LOGIN_NAME"; 200 } 201 202 /*** 203 * Fully qualified column used to record the visitors username. 204 * Shouldn't need to override this as it uses the above methods. 205 * 206 * @return A String. 207 */ 208 public String getUser_Username() 209 { 210 return getTableUser() + '.' + getUsername(); 211 } 212 213 /*** 214 * Column used to record the users password. Override this if 215 * using your custom table. 216 * 217 * @return A String. 218 */ 219 public String getPassword() 220 { 221 return "PASSWORD_VALUE"; 222 } 223 224 /*** 225 * Fully qualified column used to record the visitors password. 226 * Shouldn't need to override this as it uses the above methods. 227 * 228 * @return A String. 229 */ 230 public String getUser_Password() 231 { 232 return getTableUser() + '.' + getPassword(); 233 } 234 235 /*** 236 * Column used to record general visitor data from a hashmap. 237 * Override this if using your custom table. 238 * 239 * @return A String. 240 */ 241 public String getObjectData() 242 { 243 return "OBJECTDATA"; 244 } 245 246 /*** 247 * Fully qualified column used to record general visitor data from 248 * a hashmap. Shouldn't need to override this as it uses the 249 * above methods. 250 * 251 * @return A String. 252 */ 253 public String getUser_ObjectData() 254 { 255 return getTableUser() + '.' + getObjectData(); 256 } 257 258 /*** 259 * Column used to store the user's first name. 260 * Override this if using your custom table. 261 * 262 * @return A String. 263 */ 264 public String getFirstName() 265 { 266 return "FIRST_NAME"; 267 } 268 269 /*** 270 * Fully qualified column used to store the user's last name. 271 * Shouldn't need to override this as it uses the above methods. 272 * 273 * @return A String. 274 */ 275 public String getUser_FirstName() 276 { 277 return getTableUser() + '.' + getFirstName(); 278 } 279 280 /*** 281 * Column used to store the user's last name. 282 * Override this if using your custom table. 283 * 284 * @return A String. 285 */ 286 public String getLastName() 287 { 288 return "LAST_NAME"; 289 } 290 291 /*** 292 * Fully qualified column used to store the user's last name. 293 * Shouldn't need to override this as it uses the above methods. 294 * 295 * @return A String. 296 */ 297 public String getUser_LastName() 298 { 299 return getTableUser() + '.' + getLastName(); 300 } 301 302 /*** 303 * Column used to store the user's data modification time. 304 * Override this if using your custom table. 305 * 306 * @return A String. 307 */ 308 public String getModified() 309 { 310 return "MODIFIED"; 311 } 312 313 /*** 314 * Fully qualified column used to store the user's data modification time. 315 * Shouldn't need to override this as it uses the above methods. 316 * 317 * @return A String. 318 */ 319 public String getUser_Modified() 320 { 321 return getTableUser() + '.' + getModified(); 322 } 323 324 /*** 325 * Column used to store the user's record cration time. 326 * Override this if using your custom table. 327 * 328 * @return A String. 329 */ 330 public String getCreated() 331 { 332 return "CREATED"; 333 } 334 335 /*** 336 * Fully qualified column used to store the user's record cration time. 337 * Shouldn't need to override this as it uses the above methods. 338 * 339 * @return A String. 340 */ 341 public String getUser_Created() 342 { 343 return getTableUser() + '.' + getCreated(); 344 } 345 346 /*** 347 * Column used to store the user's email. 348 * Override this if using your custom table. 349 * 350 * @return A String. 351 */ 352 public String getEmail() 353 { 354 return "EMAIL"; 355 } 356 357 /*** 358 * Fully qualified column used to store the user's email. 359 * Shouldn't need to override this as it uses the above methods. 360 * 361 * @return A String. 362 */ 363 public String getUser_Email() 364 { 365 return getTableUser() + '.' + getEmail(); 366 } 367 368 /*** 369 * Column used to store the user's confirmation flag. 370 * Override this if using your custom table. 371 * 372 * @return A String. 373 */ 374 public String getConfirmValue() 375 { 376 return "CONFIRM_VALUE"; 377 } 378 379 /*** 380 * Fully qualified column used to store the user's confirmation flag. 381 * Shouldn't need to override this as it uses the above methods. 382 * 383 * @return A String. 384 */ 385 public String getUser_ConfirmValue() 386 { 387 return getTableUser() + '.' + getConfirmValue(); 388 } 389 390 391 /*** 392 * Column used for the unique id to a Role. Override this if 393 * using your custom table 394 * 395 * @return A String. 396 */ 397 public String getRoleId() 398 { 399 return "ROLE_ID"; 400 } 401 402 /*** 403 * Fully qualified column name for Role unique key. Shouldn't 404 * need to override this as it uses the above methods. 405 * 406 * @return A String. 407 */ 408 public String getRole_RoleId() 409 { 410 return getTableRole() + '.' + getRoleId(); 411 } 412 413 /*** 414 * Column used for the name of Role. Override this if using 415 * your custom table. 416 * 417 * @return A String. 418 */ 419 public String getRoleName() 420 { 421 return "ROLE_NAME"; 422 } 423 424 /*** 425 * Fully qualified column name for Role name. Shouldn't need 426 * to override this as it uses the above methods. 427 * 428 * @return A String. 429 */ 430 public String getRole_Name() 431 { 432 return getTableRole() + '.' + getRoleName(); 433 } 434 435 /*** 436 * Fully qualified column name for ObjectData column. Shouldn't need 437 * to override this as it uses the above methods. 438 * 439 * @return A String. 440 */ 441 public String getRole_ObjectData() 442 { 443 return getTableRole() + '.' + getObjectData(); 444 } 445 446 /*** 447 * Column used for the id of the Permission table. Override this 448 * if using your custom table. 449 * 450 * @return A String. 451 */ 452 public String getPermissionId() 453 { 454 return "PERMISSION_ID"; 455 } 456 /*** 457 * Fully qualified column name for Permission table unique key. 458 * Shouldn't need to override this as it uses the above methods. 459 * 460 * @return A String. 461 */ 462 public String getPermission_PermissionId() 463 { 464 return getTablePermission() + '.' + getPermissionId(); 465 } 466 467 /*** 468 * Column used for the name of a Permission. Override this if 469 * using your custom table. 470 * 471 * @return A String. 472 */ 473 public String getPermissionName() 474 { 475 return "PERMISSION_NAME"; 476 } 477 478 /*** 479 * Fully qualified column name for Permission table name of the 480 * permission. Shouldn't need to override this as it uses the 481 * above methods. 482 * 483 * @return A String. 484 */ 485 public String getPermission_Name() 486 { 487 return getTablePermission() + '.' + getPermissionName(); 488 } 489 490 /*** 491 * Fully qualified column name for ObjectData column. Shouldn't need 492 * to override this as it uses the above methods. 493 * 494 * @return A String. 495 */ 496 public String getPermission_ObjectData() 497 { 498 return getTablePermission() + '.' + getObjectData(); 499 } 500 501 /*** 502 * Fully qualified column name for UserGroupRole visitor id. 503 * Shouldn't need to override this as it uses the above methods. 504 * 505 * @return A String. 506 */ 507 public String getUserGroupRole_UserId() 508 { 509 return getTableUserGroupRole() + '.' + getUserId(); 510 } 511 512 /*** 513 * Fully qualified column name for UserGroupRole group id. Shouldn't 514 * need to override this as it uses the above methods. 515 * 516 * @return A String. 517 */ 518 public String getUserGroupRole_GroupId() 519 { 520 return getTableUserGroupRole() + '.' + getGroupId(); 521 } 522 523 /*** 524 * Fully qualified column name for UserGroupRole role id. Shouldn't 525 * need to override this as it uses the above methods. 526 * 527 * @return A String. 528 */ 529 public String getUserGroupRole_RoleId() 530 { 531 return getTableUserGroupRole() + '.' + getRoleId(); 532 } 533 534 /*** 535 * Fully qualified column name for RolePermission permission id. 536 * Shouldn't need to override this as it uses the above methods. 537 * 538 * @return A String. 539 */ 540 public String getRolePermission_PermissionId() 541 { 542 return getTableRolePermission() + '.' + getPermissionId(); 543 } 544 545 /*** 546 * Fully qualified column name for RolePermission role id. 547 * Shouldn't need to override this as it uses the above methods. 548 * 549 * @return A String. 550 */ 551 public String getRolePermission_RoleId() 552 { 553 return getTableRolePermission() + '.' + getRoleId(); 554 } 555 556 /*** 557 * Column used for the id of the Group table. Override this 558 * if using your custom table. 559 * 560 * @return A String. 561 */ 562 public String getGroupId() 563 { 564 return "GROUP_ID"; 565 } 566 567 /*** 568 * Fully qualified column name for Group id. Shouldn't 569 * need to override this as it uses the above methods. 570 * 571 * @return A String. 572 */ 573 public String getGroup_GroupId() 574 { 575 return getTableGroup() + '.' + getGroupId(); 576 } 577 578 /*** 579 * Column used for the name of a Group. Override this if using 580 * your custom table. 581 * 582 * @return A String. 583 */ 584 public String getGroupName() 585 { 586 return "GROUP_NAME"; 587 } 588 589 /*** 590 * Fully qualified column name for Group name. Shouldn't 591 * need to override this as it uses the above methods. 592 * 593 * @return A String. 594 */ 595 public String getGroup_Name() 596 { 597 return getTableGroup() + '.' + getGroupName(); 598 } 599 600 /*** 601 * Fully qualified column name for ObjectData column. Shouldn't need 602 * to override this as it uses the above methods. 603 * 604 * @return A String. 605 */ 606 public String getGroup_ObjectData() 607 { 608 return getTableGroup() + '.' + getObjectData(); 609 } 610 611 /*** 612 * Column used for the id of Jobentry. Override this if using 613 * your custom table. 614 * 615 * @return A String. 616 */ 617 public String getJobId() 618 { 619 return "JOB_ID"; 620 } 621 622 /*** 623 * Fully qualified column name for Jobentry id. Shouldn't 624 * need to override this as it uses the above methods. 625 * 626 * @return A String. 627 */ 628 public String getJobentry_JobId() 629 { 630 return getTableJobentry() + '.' + getJobId(); 631 } 632 633 /*** 634 * Column used for the second when the job should be run. 635 * Override this if using your custom table. 636 * 637 * @return A String. 638 */ 639 public String getSecond() 640 { 641 return "SECOND"; 642 } 643 644 /*** 645 * Fully qualified column name for second column. Shouldn't 646 * need to override this as it uses the above methods. 647 * 648 * @return A String. 649 */ 650 public String getJobentry_Second() 651 { 652 return getTableJobentry() + '.' + getSecond(); 653 } 654 655 /*** 656 * Column used for the minute when the job should be run. 657 * Override this if using your custom table. 658 * 659 * @return A String. 660 */ 661 public String getMinute() 662 { 663 return "MINUTE"; 664 } 665 666 /*** 667 * Fully qualified column name for minute column. Shouldn't 668 * need to override this as it uses the above methods. 669 * 670 * @return A String. 671 */ 672 public String getJobentry_Minute() 673 { 674 return getTableJobentry() + '.' + getMinute(); 675 } 676 677 /*** 678 * Column used for the hour when the job should be run. 679 * Override this if using your custom table. 680 * 681 * @return A String. 682 */ 683 public String getHour() 684 { 685 return "HOUR"; 686 } 687 688 /*** 689 * Fully qualified column name for hour column. Shouldn't 690 * need to override this as it uses the above methods. 691 * 692 * @return A String. 693 */ 694 public String getJobentry_Hour() 695 { 696 return getTableJobentry() + '.' + getHour(); 697 } 698 699 /*** 700 * Column used for the weekday when the job should be run. 701 * Override this if using your custom table. 702 * 703 * @return A String. 704 */ 705 public String getWeekday() 706 { 707 return "WEEK_DAY"; 708 } 709 710 /*** 711 * Fully qualified column name for weekday column. Shouldn't 712 * need to override this as it uses the above methods. 713 * 714 * @return A String. 715 */ 716 public String getJobentry_Weekday() 717 { 718 return getTableJobentry() + '.' + getWeekday(); 719 } 720 721 /*** 722 * Column used for the day of month when the job should be run. 723 * Override this if using your custom table. 724 * 725 * @return A String. 726 */ 727 public String getDayOfMonth() 728 { 729 return "DAY_OF_MONTH"; 730 } 731 732 /*** 733 * Fully qualified column name for day of month column. Shouldn't 734 * need to override this as it uses the above methods. 735 * 736 * @return A String. 737 */ 738 public String getJobentry_DayOfMonth() 739 { 740 return getTableJobentry() + '.' + getDayOfMonth(); 741 } 742 743 /*** 744 * Column used for the name of the class that should be run. 745 * Override this if using your custom table. 746 * 747 * @return A String. 748 */ 749 public String getTask() 750 { 751 return "TASK"; 752 } 753 754 /*** 755 * Fully qualified column name for task column. Shouldn't 756 * need to override this as it uses the above methods. 757 * 758 * @return A String. 759 */ 760 public String getJobentry_Task() 761 { 762 return getTableJobentry() + '.' + getTask(); 763 } 764 765 /*** 766 * Fully qualified column name for email column. Shouldn't 767 * need to override this as it uses the above methods. 768 * 769 * @return A String. 770 */ 771 public String getJobentry_Email() 772 { 773 return getTableJobentry() + '.' + getEmail(); 774 } 775 776 /*** 777 * Column used to store the job schedule property. 778 * Override this if using your custom table. 779 * 780 * @return A String. 781 */ 782 public String getProperty() 783 { 784 return "PROPERTY"; 785 } 786 787 /*** 788 * Fully qualified column name for property column. Shouldn't 789 * need to override this as it uses the above methods. 790 * 791 * @return A String. 792 */ 793 public String getJobentry_Property() 794 { 795 return getTableJobentry() + '.' + getProperty(); 796 } 797 798 /*** 799 * GROUP_SEQUENCE. 800 * 801 * @return A String. 802 */ 803 public String getSequenceGroup() 804 { 805 return "GROUP_SEQUENCE"; 806 } 807 808 /*** 809 * PERMISSION_SEQUENCE. 810 * 811 * @return A String. 812 */ 813 public String getSequencePermission() 814 { 815 return "PERMISSION_SEQUENCE"; 816 } 817 818 /*** 819 * ROLE_SEQUENCE. 820 * 821 * @return A String. 822 */ 823 public String getSequenceRole() 824 { 825 return "ROLE_SEQUENCE"; 826 } 827 828 /*** 829 * USER_SEQUENCE. 830 * 831 * @return A String. 832 */ 833 public String getSequenceUser() 834 { 835 return "USER_SEQUENCE"; 836 } 837 838 /*** The database map. */ 839 protected DatabaseMap dbMap = null; 840 841 /*** 842 * Tells us if this DatabaseMapBuilder is built so that we don't 843 * have to re-build it every time. 844 * 845 * @return True if DatabaseMapBuilder is built. 846 */ 847 public boolean isBuilt() 848 { 849 return (dbMap != null); 850 } 851 852 /*** 853 * Gets the databasemap this map builder built. 854 * 855 * @return A DatabaseMap. 856 */ 857 public DatabaseMap getDatabaseMap() 858 { 859 return this.dbMap; 860 } 861 862 /*** 863 * Build up the databasemapping. It should probably be modified 864 * to read a .xml file representation of the database to build 865 * this. 866 * 867 * @exception Exception, a generic exception. 868 */ 869 public void doBuild() 870 throws Exception 871 { 872 // Reusable TableMap 873 TableMap tMap; 874 875 // Make some objects. 876 String string = new String(""); 877 Integer integer = new Integer(0); 878 java.util.Date date = new Date(); 879 880 // Get default map. 881 dbMap = TurbineDB.getDatabaseMap(); 882 883 // Add tables. 884 dbMap.addTable(getTableUser()); 885 dbMap.addTable(getTableGroup()); 886 dbMap.addTable(getTableRole()); 887 dbMap.addTable(getTablePermission()); 888 dbMap.addTable(getTableUserGroupRole()); 889 dbMap.addTable(getTableRolePermission()); 890 dbMap.addTable(getTableJobentry()); 891 892 // Add User columns. 893 tMap = dbMap.getTable(getTableUser()); 894 tMap.setPrimaryKeyMethod(TableMap.ID_BROKER); 895 tMap.setPrimaryKeyMethodInfo(tMap.getName()); 896 tMap.addPrimaryKey(getUserId(), integer); 897 tMap.addColumn(getUsername(), string); 898 tMap.addColumn(getPassword(), string); 899 tMap.addColumn(getFirstName(), string); 900 tMap.addColumn(getLastName(), string); 901 tMap.addColumn(getEmail(), string); 902 tMap.addColumn(getConfirmValue(), string); 903 tMap.addColumn(getCreated(), date); 904 tMap.addColumn(getModified(), date); 905 tMap.addColumn(getLastLogin(), date); 906 tMap.addColumn(getObjectData(), new Hashtable(1)); 907 908 // Add Group columns. 909 tMap = dbMap.getTable(getTableGroup()); 910 tMap.setPrimaryKeyMethod(TableMap.ID_BROKER); 911 tMap.setPrimaryKeyMethodInfo(tMap.getName()); 912 tMap.addPrimaryKey(getGroupId(), integer); 913 tMap.addColumn(getGroupName(), string); 914 tMap.addColumn(getObjectData(), new Hashtable(1)); 915 916 // Add Role columns. 917 tMap = dbMap.getTable(getTableRole()); 918 tMap.setPrimaryKeyMethod(TableMap.ID_BROKER); 919 tMap.setPrimaryKeyMethodInfo(tMap.getName()); 920 tMap.addPrimaryKey(getRoleId(), integer); 921 tMap.addColumn(getRoleName(), string); 922 tMap.addColumn(getObjectData(), new Hashtable(1)); 923 924 // Add Permission columns. 925 tMap = dbMap.getTable(getTablePermission()); 926 tMap.setPrimaryKeyMethod(TableMap.ID_BROKER); 927 tMap.setPrimaryKeyMethodInfo(tMap.getName()); 928 tMap.addPrimaryKey(getPermissionId(), integer); 929 tMap.addColumn(getPermissionName(), string); 930 tMap.addColumn(getObjectData(), new Hashtable(1)); 931 932 // Add RolePermission columns. 933 tMap = dbMap.getTable(getTableRolePermission()); 934 tMap.addForeignPrimaryKey(getPermissionId(), 935 integer, 936 getTablePermission(), 937 getPermissionId()); 938 tMap.addForeignPrimaryKey(getRoleId(), 939 integer, 940 getTableRole(), 941 getRoleId()); 942 943 // Add UserGroupRole columns. 944 tMap = dbMap.getTable(getTableUserGroupRole()); 945 tMap.addForeignPrimaryKey(getUserId(), 946 integer, 947 getTableUser(), 948 getUserId()); 949 tMap.addForeignPrimaryKey(getGroupId(), 950 integer, 951 getTableGroup(), 952 getGroupId()); 953 tMap.addForeignPrimaryKey(getRoleId(), 954 integer, 955 getTableRole(), 956 getRoleId()); 957 958 // Add Jobentry columns. 959 tMap = dbMap.getTable(getTableJobentry()); 960 tMap.setPrimaryKeyMethod(TableMap.ID_BROKER); 961 tMap.setPrimaryKeyMethodInfo(tMap.getName()); 962 tMap.addPrimaryKey(getJobId(), integer); 963 tMap.addColumn(getSecond(), integer); 964 tMap.addColumn(getMinute(), integer); 965 tMap.addColumn(getHour(), integer); 966 tMap.addColumn(getWeekday(), integer); 967 tMap.addColumn(getDayOfMonth(), integer); 968 tMap.addColumn(getTask(), string); 969 tMap.addColumn(getEmail(), string); 970 tMap.addColumn(getProperty(), new Hashtable(89)); 971 } 972 }

This page was automatically generated by Maven