1 package org.tigris.scarab.om; 2 3 4 import java.math.BigDecimal ; 5 import java.sql.Connection ; 6 import java.util.ArrayList ; 7 import java.util.Collections ; 8 import java.util.Date ; 9 import java.util.List ; 10 11 import org.apache.commons.lang.ObjectUtils; 12 import org.apache.fulcrum.intake.Retrievable; 13 import org.apache.torque.TorqueException; 14 import org.apache.torque.om.BaseObject; 15 import org.apache.torque.om.ComboKey; 16 import org.apache.torque.om.DateKey; 17 import org.apache.torque.om.NumberKey; 18 import org.apache.torque.om.ObjectKey; 19 import org.apache.torque.om.SimpleKey; 20 import org.apache.torque.om.StringKey; 21 import org.apache.torque.om.Persistent; 22 import org.apache.torque.util.Criteria; 23 import org.apache.torque.util.Transaction; 24 25 26 27 31 public abstract class BaseIssueType extends BaseObject 32 implements org.apache.fulcrum.intake.Retrievable 33 { 34 35 private static final IssueTypePeer peer = 36 new IssueTypePeer(); 37 38 39 40 private Integer issueTypeId; 41 42 43 private String name; 44 45 46 private String description; 47 48 49 private Integer parentId; 50 51 52 private boolean dedupe = true; 53 54 55 private boolean deleted = false; 56 57 58 private boolean locked = false; 59 60 61 private boolean isdefault = false; 62 63 64 69 public Integer getIssueTypeId() 70 { 71 return issueTypeId; 72 } 73 74 75 80 public void setIssueTypeId(Integer v) throws TorqueException 81 { 82 83 if (!ObjectUtils.equals(this.issueTypeId, v)) 84 { 85 this.issueTypeId = v; 86 setModified(true); 87 } 88 89 90 91 if (collAttributeGroups != null) 93 { 94 for (int i = 0; i < collAttributeGroups.size(); i++) 95 { 96 ((AttributeGroup) collAttributeGroups.get(i)) 97 .setIssueTypeId(v); 98 } 99 } 100 101 if (collIssues != null) 103 { 104 for (int i = 0; i < collIssues.size(); i++) 105 { 106 ((Issue) collIssues.get(i)) 107 .setTypeId(v); 108 } 109 } 110 111 if (collRModuleIssueTypes != null) 113 { 114 for (int i = 0; i < collRModuleIssueTypes.size(); i++) 115 { 116 ((RModuleIssueType) collRModuleIssueTypes.get(i)) 117 .setIssueTypeId(v); 118 } 119 } 120 121 if (collMITListItems != null) 123 { 124 for (int i = 0; i < collMITListItems.size(); i++) 125 { 126 ((MITListItem) collMITListItems.get(i)) 127 .setIssueTypeId(v); 128 } 129 } 130 131 if (collRModuleAttributes != null) 133 { 134 for (int i = 0; i < collRModuleAttributes.size(); i++) 135 { 136 ((RModuleAttribute) collRModuleAttributes.get(i)) 137 .setIssueTypeId(v); 138 } 139 } 140 141 if (collRIssueTypeAttributes != null) 143 { 144 for (int i = 0; i < collRIssueTypeAttributes.size(); i++) 145 { 146 ((RIssueTypeAttribute) collRIssueTypeAttributes.get(i)) 147 .setIssueTypeId(v); 148 } 149 } 150 151 if (collRModuleOptions != null) 153 { 154 for (int i = 0; i < collRModuleOptions.size(); i++) 155 { 156 ((RModuleOption) collRModuleOptions.get(i)) 157 .setIssueTypeId(v); 158 } 159 } 160 161 if (collRIssueTypeOptions != null) 163 { 164 for (int i = 0; i < collRIssueTypeOptions.size(); i++) 165 { 166 ((RIssueTypeOption) collRIssueTypeOptions.get(i)) 167 .setIssueTypeId(v); 168 } 169 } 170 171 if (collRModuleUserAttributes != null) 173 { 174 for (int i = 0; i < collRModuleUserAttributes.size(); i++) 175 { 176 ((RModuleUserAttribute) collRModuleUserAttributes.get(i)) 177 .setIssueTypeId(v); 178 } 179 } 180 181 if (collQuerys != null) 183 { 184 for (int i = 0; i < collQuerys.size(); i++) 185 { 186 ((Query) collQuerys.get(i)) 187 .setIssueTypeId(v); 188 } 189 } 190 191 if (collReports != null) 193 { 194 for (int i = 0; i < collReports.size(); i++) 195 { 196 ((Report) collReports.get(i)) 197 .setIssueTypeId(v); 198 } 199 } 200 } 201 202 207 public String getName() 208 { 209 return name; 210 } 211 212 213 218 public void setName(String v) 219 { 220 221 if (!ObjectUtils.equals(this.name, v)) 222 { 223 this.name = v; 224 setModified(true); 225 } 226 227 228 } 229 230 235 public String getDescription() 236 { 237 return description; 238 } 239 240 241 246 public void setDescription(String v) 247 { 248 249 if (!ObjectUtils.equals(this.description, v)) 250 { 251 this.description = v; 252 setModified(true); 253 } 254 255 256 } 257 258 263 public Integer getParentId() 264 { 265 return parentId; 266 } 267 268 269 274 public void setParentId(Integer v) throws TorqueException 275 { 276 277 if (!ObjectUtils.equals(this.parentId, v)) 278 { 279 this.parentId = v; 280 setModified(true); 281 } 282 283 284 if (aIssueTypeRelatedByParentId != null && !ObjectUtils.equals(aIssueTypeRelatedByParentId.getIssueTypeId(), v)) 285 { 286 aIssueTypeRelatedByParentId = null; 287 } 288 289 } 290 291 296 public boolean getDedupe() 297 { 298 return dedupe; 299 } 300 301 302 307 public void setDedupe(boolean v) 308 { 309 310 if (this.dedupe != v) 311 { 312 this.dedupe = v; 313 setModified(true); 314 } 315 316 317 } 318 319 324 public boolean getDeleted() 325 { 326 return deleted; 327 } 328 329 330 335 public void setDeleted(boolean v) 336 { 337 338 if (this.deleted != v) 339 { 340 this.deleted = v; 341 setModified(true); 342 } 343 344 345 } 346 347 352 public boolean getLocked() 353 { 354 return locked; 355 } 356 357 358 363 public void setLocked(boolean v) 364 { 365 366 if (this.locked != v) 367 { 368 this.locked = v; 369 setModified(true); 370 } 371 372 373 } 374 375 380 public boolean getIsdefault() 381 { 382 return isdefault; 383 } 384 385 386 391 public void setIsdefault(boolean v) 392 { 393 394 if (this.isdefault != v) 395 { 396 this.isdefault = v; 397 setModified(true); 398 } 399 400 401 } 402 403 404 405 406 private IssueType aIssueTypeRelatedByParentId; 407 408 414 public void setIssueTypeRelatedByParentId(IssueType v) throws TorqueException 415 { 416 if (v == null) 417 { 418 setParentId((Integer ) null); 419 } 420 else 421 { 422 setParentId(v.getIssueTypeId()); 423 } 424 aIssueTypeRelatedByParentId = v; 425 } 426 427 428 434 public IssueType getIssueTypeRelatedByParentId() throws TorqueException 435 { 436 if ( !ObjectUtils.equals(getParentId(), null) ) 437 { 438 return IssueTypeManager.getInstance(SimpleKey.keyFor(getParentId())); 439 } 440 return aIssueTypeRelatedByParentId; 441 } 442 443 449 public void setIssueTypeRelatedByParentIdKey(ObjectKey key) throws TorqueException 450 { 451 452 setParentId(new Integer (((NumberKey) key).intValue())); 453 } 454 455 456 457 460 protected List collAttributeGroups; 461 462 467 protected void initAttributeGroups() 468 { 469 if (collAttributeGroups == null) 470 { 471 collAttributeGroups = new ArrayList (); 472 } 473 } 474 475 476 483 public void addAttributeGroup(AttributeGroup l) throws TorqueException 484 { 485 getAttributeGroups().add(l); 486 l.setIssueType((IssueType)this); 487 } 488 489 492 private Criteria lastAttributeGroupsCriteria = null; 493 494 501 public List getAttributeGroups() throws TorqueException 502 { 503 if (collAttributeGroups == null) 504 { 505 collAttributeGroups = getAttributeGroups(new Criteria(10)); 506 } 507 return collAttributeGroups; 508 } 509 510 521 public List getAttributeGroups(Criteria criteria) throws TorqueException 522 { 523 if (collAttributeGroups == null) 524 { 525 if (isNew()) 526 { 527 collAttributeGroups = new ArrayList (); 528 } 529 else 530 { 531 criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 532 collAttributeGroups = AttributeGroupPeer.doSelect(criteria); 533 } 534 } 535 else 536 { 537 if (!isNew()) 539 { 540 criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 544 if (!lastAttributeGroupsCriteria.equals(criteria)) 545 { 546 collAttributeGroups = AttributeGroupPeer.doSelect(criteria); 547 } 548 } 549 } 550 lastAttributeGroupsCriteria = criteria; 551 552 return collAttributeGroups; 553 } 554 555 563 public List getAttributeGroups(Connection con) throws TorqueException 564 { 565 if (collAttributeGroups == null) 566 { 567 collAttributeGroups = getAttributeGroups(new Criteria(10),con); 568 } 569 return collAttributeGroups; 570 } 571 572 584 public List getAttributeGroups(Criteria criteria,Connection con) throws TorqueException 585 { 586 if (collAttributeGroups == null) 587 { 588 if (isNew()) 589 { 590 collAttributeGroups = new ArrayList (); 591 } 592 else 593 { 594 criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 595 collAttributeGroups = AttributeGroupPeer.doSelect(criteria,con); 596 } 597 } 598 else 599 { 600 if (!isNew()) 602 { 603 criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 607 if (!lastAttributeGroupsCriteria.equals(criteria)) 608 { 609 collAttributeGroups = AttributeGroupPeer.doSelect(criteria,con); 610 } 611 } 612 } 613 lastAttributeGroupsCriteria = criteria; 614 615 return collAttributeGroups; 616 } 617 618 619 620 621 622 623 624 625 626 627 628 639 protected List getAttributeGroupsJoinScarabModule(Criteria criteria) 640 throws TorqueException 641 { 642 if (collAttributeGroups == null) 643 { 644 if (isNew()) 645 { 646 collAttributeGroups = new ArrayList (); 647 } 648 else 649 { 650 criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 651 collAttributeGroups = AttributeGroupPeer.doSelectJoinScarabModule(criteria); 652 } 653 } 654 else 655 { 656 660 criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 661 if (!lastAttributeGroupsCriteria.equals(criteria)) 662 { 663 collAttributeGroups = AttributeGroupPeer.doSelectJoinScarabModule(criteria); 664 } 665 } 666 lastAttributeGroupsCriteria = criteria; 667 668 return collAttributeGroups; 669 } 670 671 672 673 674 675 676 677 678 679 690 protected List getAttributeGroupsJoinIssueType(Criteria criteria) 691 throws TorqueException 692 { 693 if (collAttributeGroups == null) 694 { 695 if (isNew()) 696 { 697 collAttributeGroups = new ArrayList (); 698 } 699 else 700 { 701 criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 702 collAttributeGroups = AttributeGroupPeer.doSelectJoinIssueType(criteria); 703 } 704 } 705 else 706 { 707 711 criteria.add(AttributeGroupPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 712 if (!lastAttributeGroupsCriteria.equals(criteria)) 713 { 714 collAttributeGroups = AttributeGroupPeer.doSelectJoinIssueType(criteria); 715 } 716 } 717 lastAttributeGroupsCriteria = criteria; 718 719 return collAttributeGroups; 720 } 721 722 723 724 725 726 729 protected List collIssues; 730 731 736 protected void initIssues() 737 { 738 if (collIssues == null) 739 { 740 collIssues = new ArrayList (); 741 } 742 } 743 744 745 752 public void addIssue(Issue l) throws TorqueException 753 { 754 getIssues().add(l); 755 l.setIssueType((IssueType)this); 756 } 757 758 761 private Criteria lastIssuesCriteria = null; 762 763 770 public List getIssues() throws TorqueException 771 { 772 if (collIssues == null) 773 { 774 collIssues = getIssues(new Criteria(10)); 775 } 776 return collIssues; 777 } 778 779 790 public List getIssues(Criteria criteria) throws TorqueException 791 { 792 if (collIssues == null) 793 { 794 if (isNew()) 795 { 796 collIssues = new ArrayList (); 797 } 798 else 799 { 800 criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() ); 801 collIssues = IssuePeer.doSelect(criteria); 802 } 803 } 804 else 805 { 806 if (!isNew()) 808 { 809 criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() ); 813 if (!lastIssuesCriteria.equals(criteria)) 814 { 815 collIssues = IssuePeer.doSelect(criteria); 816 } 817 } 818 } 819 lastIssuesCriteria = criteria; 820 821 return collIssues; 822 } 823 824 832 public List getIssues(Connection con) throws TorqueException 833 { 834 if (collIssues == null) 835 { 836 collIssues = getIssues(new Criteria(10),con); 837 } 838 return collIssues; 839 } 840 841 853 public List getIssues(Criteria criteria,Connection con) throws TorqueException 854 { 855 if (collIssues == null) 856 { 857 if (isNew()) 858 { 859 collIssues = new ArrayList (); 860 } 861 else 862 { 863 criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() ); 864 collIssues = IssuePeer.doSelect(criteria,con); 865 } 866 } 867 else 868 { 869 if (!isNew()) 871 { 872 criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() ); 876 if (!lastIssuesCriteria.equals(criteria)) 877 { 878 collIssues = IssuePeer.doSelect(criteria,con); 879 } 880 } 881 } 882 lastIssuesCriteria = criteria; 883 884 return collIssues; 885 } 886 887 888 889 890 891 892 893 894 895 896 897 908 protected List getIssuesJoinScarabModule(Criteria criteria) 909 throws TorqueException 910 { 911 if (collIssues == null) 912 { 913 if (isNew()) 914 { 915 collIssues = new ArrayList (); 916 } 917 else 918 { 919 criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() ); 920 collIssues = IssuePeer.doSelectJoinScarabModule(criteria); 921 } 922 } 923 else 924 { 925 929 criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() ); 930 if (!lastIssuesCriteria.equals(criteria)) 931 { 932 collIssues = IssuePeer.doSelectJoinScarabModule(criteria); 933 } 934 } 935 lastIssuesCriteria = criteria; 936 937 return collIssues; 938 } 939 940 941 942 943 944 945 946 947 948 959 protected List getIssuesJoinIssueType(Criteria criteria) 960 throws TorqueException 961 { 962 if (collIssues == null) 963 { 964 if (isNew()) 965 { 966 collIssues = new ArrayList (); 967 } 968 else 969 { 970 criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() ); 971 collIssues = IssuePeer.doSelectJoinIssueType(criteria); 972 } 973 } 974 else 975 { 976 980 criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() ); 981 if (!lastIssuesCriteria.equals(criteria)) 982 { 983 collIssues = IssuePeer.doSelectJoinIssueType(criteria); 984 } 985 } 986 lastIssuesCriteria = criteria; 987 988 return collIssues; 989 } 990 991 992 993 994 995 996 997 998 999 1010 protected List getIssuesJoinActivitySet(Criteria criteria) 1011 throws TorqueException 1012 { 1013 if (collIssues == null) 1014 { 1015 if (isNew()) 1016 { 1017 collIssues = new ArrayList (); 1018 } 1019 else 1020 { 1021 criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() ); 1022 collIssues = IssuePeer.doSelectJoinActivitySet(criteria); 1023 } 1024 } 1025 else 1026 { 1027 1031 criteria.add(IssuePeer.TYPE_ID, getIssueTypeId() ); 1032 if (!lastIssuesCriteria.equals(criteria)) 1033 { 1034 collIssues = IssuePeer.doSelectJoinActivitySet(criteria); 1035 } 1036 } 1037 lastIssuesCriteria = criteria; 1038 1039 return collIssues; 1040 } 1041 1042 1043 1044 1045 1046 1047 1048 1049 1052 protected List collRModuleIssueTypes; 1053 1054 1059 protected void initRModuleIssueTypes() 1060 { 1061 if (collRModuleIssueTypes == null) 1062 { 1063 collRModuleIssueTypes = new ArrayList (); 1064 } 1065 } 1066 1067 1068 1075 public void addRModuleIssueType(RModuleIssueType l) throws TorqueException 1076 { 1077 getRModuleIssueTypes().add(l); 1078 l.setIssueType((IssueType)this); 1079 } 1080 1081 1084 private Criteria lastRModuleIssueTypesCriteria = null; 1085 1086 1093 public List getRModuleIssueTypes() throws TorqueException 1094 { 1095 if (collRModuleIssueTypes == null) 1096 { 1097 collRModuleIssueTypes = getRModuleIssueTypes(new Criteria(10)); 1098 } 1099 return collRModuleIssueTypes; 1100 } 1101 1102 1113 public List getRModuleIssueTypes(Criteria criteria) throws TorqueException 1114 { 1115 if (collRModuleIssueTypes == null) 1116 { 1117 if (isNew()) 1118 { 1119 collRModuleIssueTypes = new ArrayList (); 1120 } 1121 else 1122 { 1123 criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1124 collRModuleIssueTypes = RModuleIssueTypePeer.doSelect(criteria); 1125 } 1126 } 1127 else 1128 { 1129 if (!isNew()) 1131 { 1132 criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1136 if (!lastRModuleIssueTypesCriteria.equals(criteria)) 1137 { 1138 collRModuleIssueTypes = RModuleIssueTypePeer.doSelect(criteria); 1139 } 1140 } 1141 } 1142 lastRModuleIssueTypesCriteria = criteria; 1143 1144 return collRModuleIssueTypes; 1145 } 1146 1147 1155 public List getRModuleIssueTypes(Connection con) throws TorqueException 1156 { 1157 if (collRModuleIssueTypes == null) 1158 { 1159 collRModuleIssueTypes = getRModuleIssueTypes(new Criteria(10),con); 1160 } 1161 return collRModuleIssueTypes; 1162 } 1163 1164 1176 public List getRModuleIssueTypes(Criteria criteria,Connection con) throws TorqueException 1177 { 1178 if (collRModuleIssueTypes == null) 1179 { 1180 if (isNew()) 1181 { 1182 collRModuleIssueTypes = new ArrayList (); 1183 } 1184 else 1185 { 1186 criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1187 collRModuleIssueTypes = RModuleIssueTypePeer.doSelect(criteria,con); 1188 } 1189 } 1190 else 1191 { 1192 if (!isNew()) 1194 { 1195 criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1199 if (!lastRModuleIssueTypesCriteria.equals(criteria)) 1200 { 1201 collRModuleIssueTypes = RModuleIssueTypePeer.doSelect(criteria,con); 1202 } 1203 } 1204 } 1205 lastRModuleIssueTypesCriteria = criteria; 1206 1207 return collRModuleIssueTypes; 1208 } 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1231 protected List getRModuleIssueTypesJoinScarabModule(Criteria criteria) 1232 throws TorqueException 1233 { 1234 if (collRModuleIssueTypes == null) 1235 { 1236 if (isNew()) 1237 { 1238 collRModuleIssueTypes = new ArrayList (); 1239 } 1240 else 1241 { 1242 criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1243 collRModuleIssueTypes = RModuleIssueTypePeer.doSelectJoinScarabModule(criteria); 1244 } 1245 } 1246 else 1247 { 1248 1252 criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1253 if (!lastRModuleIssueTypesCriteria.equals(criteria)) 1254 { 1255 collRModuleIssueTypes = RModuleIssueTypePeer.doSelectJoinScarabModule(criteria); 1256 } 1257 } 1258 lastRModuleIssueTypesCriteria = criteria; 1259 1260 return collRModuleIssueTypes; 1261 } 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1282 protected List getRModuleIssueTypesJoinIssueType(Criteria criteria) 1283 throws TorqueException 1284 { 1285 if (collRModuleIssueTypes == null) 1286 { 1287 if (isNew()) 1288 { 1289 collRModuleIssueTypes = new ArrayList (); 1290 } 1291 else 1292 { 1293 criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1294 collRModuleIssueTypes = RModuleIssueTypePeer.doSelectJoinIssueType(criteria); 1295 } 1296 } 1297 else 1298 { 1299 1303 criteria.add(RModuleIssueTypePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1304 if (!lastRModuleIssueTypesCriteria.equals(criteria)) 1305 { 1306 collRModuleIssueTypes = RModuleIssueTypePeer.doSelectJoinIssueType(criteria); 1307 } 1308 } 1309 lastRModuleIssueTypesCriteria = criteria; 1310 1311 return collRModuleIssueTypes; 1312 } 1313 1314 1315 1316 1317 1318 1321 protected List collMITListItems; 1322 1323 1328 protected void initMITListItems() 1329 { 1330 if (collMITListItems == null) 1331 { 1332 collMITListItems = new ArrayList (); 1333 } 1334 } 1335 1336 1337 1344 public void addMITListItem(MITListItem l) throws TorqueException 1345 { 1346 getMITListItems().add(l); 1347 l.setIssueType((IssueType)this); 1348 } 1349 1350 1353 private Criteria lastMITListItemsCriteria = null; 1354 1355 1362 public List getMITListItems() throws TorqueException 1363 { 1364 if (collMITListItems == null) 1365 { 1366 collMITListItems = getMITListItems(new Criteria(10)); 1367 } 1368 return collMITListItems; 1369 } 1370 1371 1382 public List getMITListItems(Criteria criteria) throws TorqueException 1383 { 1384 if (collMITListItems == null) 1385 { 1386 if (isNew()) 1387 { 1388 collMITListItems = new ArrayList (); 1389 } 1390 else 1391 { 1392 criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1393 collMITListItems = MITListItemPeer.doSelect(criteria); 1394 } 1395 } 1396 else 1397 { 1398 if (!isNew()) 1400 { 1401 criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1405 if (!lastMITListItemsCriteria.equals(criteria)) 1406 { 1407 collMITListItems = MITListItemPeer.doSelect(criteria); 1408 } 1409 } 1410 } 1411 lastMITListItemsCriteria = criteria; 1412 1413 return collMITListItems; 1414 } 1415 1416 1424 public List getMITListItems(Connection con) throws TorqueException 1425 { 1426 if (collMITListItems == null) 1427 { 1428 collMITListItems = getMITListItems(new Criteria(10),con); 1429 } 1430 return collMITListItems; 1431 } 1432 1433 1445 public List getMITListItems(Criteria criteria,Connection con) throws TorqueException 1446 { 1447 if (collMITListItems == null) 1448 { 1449 if (isNew()) 1450 { 1451 collMITListItems = new ArrayList (); 1452 } 1453 else 1454 { 1455 criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1456 collMITListItems = MITListItemPeer.doSelect(criteria,con); 1457 } 1458 } 1459 else 1460 { 1461 if (!isNew()) 1463 { 1464 criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1468 if (!lastMITListItemsCriteria.equals(criteria)) 1469 { 1470 collMITListItems = MITListItemPeer.doSelect(criteria,con); 1471 } 1472 } 1473 } 1474 lastMITListItemsCriteria = criteria; 1475 1476 return collMITListItems; 1477 } 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1500 protected List getMITListItemsJoinMITList(Criteria criteria) 1501 throws TorqueException 1502 { 1503 if (collMITListItems == null) 1504 { 1505 if (isNew()) 1506 { 1507 collMITListItems = new ArrayList (); 1508 } 1509 else 1510 { 1511 criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1512 collMITListItems = MITListItemPeer.doSelectJoinMITList(criteria); 1513 } 1514 } 1515 else 1516 { 1517 1521 criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1522 if (!lastMITListItemsCriteria.equals(criteria)) 1523 { 1524 collMITListItems = MITListItemPeer.doSelectJoinMITList(criteria); 1525 } 1526 } 1527 lastMITListItemsCriteria = criteria; 1528 1529 return collMITListItems; 1530 } 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1551 protected List getMITListItemsJoinScarabModule(Criteria criteria) 1552 throws TorqueException 1553 { 1554 if (collMITListItems == null) 1555 { 1556 if (isNew()) 1557 { 1558 collMITListItems = new ArrayList (); 1559 } 1560 else 1561 { 1562 criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1563 collMITListItems = MITListItemPeer.doSelectJoinScarabModule(criteria); 1564 } 1565 } 1566 else 1567 { 1568 1572 criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1573 if (!lastMITListItemsCriteria.equals(criteria)) 1574 { 1575 collMITListItems = MITListItemPeer.doSelectJoinScarabModule(criteria); 1576 } 1577 } 1578 lastMITListItemsCriteria = criteria; 1579 1580 return collMITListItems; 1581 } 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1602 protected List getMITListItemsJoinIssueType(Criteria criteria) 1603 throws TorqueException 1604 { 1605 if (collMITListItems == null) 1606 { 1607 if (isNew()) 1608 { 1609 collMITListItems = new ArrayList (); 1610 } 1611 else 1612 { 1613 criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1614 collMITListItems = MITListItemPeer.doSelectJoinIssueType(criteria); 1615 } 1616 } 1617 else 1618 { 1619 1623 criteria.add(MITListItemPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1624 if (!lastMITListItemsCriteria.equals(criteria)) 1625 { 1626 collMITListItems = MITListItemPeer.doSelectJoinIssueType(criteria); 1627 } 1628 } 1629 lastMITListItemsCriteria = criteria; 1630 1631 return collMITListItems; 1632 } 1633 1634 1635 1636 1637 1638 1641 protected List collRModuleAttributes; 1642 1643 1648 protected void initRModuleAttributes() 1649 { 1650 if (collRModuleAttributes == null) 1651 { 1652 collRModuleAttributes = new ArrayList (); 1653 } 1654 } 1655 1656 1657 1664 public void addRModuleAttribute(RModuleAttribute l) throws TorqueException 1665 { 1666 getRModuleAttributes().add(l); 1667 l.setIssueType((IssueType)this); 1668 } 1669 1670 1673 private Criteria lastRModuleAttributesCriteria = null; 1674 1675 1682 public List getRModuleAttributes() throws TorqueException 1683 { 1684 if (collRModuleAttributes == null) 1685 { 1686 collRModuleAttributes = getRModuleAttributes(new Criteria(10)); 1687 } 1688 return collRModuleAttributes; 1689 } 1690 1691 1702 public List getRModuleAttributes(Criteria criteria) throws TorqueException 1703 { 1704 if (collRModuleAttributes == null) 1705 { 1706 if (isNew()) 1707 { 1708 collRModuleAttributes = new ArrayList (); 1709 } 1710 else 1711 { 1712 criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1713 collRModuleAttributes = RModuleAttributePeer.doSelect(criteria); 1714 } 1715 } 1716 else 1717 { 1718 if (!isNew()) 1720 { 1721 criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1725 if (!lastRModuleAttributesCriteria.equals(criteria)) 1726 { 1727 collRModuleAttributes = RModuleAttributePeer.doSelect(criteria); 1728 } 1729 } 1730 } 1731 lastRModuleAttributesCriteria = criteria; 1732 1733 return collRModuleAttributes; 1734 } 1735 1736 1744 public List getRModuleAttributes(Connection con) throws TorqueException 1745 { 1746 if (collRModuleAttributes == null) 1747 { 1748 collRModuleAttributes = getRModuleAttributes(new Criteria(10),con); 1749 } 1750 return collRModuleAttributes; 1751 } 1752 1753 1765 public List getRModuleAttributes(Criteria criteria,Connection con) throws TorqueException 1766 { 1767 if (collRModuleAttributes == null) 1768 { 1769 if (isNew()) 1770 { 1771 collRModuleAttributes = new ArrayList (); 1772 } 1773 else 1774 { 1775 criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1776 collRModuleAttributes = RModuleAttributePeer.doSelect(criteria,con); 1777 } 1778 } 1779 else 1780 { 1781 if (!isNew()) 1783 { 1784 criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1788 if (!lastRModuleAttributesCriteria.equals(criteria)) 1789 { 1790 collRModuleAttributes = RModuleAttributePeer.doSelect(criteria,con); 1791 } 1792 } 1793 } 1794 lastRModuleAttributesCriteria = criteria; 1795 1796 return collRModuleAttributes; 1797 } 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1820 protected List getRModuleAttributesJoinAttribute(Criteria criteria) 1821 throws TorqueException 1822 { 1823 if (collRModuleAttributes == null) 1824 { 1825 if (isNew()) 1826 { 1827 collRModuleAttributes = new ArrayList (); 1828 } 1829 else 1830 { 1831 criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1832 collRModuleAttributes = RModuleAttributePeer.doSelectJoinAttribute(criteria); 1833 } 1834 } 1835 else 1836 { 1837 1841 criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1842 if (!lastRModuleAttributesCriteria.equals(criteria)) 1843 { 1844 collRModuleAttributes = RModuleAttributePeer.doSelectJoinAttribute(criteria); 1845 } 1846 } 1847 lastRModuleAttributesCriteria = criteria; 1848 1849 return collRModuleAttributes; 1850 } 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1871 protected List getRModuleAttributesJoinScarabModule(Criteria criteria) 1872 throws TorqueException 1873 { 1874 if (collRModuleAttributes == null) 1875 { 1876 if (isNew()) 1877 { 1878 collRModuleAttributes = new ArrayList (); 1879 } 1880 else 1881 { 1882 criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1883 collRModuleAttributes = RModuleAttributePeer.doSelectJoinScarabModule(criteria); 1884 } 1885 } 1886 else 1887 { 1888 1892 criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1893 if (!lastRModuleAttributesCriteria.equals(criteria)) 1894 { 1895 collRModuleAttributes = RModuleAttributePeer.doSelectJoinScarabModule(criteria); 1896 } 1897 } 1898 lastRModuleAttributesCriteria = criteria; 1899 1900 return collRModuleAttributes; 1901 } 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1922 protected List getRModuleAttributesJoinIssueType(Criteria criteria) 1923 throws TorqueException 1924 { 1925 if (collRModuleAttributes == null) 1926 { 1927 if (isNew()) 1928 { 1929 collRModuleAttributes = new ArrayList (); 1930 } 1931 else 1932 { 1933 criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1934 collRModuleAttributes = RModuleAttributePeer.doSelectJoinIssueType(criteria); 1935 } 1936 } 1937 else 1938 { 1939 1943 criteria.add(RModuleAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 1944 if (!lastRModuleAttributesCriteria.equals(criteria)) 1945 { 1946 collRModuleAttributes = RModuleAttributePeer.doSelectJoinIssueType(criteria); 1947 } 1948 } 1949 lastRModuleAttributesCriteria = criteria; 1950 1951 return collRModuleAttributes; 1952 } 1953 1954 1955 1956 1957 1958 1961 protected List collRIssueTypeAttributes; 1962 1963 1968 protected void initRIssueTypeAttributes() 1969 { 1970 if (collRIssueTypeAttributes == null) 1971 { 1972 collRIssueTypeAttributes = new ArrayList (); 1973 } 1974 } 1975 1976 1977 1984 public void addRIssueTypeAttribute(RIssueTypeAttribute l) throws TorqueException 1985 { 1986 getRIssueTypeAttributes().add(l); 1987 l.setIssueType((IssueType)this); 1988 } 1989 1990 1993 private Criteria lastRIssueTypeAttributesCriteria = null; 1994 1995 2002 public List getRIssueTypeAttributes() throws TorqueException 2003 { 2004 if (collRIssueTypeAttributes == null) 2005 { 2006 collRIssueTypeAttributes = getRIssueTypeAttributes(new Criteria(10)); 2007 } 2008 return collRIssueTypeAttributes; 2009 } 2010 2011 2022 public List getRIssueTypeAttributes(Criteria criteria) throws TorqueException 2023 { 2024 if (collRIssueTypeAttributes == null) 2025 { 2026 if (isNew()) 2027 { 2028 collRIssueTypeAttributes = new ArrayList (); 2029 } 2030 else 2031 { 2032 criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2033 collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelect(criteria); 2034 } 2035 } 2036 else 2037 { 2038 if (!isNew()) 2040 { 2041 criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2045 if (!lastRIssueTypeAttributesCriteria.equals(criteria)) 2046 { 2047 collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelect(criteria); 2048 } 2049 } 2050 } 2051 lastRIssueTypeAttributesCriteria = criteria; 2052 2053 return collRIssueTypeAttributes; 2054 } 2055 2056 2064 public List getRIssueTypeAttributes(Connection con) throws TorqueException 2065 { 2066 if (collRIssueTypeAttributes == null) 2067 { 2068 collRIssueTypeAttributes = getRIssueTypeAttributes(new Criteria(10),con); 2069 } 2070 return collRIssueTypeAttributes; 2071 } 2072 2073 2085 public List getRIssueTypeAttributes(Criteria criteria,Connection con) throws TorqueException 2086 { 2087 if (collRIssueTypeAttributes == null) 2088 { 2089 if (isNew()) 2090 { 2091 collRIssueTypeAttributes = new ArrayList (); 2092 } 2093 else 2094 { 2095 criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2096 collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelect(criteria,con); 2097 } 2098 } 2099 else 2100 { 2101 if (!isNew()) 2103 { 2104 criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2108 if (!lastRIssueTypeAttributesCriteria.equals(criteria)) 2109 { 2110 collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelect(criteria,con); 2111 } 2112 } 2113 } 2114 lastRIssueTypeAttributesCriteria = criteria; 2115 2116 return collRIssueTypeAttributes; 2117 } 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2140 protected List getRIssueTypeAttributesJoinAttribute(Criteria criteria) 2141 throws TorqueException 2142 { 2143 if (collRIssueTypeAttributes == null) 2144 { 2145 if (isNew()) 2146 { 2147 collRIssueTypeAttributes = new ArrayList (); 2148 } 2149 else 2150 { 2151 criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2152 collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelectJoinAttribute(criteria); 2153 } 2154 } 2155 else 2156 { 2157 2161 criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2162 if (!lastRIssueTypeAttributesCriteria.equals(criteria)) 2163 { 2164 collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelectJoinAttribute(criteria); 2165 } 2166 } 2167 lastRIssueTypeAttributesCriteria = criteria; 2168 2169 return collRIssueTypeAttributes; 2170 } 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2191 protected List getRIssueTypeAttributesJoinIssueType(Criteria criteria) 2192 throws TorqueException 2193 { 2194 if (collRIssueTypeAttributes == null) 2195 { 2196 if (isNew()) 2197 { 2198 collRIssueTypeAttributes = new ArrayList (); 2199 } 2200 else 2201 { 2202 criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2203 collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelectJoinIssueType(criteria); 2204 } 2205 } 2206 else 2207 { 2208 2212 criteria.add(RIssueTypeAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2213 if (!lastRIssueTypeAttributesCriteria.equals(criteria)) 2214 { 2215 collRIssueTypeAttributes = RIssueTypeAttributePeer.doSelectJoinIssueType(criteria); 2216 } 2217 } 2218 lastRIssueTypeAttributesCriteria = criteria; 2219 2220 return collRIssueTypeAttributes; 2221 } 2222 2223 2224 2225 2226 2227 2230 protected List collRModuleOptions; 2231 2232 2237 protected void initRModuleOptions() 2238 { 2239 if (collRModuleOptions == null) 2240 { 2241 collRModuleOptions = new ArrayList (); 2242 } 2243 } 2244 2245 2246 2253 public void addRModuleOption(RModuleOption l) throws TorqueException 2254 { 2255 getRModuleOptions().add(l); 2256 l.setIssueType((IssueType)this); 2257 } 2258 2259 2262 private Criteria lastRModuleOptionsCriteria = null; 2263 2264 2271 public List getRModuleOptions() throws TorqueException 2272 { 2273 if (collRModuleOptions == null) 2274 { 2275 collRModuleOptions = getRModuleOptions(new Criteria(10)); 2276 } 2277 return collRModuleOptions; 2278 } 2279 2280 2291 public List getRModuleOptions(Criteria criteria) throws TorqueException 2292 { 2293 if (collRModuleOptions == null) 2294 { 2295 if (isNew()) 2296 { 2297 collRModuleOptions = new ArrayList (); 2298 } 2299 else 2300 { 2301 criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2302 collRModuleOptions = RModuleOptionPeer.doSelect(criteria); 2303 } 2304 } 2305 else 2306 { 2307 if (!isNew()) 2309 { 2310 criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2314 if (!lastRModuleOptionsCriteria.equals(criteria)) 2315 { 2316 collRModuleOptions = RModuleOptionPeer.doSelect(criteria); 2317 } 2318 } 2319 } 2320 lastRModuleOptionsCriteria = criteria; 2321 2322 return collRModuleOptions; 2323 } 2324 2325 2333 public List getRModuleOptions(Connection con) throws TorqueException 2334 { 2335 if (collRModuleOptions == null) 2336 { 2337 collRModuleOptions = getRModuleOptions(new Criteria(10),con); 2338 } 2339 return collRModuleOptions; 2340 } 2341 2342 2354 public List getRModuleOptions(Criteria criteria,Connection con) throws TorqueException 2355 { 2356 if (collRModuleOptions == null) 2357 { 2358 if (isNew()) 2359 { 2360 collRModuleOptions = new ArrayList (); 2361 } 2362 else 2363 { 2364 criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2365 collRModuleOptions = RModuleOptionPeer.doSelect(criteria,con); 2366 } 2367 } 2368 else 2369 { 2370 if (!isNew()) 2372 { 2373 criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2377 if (!lastRModuleOptionsCriteria.equals(criteria)) 2378 { 2379 collRModuleOptions = RModuleOptionPeer.doSelect(criteria,con); 2380 } 2381 } 2382 } 2383 lastRModuleOptionsCriteria = criteria; 2384 2385 return collRModuleOptions; 2386 } 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2409 protected List getRModuleOptionsJoinAttributeOption(Criteria criteria) 2410 throws TorqueException 2411 { 2412 if (collRModuleOptions == null) 2413 { 2414 if (isNew()) 2415 { 2416 collRModuleOptions = new ArrayList (); 2417 } 2418 else 2419 { 2420 criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2421 collRModuleOptions = RModuleOptionPeer.doSelectJoinAttributeOption(criteria); 2422 } 2423 } 2424 else 2425 { 2426 2430 criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2431 if (!lastRModuleOptionsCriteria.equals(criteria)) 2432 { 2433 collRModuleOptions = RModuleOptionPeer.doSelectJoinAttributeOption(criteria); 2434 } 2435 } 2436 lastRModuleOptionsCriteria = criteria; 2437 2438 return collRModuleOptions; 2439 } 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2460 protected List getRModuleOptionsJoinScarabModule(Criteria criteria) 2461 throws TorqueException 2462 { 2463 if (collRModuleOptions == null) 2464 { 2465 if (isNew()) 2466 { 2467 collRModuleOptions = new ArrayList (); 2468 } 2469 else 2470 { 2471 criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2472 collRModuleOptions = RModuleOptionPeer.doSelectJoinScarabModule(criteria); 2473 } 2474 } 2475 else 2476 { 2477 2481 criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2482 if (!lastRModuleOptionsCriteria.equals(criteria)) 2483 { 2484 collRModuleOptions = RModuleOptionPeer.doSelectJoinScarabModule(criteria); 2485 } 2486 } 2487 lastRModuleOptionsCriteria = criteria; 2488 2489 return collRModuleOptions; 2490 } 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2511 protected List getRModuleOptionsJoinIssueType(Criteria criteria) 2512 throws TorqueException 2513 { 2514 if (collRModuleOptions == null) 2515 { 2516 if (isNew()) 2517 { 2518 collRModuleOptions = new ArrayList (); 2519 } 2520 else 2521 { 2522 criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2523 collRModuleOptions = RModuleOptionPeer.doSelectJoinIssueType(criteria); 2524 } 2525 } 2526 else 2527 { 2528 2532 criteria.add(RModuleOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2533 if (!lastRModuleOptionsCriteria.equals(criteria)) 2534 { 2535 collRModuleOptions = RModuleOptionPeer.doSelectJoinIssueType(criteria); 2536 } 2537 } 2538 lastRModuleOptionsCriteria = criteria; 2539 2540 return collRModuleOptions; 2541 } 2542 2543 2544 2545 2546 2547 2550 protected List collRIssueTypeOptions; 2551 2552 2557 protected void initRIssueTypeOptions() 2558 { 2559 if (collRIssueTypeOptions == null) 2560 { 2561 collRIssueTypeOptions = new ArrayList (); 2562 } 2563 } 2564 2565 2566 2573 public void addRIssueTypeOption(RIssueTypeOption l) throws TorqueException 2574 { 2575 getRIssueTypeOptions().add(l); 2576 l.setIssueType((IssueType)this); 2577 } 2578 2579 2582 private Criteria lastRIssueTypeOptionsCriteria = null; 2583 2584 2591 public List getRIssueTypeOptions() throws TorqueException 2592 { 2593 if (collRIssueTypeOptions == null) 2594 { 2595 collRIssueTypeOptions = getRIssueTypeOptions(new Criteria(10)); 2596 } 2597 return collRIssueTypeOptions; 2598 } 2599 2600 2611 public List getRIssueTypeOptions(Criteria criteria) throws TorqueException 2612 { 2613 if (collRIssueTypeOptions == null) 2614 { 2615 if (isNew()) 2616 { 2617 collRIssueTypeOptions = new ArrayList (); 2618 } 2619 else 2620 { 2621 criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2622 collRIssueTypeOptions = RIssueTypeOptionPeer.doSelect(criteria); 2623 } 2624 } 2625 else 2626 { 2627 if (!isNew()) 2629 { 2630 criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2634 if (!lastRIssueTypeOptionsCriteria.equals(criteria)) 2635 { 2636 collRIssueTypeOptions = RIssueTypeOptionPeer.doSelect(criteria); 2637 } 2638 } 2639 } 2640 lastRIssueTypeOptionsCriteria = criteria; 2641 2642 return collRIssueTypeOptions; 2643 } 2644 2645 2653 public List getRIssueTypeOptions(Connection con) throws TorqueException 2654 { 2655 if (collRIssueTypeOptions == null) 2656 { 2657 collRIssueTypeOptions = getRIssueTypeOptions(new Criteria(10),con); 2658 } 2659 return collRIssueTypeOptions; 2660 } 2661 2662 2674 public List getRIssueTypeOptions(Criteria criteria,Connection con) throws TorqueException 2675 { 2676 if (collRIssueTypeOptions == null) 2677 { 2678 if (isNew()) 2679 { 2680 collRIssueTypeOptions = new ArrayList (); 2681 } 2682 else 2683 { 2684 criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2685 collRIssueTypeOptions = RIssueTypeOptionPeer.doSelect(criteria,con); 2686 } 2687 } 2688 else 2689 { 2690 if (!isNew()) 2692 { 2693 criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2697 if (!lastRIssueTypeOptionsCriteria.equals(criteria)) 2698 { 2699 collRIssueTypeOptions = RIssueTypeOptionPeer.doSelect(criteria,con); 2700 } 2701 } 2702 } 2703 lastRIssueTypeOptionsCriteria = criteria; 2704 2705 return collRIssueTypeOptions; 2706 } 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2729 protected List getRIssueTypeOptionsJoinAttributeOption(Criteria criteria) 2730 throws TorqueException 2731 { 2732 if (collRIssueTypeOptions == null) 2733 { 2734 if (isNew()) 2735 { 2736 collRIssueTypeOptions = new ArrayList (); 2737 } 2738 else 2739 { 2740 criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2741 collRIssueTypeOptions = RIssueTypeOptionPeer.doSelectJoinAttributeOption(criteria); 2742 } 2743 } 2744 else 2745 { 2746 2750 criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2751 if (!lastRIssueTypeOptionsCriteria.equals(criteria)) 2752 { 2753 collRIssueTypeOptions = RIssueTypeOptionPeer.doSelectJoinAttributeOption(criteria); 2754 } 2755 } 2756 lastRIssueTypeOptionsCriteria = criteria; 2757 2758 return collRIssueTypeOptions; 2759 } 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2780 protected List getRIssueTypeOptionsJoinIssueType(Criteria criteria) 2781 throws TorqueException 2782 { 2783 if (collRIssueTypeOptions == null) 2784 { 2785 if (isNew()) 2786 { 2787 collRIssueTypeOptions = new ArrayList (); 2788 } 2789 else 2790 { 2791 criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2792 collRIssueTypeOptions = RIssueTypeOptionPeer.doSelectJoinIssueType(criteria); 2793 } 2794 } 2795 else 2796 { 2797 2801 criteria.add(RIssueTypeOptionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2802 if (!lastRIssueTypeOptionsCriteria.equals(criteria)) 2803 { 2804 collRIssueTypeOptions = RIssueTypeOptionPeer.doSelectJoinIssueType(criteria); 2805 } 2806 } 2807 lastRIssueTypeOptionsCriteria = criteria; 2808 2809 return collRIssueTypeOptions; 2810 } 2811 2812 2813 2814 2815 2816 2819 protected List collRModuleUserAttributes; 2820 2821 2826 protected void initRModuleUserAttributes() 2827 { 2828 if (collRModuleUserAttributes == null) 2829 { 2830 collRModuleUserAttributes = new ArrayList (); 2831 } 2832 } 2833 2834 2835 2842 public void addRModuleUserAttribute(RModuleUserAttribute l) throws TorqueException 2843 { 2844 getRModuleUserAttributes().add(l); 2845 l.setIssueType((IssueType)this); 2846 } 2847 2848 2851 private Criteria lastRModuleUserAttributesCriteria = null; 2852 2853 2860 public List getRModuleUserAttributes() throws TorqueException 2861 { 2862 if (collRModuleUserAttributes == null) 2863 { 2864 collRModuleUserAttributes = getRModuleUserAttributes(new Criteria(10)); 2865 } 2866 return collRModuleUserAttributes; 2867 } 2868 2869 2880 public List getRModuleUserAttributes(Criteria criteria) throws TorqueException 2881 { 2882 if (collRModuleUserAttributes == null) 2883 { 2884 if (isNew()) 2885 { 2886 collRModuleUserAttributes = new ArrayList (); 2887 } 2888 else 2889 { 2890 criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2891 collRModuleUserAttributes = RModuleUserAttributePeer.doSelect(criteria); 2892 } 2893 } 2894 else 2895 { 2896 if (!isNew()) 2898 { 2899 criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2903 if (!lastRModuleUserAttributesCriteria.equals(criteria)) 2904 { 2905 collRModuleUserAttributes = RModuleUserAttributePeer.doSelect(criteria); 2906 } 2907 } 2908 } 2909 lastRModuleUserAttributesCriteria = criteria; 2910 2911 return collRModuleUserAttributes; 2912 } 2913 2914 2922 public List getRModuleUserAttributes(Connection con) throws TorqueException 2923 { 2924 if (collRModuleUserAttributes == null) 2925 { 2926 collRModuleUserAttributes = getRModuleUserAttributes(new Criteria(10),con); 2927 } 2928 return collRModuleUserAttributes; 2929 } 2930 2931 2943 public List getRModuleUserAttributes(Criteria criteria,Connection con) throws TorqueException 2944 { 2945 if (collRModuleUserAttributes == null) 2946 { 2947 if (isNew()) 2948 { 2949 collRModuleUserAttributes = new ArrayList (); 2950 } 2951 else 2952 { 2953 criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2954 collRModuleUserAttributes = RModuleUserAttributePeer.doSelect(criteria,con); 2955 } 2956 } 2957 else 2958 { 2959 if (!isNew()) 2961 { 2962 criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 2966 if (!lastRModuleUserAttributesCriteria.equals(criteria)) 2967 { 2968 collRModuleUserAttributes = RModuleUserAttributePeer.doSelect(criteria,con); 2969 } 2970 } 2971 } 2972 lastRModuleUserAttributesCriteria = criteria; 2973 2974 return collRModuleUserAttributes; 2975 } 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2998 protected List getRModuleUserAttributesJoinMITList(Criteria criteria) 2999 throws TorqueException 3000 { 3001 if (collRModuleUserAttributes == null) 3002 { 3003 if (isNew()) 3004 { 3005 collRModuleUserAttributes = new ArrayList (); 3006 } 3007 else 3008 { 3009 criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3010 collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinMITList(criteria); 3011 } 3012 } 3013 else 3014 { 3015 3019 criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3020 if (!lastRModuleUserAttributesCriteria.equals(criteria)) 3021 { 3022 collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinMITList(criteria); 3023 } 3024 } 3025 lastRModuleUserAttributesCriteria = criteria; 3026 3027 return collRModuleUserAttributes; 3028 } 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3049 protected List getRModuleUserAttributesJoinScarabModule(Criteria criteria) 3050 throws TorqueException 3051 { 3052 if (collRModuleUserAttributes == null) 3053 { 3054 if (isNew()) 3055 { 3056 collRModuleUserAttributes = new ArrayList (); 3057 } 3058 else 3059 { 3060 criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3061 collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinScarabModule(criteria); 3062 } 3063 } 3064 else 3065 { 3066 3070 criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3071 if (!lastRModuleUserAttributesCriteria.equals(criteria)) 3072 { 3073 collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinScarabModule(criteria); 3074 } 3075 } 3076 lastRModuleUserAttributesCriteria = criteria; 3077 3078 return collRModuleUserAttributes; 3079 } 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3100 protected List getRModuleUserAttributesJoinScarabUserImpl(Criteria criteria) 3101 throws TorqueException 3102 { 3103 if (collRModuleUserAttributes == null) 3104 { 3105 if (isNew()) 3106 { 3107 collRModuleUserAttributes = new ArrayList (); 3108 } 3109 else 3110 { 3111 criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3112 collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinScarabUserImpl(criteria); 3113 } 3114 } 3115 else 3116 { 3117 3121 criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3122 if (!lastRModuleUserAttributesCriteria.equals(criteria)) 3123 { 3124 collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinScarabUserImpl(criteria); 3125 } 3126 } 3127 lastRModuleUserAttributesCriteria = criteria; 3128 3129 return collRModuleUserAttributes; 3130 } 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3151 protected List getRModuleUserAttributesJoinIssueType(Criteria criteria) 3152 throws TorqueException 3153 { 3154 if (collRModuleUserAttributes == null) 3155 { 3156 if (isNew()) 3157 { 3158 collRModuleUserAttributes = new ArrayList (); 3159 } 3160 else 3161 { 3162 criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3163 collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinIssueType(criteria); 3164 } 3165 } 3166 else 3167 { 3168 3172 criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3173 if (!lastRModuleUserAttributesCriteria.equals(criteria)) 3174 { 3175 collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinIssueType(criteria); 3176 } 3177 } 3178 lastRModuleUserAttributesCriteria = criteria; 3179 3180 return collRModuleUserAttributes; 3181 } 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3202 protected List getRModuleUserAttributesJoinAttribute(Criteria criteria) 3203 throws TorqueException 3204 { 3205 if (collRModuleUserAttributes == null) 3206 { 3207 if (isNew()) 3208 { 3209 collRModuleUserAttributes = new ArrayList (); 3210 } 3211 else 3212 { 3213 criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3214 collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinAttribute(criteria); 3215 } 3216 } 3217 else 3218 { 3219 3223 criteria.add(RModuleUserAttributePeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3224 if (!lastRModuleUserAttributesCriteria.equals(criteria)) 3225 { 3226 collRModuleUserAttributes = RModuleUserAttributePeer.doSelectJoinAttribute(criteria); 3227 } 3228 } 3229 lastRModuleUserAttributesCriteria = criteria; 3230 3231 return collRModuleUserAttributes; 3232 } 3233 3234 3235 3236 3237 3238 3241 protected List collQuerys; 3242 3243 3248 protected void initQuerys() 3249 { 3250 if (collQuerys == null) 3251 { 3252 collQuerys = new ArrayList (); 3253 } 3254 } 3255 3256 3257 3264 public void addQuery(Query l) throws TorqueException 3265 { 3266 getQuerys().add(l); 3267 l.setIssueType((IssueType)this); 3268 } 3269 3270 3273 private Criteria lastQuerysCriteria = null; 3274 3275 3282 public List getQuerys() throws TorqueException 3283 { 3284 if (collQuerys == null) 3285 { 3286 collQuerys = getQuerys(new Criteria(10)); 3287 } 3288 return collQuerys; 3289 } 3290 3291 3302 public List getQuerys(Criteria criteria) throws TorqueException 3303 { 3304 if (collQuerys == null) 3305 { 3306 if (isNew()) 3307 { 3308 collQuerys = new ArrayList (); 3309 } 3310 else 3311 { 3312 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3313 collQuerys = QueryPeer.doSelect(criteria); 3314 } 3315 } 3316 else 3317 { 3318 if (!isNew()) 3320 { 3321 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3325 if (!lastQuerysCriteria.equals(criteria)) 3326 { 3327 collQuerys = QueryPeer.doSelect(criteria); 3328 } 3329 } 3330 } 3331 lastQuerysCriteria = criteria; 3332 3333 return collQuerys; 3334 } 3335 3336 3344 public List getQuerys(Connection con) throws TorqueException 3345 { 3346 if (collQuerys == null) 3347 { 3348 collQuerys = getQuerys(new Criteria(10),con); 3349 } 3350 return collQuerys; 3351 } 3352 3353 3365 public List getQuerys(Criteria criteria,Connection con) throws TorqueException 3366 { 3367 if (collQuerys == null) 3368 { 3369 if (isNew()) 3370 { 3371 collQuerys = new ArrayList (); 3372 } 3373 else 3374 { 3375 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3376 collQuerys = QueryPeer.doSelect(criteria,con); 3377 } 3378 } 3379 else 3380 { 3381 if (!isNew()) 3383 { 3384 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3388 if (!lastQuerysCriteria.equals(criteria)) 3389 { 3390 collQuerys = QueryPeer.doSelect(criteria,con); 3391 } 3392 } 3393 } 3394 lastQuerysCriteria = criteria; 3395 3396 return collQuerys; 3397 } 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3420 protected List getQuerysJoinScarabUserImpl(Criteria criteria) 3421 throws TorqueException 3422 { 3423 if (collQuerys == null) 3424 { 3425 if (isNew()) 3426 { 3427 collQuerys = new ArrayList (); 3428 } 3429 else 3430 { 3431 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3432 collQuerys = QueryPeer.doSelectJoinScarabUserImpl(criteria); 3433 } 3434 } 3435 else 3436 { 3437 3441 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3442 if (!lastQuerysCriteria.equals(criteria)) 3443 { 3444 collQuerys = QueryPeer.doSelectJoinScarabUserImpl(criteria); 3445 } 3446 } 3447 lastQuerysCriteria = criteria; 3448 3449 return collQuerys; 3450 } 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3471 protected List getQuerysJoinScope(Criteria criteria) 3472 throws TorqueException 3473 { 3474 if (collQuerys == null) 3475 { 3476 if (isNew()) 3477 { 3478 collQuerys = new ArrayList (); 3479 } 3480 else 3481 { 3482 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3483 collQuerys = QueryPeer.doSelectJoinScope(criteria); 3484 } 3485 } 3486 else 3487 { 3488 3492 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3493 if (!lastQuerysCriteria.equals(criteria)) 3494 { 3495 collQuerys = QueryPeer.doSelectJoinScope(criteria); 3496 } 3497 } 3498 lastQuerysCriteria = criteria; 3499 3500 return collQuerys; 3501 } 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3522 protected List getQuerysJoinScarabModule(Criteria criteria) 3523 throws TorqueException 3524 { 3525 if (collQuerys == null) 3526 { 3527 if (isNew()) 3528 { 3529 collQuerys = new ArrayList (); 3530 } 3531 else 3532 { 3533 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3534 collQuerys = QueryPeer.doSelectJoinScarabModule(criteria); 3535 } 3536 } 3537 else 3538 { 3539 3543 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3544 if (!lastQuerysCriteria.equals(criteria)) 3545 { 3546 collQuerys = QueryPeer.doSelectJoinScarabModule(criteria); 3547 } 3548 } 3549 lastQuerysCriteria = criteria; 3550 3551 return collQuerys; 3552 } 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3573 protected List getQuerysJoinIssueType(Criteria criteria) 3574 throws TorqueException 3575 { 3576 if (collQuerys == null) 3577 { 3578 if (isNew()) 3579 { 3580 collQuerys = new ArrayList (); 3581 } 3582 else 3583 { 3584 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3585 collQuerys = QueryPeer.doSelectJoinIssueType(criteria); 3586 } 3587 } 3588 else 3589 { 3590 3594 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3595 if (!lastQuerysCriteria.equals(criteria)) 3596 { 3597 collQuerys = QueryPeer.doSelectJoinIssueType(criteria); 3598 } 3599 } 3600 lastQuerysCriteria = criteria; 3601 3602 return collQuerys; 3603 } 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3624 protected List getQuerysJoinMITList(Criteria criteria) 3625 throws TorqueException 3626 { 3627 if (collQuerys == null) 3628 { 3629 if (isNew()) 3630 { 3631 collQuerys = new ArrayList (); 3632 } 3633 else 3634 { 3635 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3636 collQuerys = QueryPeer.doSelectJoinMITList(criteria); 3637 } 3638 } 3639 else 3640 { 3641 3645 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3646 if (!lastQuerysCriteria.equals(criteria)) 3647 { 3648 collQuerys = QueryPeer.doSelectJoinMITList(criteria); 3649 } 3650 } 3651 lastQuerysCriteria = criteria; 3652 3653 return collQuerys; 3654 } 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3675 protected List getQuerysJoinFrequency(Criteria criteria) 3676 throws TorqueException 3677 { 3678 if (collQuerys == null) 3679 { 3680 if (isNew()) 3681 { 3682 collQuerys = new ArrayList (); 3683 } 3684 else 3685 { 3686 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3687 collQuerys = QueryPeer.doSelectJoinFrequency(criteria); 3688 } 3689 } 3690 else 3691 { 3692 3696 criteria.add(QueryPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3697 if (!lastQuerysCriteria.equals(criteria)) 3698 { 3699 collQuerys = QueryPeer.doSelectJoinFrequency(criteria); 3700 } 3701 } 3702 lastQuerysCriteria = criteria; 3703 3704 return collQuerys; 3705 } 3706 3707 3708 3709 3710 3711 3714 protected List collReports; 3715 3716 3721 protected void initReports() 3722 { 3723 if (collReports == null) 3724 { 3725 collReports = new ArrayList (); 3726 } 3727 } 3728 3729 3730 3737 public void addReport(Report l) throws TorqueException 3738 { 3739 getReports().add(l); 3740 l.setIssueType((IssueType)this); 3741 } 3742 3743 3746 private Criteria lastReportsCriteria = null; 3747 3748 3755 public List getReports() throws TorqueException 3756 { 3757 if (collReports == null) 3758 { 3759 collReports = getReports(new Criteria(10)); 3760 } 3761 return collReports; 3762 } 3763 3764 3775 public List getReports(Criteria criteria) throws TorqueException 3776 { 3777 if (collReports == null) 3778 { 3779 if (isNew()) 3780 { 3781 collReports = new ArrayList (); 3782 } 3783 else 3784 { 3785 criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3786 collReports = ReportPeer.doSelect(criteria); 3787 } 3788 } 3789 else 3790 { 3791 if (!isNew()) 3793 { 3794 criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3798 if (!lastReportsCriteria.equals(criteria)) 3799 { 3800 collReports = ReportPeer.doSelect(criteria); 3801 } 3802 } 3803 } 3804 lastReportsCriteria = criteria; 3805 3806 return collReports; 3807 } 3808 3809 3817 public List getReports(Connection con) throws TorqueException 3818 { 3819 if (collReports == null) 3820 { 3821 collReports = getReports(new Criteria(10),con); 3822 } 3823 return collReports; 3824 } 3825 3826 3838 public List getReports(Criteria criteria,Connection con) throws TorqueException 3839 { 3840 if (collReports == null) 3841 { 3842 if (isNew()) 3843 { 3844 collReports = new ArrayList (); 3845 } 3846 else 3847 { 3848 criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3849 collReports = ReportPeer.doSelect(criteria,con); 3850 } 3851 } 3852 else 3853 { 3854 if (!isNew()) 3856 { 3857 criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3861 if (!lastReportsCriteria.equals(criteria)) 3862 { 3863 collReports = ReportPeer.doSelect(criteria,con); 3864 } 3865 } 3866 } 3867 lastReportsCriteria = criteria; 3868 3869 return collReports; 3870 } 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3893 protected List getReportsJoinIssueType(Criteria criteria) 3894 throws TorqueException 3895 { 3896 if (collReports == null) 3897 { 3898 if (isNew()) 3899 { 3900 collReports = new ArrayList (); 3901 } 3902 else 3903 { 3904 criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3905 collReports = ReportPeer.doSelectJoinIssueType(criteria); 3906 } 3907 } 3908 else 3909 { 3910 3914 criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3915 if (!lastReportsCriteria.equals(criteria)) 3916 { 3917 collReports = ReportPeer.doSelectJoinIssueType(criteria); 3918 } 3919 } 3920 lastReportsCriteria = criteria; 3921 3922 return collReports; 3923 } 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3944 protected List getReportsJoinScarabUserImpl(Criteria criteria) 3945 throws TorqueException 3946 { 3947 if (collReports == null) 3948 { 3949 if (isNew()) 3950 { 3951 collReports = new ArrayList (); 3952 } 3953 else 3954 { 3955 criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3956 collReports = ReportPeer.doSelectJoinScarabUserImpl(criteria); 3957 } 3958 } 3959 else 3960 { 3961 3965 criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 3966 if (!lastReportsCriteria.equals(criteria)) 3967 { 3968 collReports = ReportPeer.doSelectJoinScarabUserImpl(criteria); 3969 } 3970 } 3971 lastReportsCriteria = criteria; 3972 3973 return collReports; 3974 } 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3995 protected List getReportsJoinScarabModule(Criteria criteria) 3996 throws TorqueException 3997 { 3998 if (collReports == null) 3999 { 4000 if (isNew()) 4001 { 4002 collReports = new ArrayList (); 4003 } 4004 else 4005 { 4006 criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 4007 collReports = ReportPeer.doSelectJoinScarabModule(criteria); 4008 } 4009 } 4010 else 4011 { 4012 4016 criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 4017 if (!lastReportsCriteria.equals(criteria)) 4018 { 4019 collReports = ReportPeer.doSelectJoinScarabModule(criteria); 4020 } 4021 } 4022 lastReportsCriteria = criteria; 4023 4024 return collReports; 4025 } 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4046 protected List getReportsJoinScope(Criteria criteria) 4047 throws TorqueException 4048 { 4049 if (collReports == null) 4050 { 4051 if (isNew()) 4052 { 4053 collReports = new ArrayList (); 4054 } 4055 else 4056 { 4057 criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 4058 collReports = ReportPeer.doSelectJoinScope(criteria); 4059 } 4060 } 4061 else 4062 { 4063 4067 criteria.add(ReportPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 4068 if (!lastReportsCriteria.equals(criteria)) 4069 { 4070 collReports = ReportPeer.doSelectJoinScope(criteria); 4071 } 4072 } 4073 lastReportsCriteria = criteria; 4074 4075 return collReports; 4076 } 4077 4078 4079 4080 4081 private static List fieldNames = null; 4082 4083 4088 public static synchronized List getFieldNames() 4089 { 4090 if (fieldNames == null) 4091 { 4092 fieldNames = new ArrayList (); 4093 fieldNames.add("IssueTypeId"); 4094 fieldNames.add("Name"); 4095 fieldNames.add("Description"); 4096 fieldNames.add("ParentId"); 4097 fieldNames.add("Dedupe"); 4098 fieldNames.add("Deleted"); 4099 fieldNames.add("Locked"); 4100 fieldNames.add("Isdefault"); 4101 fieldNames = Collections.unmodifiableList(fieldNames); 4102 } 4103 return fieldNames; 4104 } 4105 4106 4112 public Object getByName(String name) 4113 { 4114 if (name.equals("IssueTypeId")) 4115 { 4116 return getIssueTypeId(); 4117 } 4118 if (name.equals("Name")) 4119 { 4120 return getName(); 4121 } 4122 if (name.equals("Description")) 4123 { 4124 return getDescription(); 4125 } 4126 if (name.equals("ParentId")) 4127 { 4128 return getParentId(); 4129 } 4130 if (name.equals("Dedupe")) 4131 { 4132 return Boolean.valueOf(getDedupe()); 4133 } 4134 if (name.equals("Deleted")) 4135 { 4136 return Boolean.valueOf(getDeleted()); 4137 } 4138 if (name.equals("Locked")) 4139 { 4140 return Boolean.valueOf(getLocked()); 4141 } 4142 if (name.equals("Isdefault")) 4143 { 4144 return Boolean.valueOf(getIsdefault()); 4145 } 4146 return null; 4147 } 4148 4149 4157 public Object getByPeerName(String name) 4158 { 4159 if (name.equals(IssueTypePeer.ISSUE_TYPE_ID)) 4160 { 4161 return getIssueTypeId(); 4162 } 4163 if (name.equals(IssueTypePeer.NAME)) 4164 { 4165 return getName(); 4166 } 4167 if (name.equals(IssueTypePeer.DESCRIPTION)) 4168 { 4169 return getDescription(); 4170 } 4171 if (name.equals(IssueTypePeer.PARENT_ID)) 4172 { 4173 return getParentId(); 4174 } 4175 if (name.equals(IssueTypePeer.DEDUPE)) 4176 { 4177 return Boolean.valueOf(getDedupe()); 4178 } 4179 if (name.equals(IssueTypePeer.DELETED)) 4180 { 4181 return Boolean.valueOf(getDeleted()); 4182 } 4183 if (name.equals(IssueTypePeer.LOCKED)) 4184 { 4185 return Boolean.valueOf(getLocked()); 4186 } 4187 if (name.equals(IssueTypePeer.ISDEFAULT)) 4188 { 4189 return Boolean.valueOf(getIsdefault()); 4190 } 4191 return null; 4192 } 4193 4194 4201 public Object getByPosition(int pos) 4202 { 4203 if (pos == 0) 4204 { 4205 return getIssueTypeId(); 4206 } 4207 if (pos == 1) 4208 { 4209 return getName(); 4210 } 4211 if (pos == 2) 4212 { 4213 return getDescription(); 4214 } 4215 if (pos == 3) 4216 { 4217 return getParentId(); 4218 } 4219 if (pos == 4) 4220 { 4221 return Boolean.valueOf(getDedupe()); 4222 } 4223 if (pos == 5) 4224 { 4225 return Boolean.valueOf(getDeleted()); 4226 } 4227 if (pos == 6) 4228 { 4229 return Boolean.valueOf(getLocked()); 4230 } 4231 if (pos == 7) 4232 { 4233 return Boolean.valueOf(getIsdefault()); 4234 } 4235 return null; 4236 } 4237 4238 4244 public void save() throws Exception 4245 { 4246 save(IssueTypePeer.getMapBuilder() 4247 .getDatabaseMap().getName()); 4248 } 4249 4250 4260 public void save(String dbName) throws TorqueException 4261 { 4262 Connection con = null; 4263 try 4264 { 4265 con = Transaction.begin(dbName); 4266 save(con); 4267 Transaction.commit(con); 4268 } 4269 catch(TorqueException e) 4270 { 4271 Transaction.safeRollback(con); 4272 throw e; 4273 } 4274 } 4275 4276 4278 private boolean alreadyInSave = false; 4279 4289 public void save(Connection con) throws TorqueException 4290 { 4291 if (!alreadyInSave) 4292 { 4293 alreadyInSave = true; 4294 4295 4296 4297 if (isModified()) 4299 { 4300 if (isNew()) 4301 { 4302 IssueTypePeer.doInsert((IssueType)this, con); 4303 setNew(false); 4304 } 4305 else 4306 { 4307 IssueTypePeer.doUpdate((IssueType)this, con); 4308 } 4309 4310 if (isCacheOnSave()) 4311 { 4312 IssueTypeManager.putInstance(this); 4313 } 4314 } 4315 4316 4317 if (collAttributeGroups != null) 4318 { 4319 for (int i = 0; i < collAttributeGroups.size(); i++) 4320 { 4321 ((AttributeGroup)collAttributeGroups.get(i)).save(con); 4322 } 4323 } 4324 4325 if (collIssues != null) 4326 { 4327 for (int i = 0; i < collIssues.size(); i++) 4328 { 4329 ((Issue)collIssues.get(i)).save(con); 4330 } 4331 } 4332 4333 if (collRModuleIssueTypes != null) 4334 { 4335 for (int i = 0; i < collRModuleIssueTypes.size(); i++) 4336 { 4337 ((RModuleIssueType)collRModuleIssueTypes.get(i)).save(con); 4338 } 4339 } 4340 4341 if (collMITListItems != null) 4342 { 4343 for (int i = 0; i < collMITListItems.size(); i++) 4344 { 4345 ((MITListItem)collMITListItems.get(i)).save(con); 4346 } 4347 } 4348 4349 if (collRModuleAttributes != null) 4350 { 4351 for (int i = 0; i < collRModuleAttributes.size(); i++) 4352 { 4353 ((RModuleAttribute)collRModuleAttributes.get(i)).save(con); 4354 } 4355 } 4356 4357 if (collRIssueTypeAttributes != null) 4358 { 4359 for (int i = 0; i < collRIssueTypeAttributes.size(); i++) 4360 { 4361 ((RIssueTypeAttribute)collRIssueTypeAttributes.get(i)).save(con); 4362 } 4363 } 4364 4365 if (collRModuleOptions != null) 4366 { 4367 for (int i = 0; i < collRModuleOptions.size(); i++) 4368 { 4369 ((RModuleOption)collRModuleOptions.get(i)).save(con); 4370 } 4371 } 4372 4373 if (collRIssueTypeOptions != null) 4374 { 4375 for (int i = 0; i < collRIssueTypeOptions.size(); i++) 4376 { 4377 ((RIssueTypeOption)collRIssueTypeOptions.get(i)).save(con); 4378 } 4379 } 4380 4381 if (collRModuleUserAttributes != null) 4382 { 4383 for (int i = 0; i < collRModuleUserAttributes.size(); i++) 4384 { 4385 ((RModuleUserAttribute)collRModuleUserAttributes.get(i)).save(con); 4386 } 4387 } 4388 4389 if (collQuerys != null) 4390 { 4391 for (int i = 0; i < collQuerys.size(); i++) 4392 { 4393 ((Query)collQuerys.get(i)).save(con); 4394 } 4395 } 4396 4397 if (collReports != null) 4398 { 4399 for (int i = 0; i < collReports.size(); i++) 4400 { 4401 ((Report)collReports.get(i)).save(con); 4402 } 4403 } 4404 alreadyInSave = false; 4405 } 4406 } 4407 4408 4412 protected boolean isCacheOnSave() 4413 { 4414 return true; 4415 } 4416 4417 4418 4423 public void setPrimaryKey(ObjectKey issueTypeId) 4424 throws TorqueException { 4425 setIssueTypeId(new Integer (((NumberKey)issueTypeId).intValue())); 4426 } 4427 4428 4433 public void setPrimaryKey(String key) throws TorqueException 4434 { 4435 setIssueTypeId(new Integer (key)); 4436 } 4437 4438 4439 4443 public ObjectKey getPrimaryKey() 4444 { 4445 return SimpleKey.keyFor(getIssueTypeId()); 4446 } 4447 4448 4452 public String getQueryKey() 4453 { 4454 if (getPrimaryKey() == null) 4455 { 4456 return ""; 4457 } 4458 else 4459 { 4460 return getPrimaryKey().toString(); 4461 } 4462 } 4463 4464 4468 public void setQueryKey(String key) 4469 throws TorqueException 4470 { 4471 setPrimaryKey(key); 4472 } 4473 4474 4480 public IssueType copy() throws TorqueException 4481 { 4482 IssueType copyObj = new IssueType(); 4483 copyObj.setIssueTypeId(issueTypeId); 4484 copyObj.setName(name); 4485 copyObj.setDescription(description); 4486 copyObj.setParentId(parentId); 4487 copyObj.setDedupe(dedupe); 4488 copyObj.setDeleted(deleted); 4489 copyObj.setLocked(locked); 4490 copyObj.setIsdefault(isdefault); 4491 4492 copyObj.setIssueTypeId((Integer )null); 4493 4494 4495 4496 List v = getAttributeGroups(); 4497 for (int i = 0; i < v.size(); i++) 4498 { 4499 AttributeGroup obj = (AttributeGroup) v.get(i); 4500 copyObj.addAttributeGroup(obj.copy()); 4501 } 4502 4503 4504 v = getIssues(); 4505 for (int i = 0; i < v.size(); i++) 4506 { 4507 Issue obj = (Issue) v.get(i); 4508 copyObj.addIssue(obj.copy()); 4509 } 4510 4511 4512 v = getRModuleIssueTypes(); 4513 for (int i = 0; i < v.size(); i++) 4514 { 4515 RModuleIssueType obj = (RModuleIssueType) v.get(i); 4516 copyObj.addRModuleIssueType(obj.copy()); 4517 } 4518 4519 4520 v = getMITListItems(); 4521 for (int i = 0; i < v.size(); i++) 4522 { 4523 MITListItem obj = (MITListItem) v.get(i); 4524 copyObj.addMITListItem(obj.copy()); 4525 } 4526 4527 4528 v = getRModuleAttributes(); 4529 for (int i = 0; i < v.size(); i++) 4530 { 4531 RModuleAttribute obj = (RModuleAttribute) v.get(i); 4532 copyObj.addRModuleAttribute(obj.copy()); 4533 } 4534 4535 4536 v = getRIssueTypeAttributes(); 4537 for (int i = 0; i < v.size(); i++) 4538 { 4539 RIssueTypeAttribute obj = (RIssueTypeAttribute) v.get(i); 4540 copyObj.addRIssueTypeAttribute(obj.copy()); 4541 } 4542 4543 4544 v = getRModuleOptions(); 4545 for (int i = 0; i < v.size(); i++) 4546 { 4547 RModuleOption obj = (RModuleOption) v.get(i); 4548 copyObj.addRModuleOption(obj.copy()); 4549 } 4550 4551 4552 v = getRIssueTypeOptions(); 4553 for (int i = 0; i < v.size(); i++) 4554 { 4555 RIssueTypeOption obj = (RIssueTypeOption) v.get(i); 4556 copyObj.addRIssueTypeOption(obj.copy()); 4557 } 4558 4559 4560 v = getRModuleUserAttributes(); 4561 for (int i = 0; i < v.size(); i++) 4562 { 4563 RModuleUserAttribute obj = (RModuleUserAttribute) v.get(i); 4564 copyObj.addRModuleUserAttribute(obj.copy()); 4565 } 4566 4567 4568 v = getQuerys(); 4569 for (int i = 0; i < v.size(); i++) 4570 { 4571 Query obj = (Query) v.get(i); 4572 copyObj.addQuery(obj.copy()); 4573 } 4574 4575 4576 v = getReports(); 4577 for (int i = 0; i < v.size(); i++) 4578 { 4579 Report obj = (Report) v.get(i); 4580 copyObj.addReport(obj.copy()); 4581 } 4582 return copyObj; 4583 } 4584 4585 4591 public IssueTypePeer getPeer() 4592 { 4593 return peer; 4594 } 4595 4596 public String toString() 4597 { 4598 StringBuffer str = new StringBuffer (); 4599 str.append("IssueType:\n"); 4600 str.append("IssueTypeId = ") 4601 .append(getIssueTypeId()) 4602 .append("\n"); 4603 str.append("Name = ") 4604 .append(getName()) 4605 .append("\n"); 4606 str.append("Description = ") 4607 .append(getDescription()) 4608 .append("\n"); 4609 str.append("ParentId = ") 4610 .append(getParentId()) 4611 .append("\n"); 4612 str.append("Dedupe = ") 4613 .append(getDedupe()) 4614 .append("\n"); 4615 str.append("Deleted = ") 4616 .append(getDeleted()) 4617 .append("\n"); 4618 str.append("Locked = ") 4619 .append(getLocked()) 4620 .append("\n"); 4621 str.append("Isdefault = ") 4622 .append(getIsdefault()) 4623 .append("\n"); 4624 return(str.toString()); 4625 } 4626} 4627 | Popular Tags |