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 28 29 33 public abstract class BaseRModuleAttribute extends BaseObject 34 implements org.apache.fulcrum.intake.Retrievable 35 { 36 37 private static final RModuleAttributePeer peer = 38 new RModuleAttributePeer(); 39 40 41 42 private Integer moduleId; 43 44 45 private Integer attributeId; 46 47 48 private Integer issueTypeId; 49 50 51 private String displayValue; 52 53 54 private boolean active = true; 55 56 57 private boolean required = false; 58 59 60 private int order = 0; 61 62 63 private boolean quickSearch = false; 64 65 66 private boolean defaultTextFlag = false; 67 68 69 74 public Integer getModuleId() 75 { 76 return moduleId; 77 } 78 79 80 85 public void setModuleId(Integer v) throws TorqueException 86 { 87 88 if (!ObjectUtils.equals(this.moduleId, v)) 89 { 90 this.moduleId = v; 91 setModified(true); 92 } 93 94 95 if (aModule != null && !ObjectUtils.equals(aModule.getModuleId(), v)) 96 { 97 aModule = null; 98 } 99 100 101 if (collConditions != null) 103 { 104 for (int i = 0; i < collConditions.size(); i++) 105 { 106 ((Condition) collConditions.get(i)) 107 .setModuleId(v); 108 } 109 } 110 } 111 112 117 public Integer getAttributeId() 118 { 119 return attributeId; 120 } 121 122 123 128 public void setAttributeId(Integer v) throws TorqueException 129 { 130 131 if (!ObjectUtils.equals(this.attributeId, v)) 132 { 133 this.attributeId = v; 134 setModified(true); 135 } 136 137 138 if (aAttribute != null && !ObjectUtils.equals(aAttribute.getAttributeId(), v)) 139 { 140 aAttribute = null; 141 } 142 143 144 if (collConditions != null) 146 { 147 for (int i = 0; i < collConditions.size(); i++) 148 { 149 ((Condition) collConditions.get(i)) 150 .setAttributeId(v); 151 } 152 } 153 } 154 155 160 public Integer getIssueTypeId() 161 { 162 return issueTypeId; 163 } 164 165 166 171 public void setIssueTypeId(Integer v) throws TorqueException 172 { 173 174 if (!ObjectUtils.equals(this.issueTypeId, v)) 175 { 176 this.issueTypeId = v; 177 setModified(true); 178 } 179 180 181 if (aIssueType != null && !ObjectUtils.equals(aIssueType.getIssueTypeId(), v)) 182 { 183 aIssueType = null; 184 } 185 186 187 if (collConditions != null) 189 { 190 for (int i = 0; i < collConditions.size(); i++) 191 { 192 ((Condition) collConditions.get(i)) 193 .setIssueTypeId(v); 194 } 195 } 196 } 197 198 203 public String getDisplayValue() 204 { 205 return displayValue; 206 } 207 208 209 214 public void setDisplayValue(String v) 215 { 216 217 if (!ObjectUtils.equals(this.displayValue, v)) 218 { 219 this.displayValue = v; 220 setModified(true); 221 } 222 223 224 } 225 226 231 public boolean getActive() 232 { 233 return active; 234 } 235 236 237 242 public void setActive(boolean v) 243 { 244 245 if (this.active != v) 246 { 247 this.active = v; 248 setModified(true); 249 } 250 251 252 } 253 254 259 public boolean getRequired() 260 { 261 return required; 262 } 263 264 265 270 public void setRequired(boolean v) 271 { 272 273 if (this.required != v) 274 { 275 this.required = v; 276 setModified(true); 277 } 278 279 280 } 281 282 287 public int getOrder() 288 { 289 return order; 290 } 291 292 293 298 public void setOrder(int v) 299 { 300 301 if (this.order != v) 302 { 303 this.order = v; 304 setModified(true); 305 } 306 307 308 } 309 310 315 public boolean getQuickSearch() 316 { 317 return quickSearch; 318 } 319 320 321 326 public void setQuickSearch(boolean v) 327 { 328 329 if (this.quickSearch != v) 330 { 331 this.quickSearch = v; 332 setModified(true); 333 } 334 335 336 } 337 338 343 public boolean getDefaultTextFlag() 344 { 345 return defaultTextFlag; 346 } 347 348 349 354 public void setDefaultTextFlag(boolean v) 355 { 356 357 if (this.defaultTextFlag != v) 358 { 359 this.defaultTextFlag = v; 360 setModified(true); 361 } 362 363 364 } 365 366 367 368 369 private Attribute aAttribute; 370 371 377 public void setAttribute(Attribute v) throws TorqueException 378 { 379 if (v == null) 380 { 381 setAttributeId((Integer ) null); 382 } 383 else 384 { 385 setAttributeId(v.getAttributeId()); 386 } 387 aAttribute = v; 388 } 389 390 391 397 public Attribute getAttribute() throws TorqueException 398 { 399 if ( !ObjectUtils.equals(getAttributeId(), null) ) 400 { 401 return AttributeManager.getInstance(SimpleKey.keyFor(getAttributeId())); 402 } 403 return aAttribute; 404 } 405 406 412 public void setAttributeKey(ObjectKey key) throws TorqueException 413 { 414 415 setAttributeId(new Integer (((NumberKey) key).intValue())); 416 } 417 418 419 420 private Module aModule; 421 422 428 public void setModule(Module v) throws TorqueException 429 { 430 if (v == null) 431 { 432 setModuleId((Integer ) null); 433 } 434 else 435 { 436 setModuleId(v.getModuleId()); 437 } 438 aModule = v; 439 } 440 441 442 448 public Module getModule() throws TorqueException 449 { 450 if ( !ObjectUtils.equals(getModuleId(), null) ) 451 { 452 return ModuleManager.getInstance(SimpleKey.keyFor(getModuleId())); 453 } 454 return aModule; 455 } 456 457 463 public void setModuleKey(ObjectKey key) throws TorqueException 464 { 465 466 setModuleId(new Integer (((NumberKey) key).intValue())); 467 } 468 469 470 471 private IssueType aIssueType; 472 473 479 public void setIssueType(IssueType v) throws TorqueException 480 { 481 if (v == null) 482 { 483 setIssueTypeId((Integer ) null); 484 } 485 else 486 { 487 setIssueTypeId(v.getIssueTypeId()); 488 } 489 aIssueType = v; 490 } 491 492 493 499 public IssueType getIssueType() throws TorqueException 500 { 501 if ( !ObjectUtils.equals(getIssueTypeId(), null) ) 502 { 503 return IssueTypeManager.getInstance(SimpleKey.keyFor(getIssueTypeId())); 504 } 505 return aIssueType; 506 } 507 508 514 public void setIssueTypeKey(ObjectKey key) throws TorqueException 515 { 516 517 setIssueTypeId(new Integer (((NumberKey) key).intValue())); 518 } 519 520 521 522 525 protected List collConditions; 526 527 532 protected void initConditions() 533 { 534 if (collConditions == null) 535 { 536 collConditions = new ArrayList (); 537 } 538 } 539 540 541 548 public void addCondition(Condition l) throws TorqueException 549 { 550 getConditions().add(l); 551 l.setRModuleAttribute((RModuleAttribute)this); 552 } 553 554 557 private Criteria lastConditionsCriteria = null; 558 559 566 public List getConditions() throws TorqueException 567 { 568 if (collConditions == null) 569 { 570 collConditions = getConditions(new Criteria(10)); 571 } 572 return collConditions; 573 } 574 575 586 public List getConditions(Criteria criteria) throws TorqueException 587 { 588 if (collConditions == null) 589 { 590 if (isNew()) 591 { 592 collConditions = new ArrayList (); 593 } 594 else 595 { 596 criteria.add(ConditionPeer.MODULE_ID, getModuleId() ); 597 criteria.add(ConditionPeer.ATTRIBUTE_ID, getAttributeId() ); 598 criteria.add(ConditionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 599 collConditions = ConditionPeer.doSelect(criteria); 600 } 601 } 602 else 603 { 604 if (!isNew()) 606 { 607 criteria.add(ConditionPeer.MODULE_ID, getModuleId() ); 611 criteria.add(ConditionPeer.ATTRIBUTE_ID, getAttributeId() ); 612 criteria.add(ConditionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 613 if (!lastConditionsCriteria.equals(criteria)) 614 { 615 collConditions = ConditionPeer.doSelect(criteria); 616 } 617 } 618 } 619 lastConditionsCriteria = criteria; 620 621 return collConditions; 622 } 623 624 632 public List getConditions(Connection con) throws TorqueException 633 { 634 if (collConditions == null) 635 { 636 collConditions = getConditions(new Criteria(10),con); 637 } 638 return collConditions; 639 } 640 641 653 public List getConditions(Criteria criteria,Connection con) throws TorqueException 654 { 655 if (collConditions == null) 656 { 657 if (isNew()) 658 { 659 collConditions = new ArrayList (); 660 } 661 else 662 { 663 criteria.add(ConditionPeer.MODULE_ID, getModuleId() ); 664 criteria.add(ConditionPeer.ATTRIBUTE_ID, getAttributeId() ); 665 criteria.add(ConditionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 666 collConditions = ConditionPeer.doSelect(criteria,con); 667 } 668 } 669 else 670 { 671 if (!isNew()) 673 { 674 criteria.add(ConditionPeer.MODULE_ID, getModuleId() ); 678 criteria.add(ConditionPeer.ATTRIBUTE_ID, getAttributeId() ); 679 criteria.add(ConditionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 680 if (!lastConditionsCriteria.equals(criteria)) 681 { 682 collConditions = ConditionPeer.doSelect(criteria,con); 683 } 684 } 685 } 686 lastConditionsCriteria = criteria; 687 688 return collConditions; 689 } 690 691 692 693 694 695 696 697 698 699 700 701 712 protected List getConditionsJoinRModuleAttribute(Criteria criteria) 713 throws TorqueException 714 { 715 if (collConditions == null) 716 { 717 if (isNew()) 718 { 719 collConditions = new ArrayList (); 720 } 721 else 722 { 723 criteria.add(ConditionPeer.MODULE_ID, getModuleId() ); 724 criteria.add(ConditionPeer.ATTRIBUTE_ID, getAttributeId() ); 725 criteria.add(ConditionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 726 collConditions = ConditionPeer.doSelectJoinRModuleAttribute(criteria); 727 } 728 } 729 else 730 { 731 735 criteria.add(ConditionPeer.MODULE_ID, getModuleId() ); 736 criteria.add(ConditionPeer.ATTRIBUTE_ID, getAttributeId() ); 737 criteria.add(ConditionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 738 if (!lastConditionsCriteria.equals(criteria)) 739 { 740 collConditions = ConditionPeer.doSelectJoinRModuleAttribute(criteria); 741 } 742 } 743 lastConditionsCriteria = criteria; 744 745 return collConditions; 746 } 747 748 749 750 751 752 753 754 755 756 767 protected List getConditionsJoinTransition(Criteria criteria) 768 throws TorqueException 769 { 770 if (collConditions == null) 771 { 772 if (isNew()) 773 { 774 collConditions = new ArrayList (); 775 } 776 else 777 { 778 criteria.add(ConditionPeer.MODULE_ID, getModuleId() ); 779 criteria.add(ConditionPeer.ATTRIBUTE_ID, getAttributeId() ); 780 criteria.add(ConditionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 781 collConditions = ConditionPeer.doSelectJoinTransition(criteria); 782 } 783 } 784 else 785 { 786 790 criteria.add(ConditionPeer.MODULE_ID, getModuleId() ); 791 criteria.add(ConditionPeer.ATTRIBUTE_ID, getAttributeId() ); 792 criteria.add(ConditionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 793 if (!lastConditionsCriteria.equals(criteria)) 794 { 795 collConditions = ConditionPeer.doSelectJoinTransition(criteria); 796 } 797 } 798 lastConditionsCriteria = criteria; 799 800 return collConditions; 801 } 802 803 804 805 806 807 808 809 810 811 822 protected List getConditionsJoinAttribute(Criteria criteria) 823 throws TorqueException 824 { 825 if (collConditions == null) 826 { 827 if (isNew()) 828 { 829 collConditions = new ArrayList (); 830 } 831 else 832 { 833 criteria.add(ConditionPeer.MODULE_ID, getModuleId() ); 834 criteria.add(ConditionPeer.ATTRIBUTE_ID, getAttributeId() ); 835 criteria.add(ConditionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 836 collConditions = ConditionPeer.doSelectJoinAttribute(criteria); 837 } 838 } 839 else 840 { 841 845 criteria.add(ConditionPeer.MODULE_ID, getModuleId() ); 846 criteria.add(ConditionPeer.ATTRIBUTE_ID, getAttributeId() ); 847 criteria.add(ConditionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 848 if (!lastConditionsCriteria.equals(criteria)) 849 { 850 collConditions = ConditionPeer.doSelectJoinAttribute(criteria); 851 } 852 } 853 lastConditionsCriteria = criteria; 854 855 return collConditions; 856 } 857 858 859 860 861 862 863 864 865 866 877 protected List getConditionsJoinAttributeOption(Criteria criteria) 878 throws TorqueException 879 { 880 if (collConditions == null) 881 { 882 if (isNew()) 883 { 884 collConditions = new ArrayList (); 885 } 886 else 887 { 888 criteria.add(ConditionPeer.MODULE_ID, getModuleId() ); 889 criteria.add(ConditionPeer.ATTRIBUTE_ID, getAttributeId() ); 890 criteria.add(ConditionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 891 collConditions = ConditionPeer.doSelectJoinAttributeOption(criteria); 892 } 893 } 894 else 895 { 896 900 criteria.add(ConditionPeer.MODULE_ID, getModuleId() ); 901 criteria.add(ConditionPeer.ATTRIBUTE_ID, getAttributeId() ); 902 criteria.add(ConditionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 903 if (!lastConditionsCriteria.equals(criteria)) 904 { 905 collConditions = ConditionPeer.doSelectJoinAttributeOption(criteria); 906 } 907 } 908 lastConditionsCriteria = criteria; 909 910 return collConditions; 911 } 912 913 914 915 916 917 918 919 920 921 932 protected List getConditionsJoinRModuleIssueType(Criteria criteria) 933 throws TorqueException 934 { 935 if (collConditions == null) 936 { 937 if (isNew()) 938 { 939 collConditions = new ArrayList (); 940 } 941 else 942 { 943 criteria.add(ConditionPeer.MODULE_ID, getModuleId() ); 944 criteria.add(ConditionPeer.ATTRIBUTE_ID, getAttributeId() ); 945 criteria.add(ConditionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 946 collConditions = ConditionPeer.doSelectJoinRModuleIssueType(criteria); 947 } 948 } 949 else 950 { 951 955 criteria.add(ConditionPeer.MODULE_ID, getModuleId() ); 956 criteria.add(ConditionPeer.ATTRIBUTE_ID, getAttributeId() ); 957 criteria.add(ConditionPeer.ISSUE_TYPE_ID, getIssueTypeId() ); 958 if (!lastConditionsCriteria.equals(criteria)) 959 { 960 collConditions = ConditionPeer.doSelectJoinRModuleIssueType(criteria); 961 } 962 } 963 lastConditionsCriteria = criteria; 964 965 return collConditions; 966 } 967 968 969 970 971 private static List fieldNames = null; 972 973 978 public static synchronized List getFieldNames() 979 { 980 if (fieldNames == null) 981 { 982 fieldNames = new ArrayList (); 983 fieldNames.add("ModuleId"); 984 fieldNames.add("AttributeId"); 985 fieldNames.add("IssueTypeId"); 986 fieldNames.add("DisplayValue"); 987 fieldNames.add("Active"); 988 fieldNames.add("Required"); 989 fieldNames.add("Order"); 990 fieldNames.add("QuickSearch"); 991 fieldNames.add("DefaultTextFlag"); 992 fieldNames = Collections.unmodifiableList(fieldNames); 993 } 994 return fieldNames; 995 } 996 997 1003 public Object getByName(String name) 1004 { 1005 if (name.equals("ModuleId")) 1006 { 1007 return getModuleId(); 1008 } 1009 if (name.equals("AttributeId")) 1010 { 1011 return getAttributeId(); 1012 } 1013 if (name.equals("IssueTypeId")) 1014 { 1015 return getIssueTypeId(); 1016 } 1017 if (name.equals("DisplayValue")) 1018 { 1019 return getDisplayValue(); 1020 } 1021 if (name.equals("Active")) 1022 { 1023 return Boolean.valueOf(getActive()); 1024 } 1025 if (name.equals("Required")) 1026 { 1027 return Boolean.valueOf(getRequired()); 1028 } 1029 if (name.equals("Order")) 1030 { 1031 return new Integer (getOrder()); 1032 } 1033 if (name.equals("QuickSearch")) 1034 { 1035 return Boolean.valueOf(getQuickSearch()); 1036 } 1037 if (name.equals("DefaultTextFlag")) 1038 { 1039 return Boolean.valueOf(getDefaultTextFlag()); 1040 } 1041 return null; 1042 } 1043 1044 1052 public Object getByPeerName(String name) 1053 { 1054 if (name.equals(RModuleAttributePeer.MODULE_ID)) 1055 { 1056 return getModuleId(); 1057 } 1058 if (name.equals(RModuleAttributePeer.ATTRIBUTE_ID)) 1059 { 1060 return getAttributeId(); 1061 } 1062 if (name.equals(RModuleAttributePeer.ISSUE_TYPE_ID)) 1063 { 1064 return getIssueTypeId(); 1065 } 1066 if (name.equals(RModuleAttributePeer.DISPLAY_VALUE)) 1067 { 1068 return getDisplayValue(); 1069 } 1070 if (name.equals(RModuleAttributePeer.ACTIVE)) 1071 { 1072 return Boolean.valueOf(getActive()); 1073 } 1074 if (name.equals(RModuleAttributePeer.REQUIRED)) 1075 { 1076 return Boolean.valueOf(getRequired()); 1077 } 1078 if (name.equals(RModuleAttributePeer.PREFERRED_ORDER)) 1079 { 1080 return new Integer (getOrder()); 1081 } 1082 if (name.equals(RModuleAttributePeer.QUICK_SEARCH)) 1083 { 1084 return Boolean.valueOf(getQuickSearch()); 1085 } 1086 if (name.equals(RModuleAttributePeer.DEFAULT_TEXT_FLAG)) 1087 { 1088 return Boolean.valueOf(getDefaultTextFlag()); 1089 } 1090 return null; 1091 } 1092 1093 1100 public Object getByPosition(int pos) 1101 { 1102 if (pos == 0) 1103 { 1104 return getModuleId(); 1105 } 1106 if (pos == 1) 1107 { 1108 return getAttributeId(); 1109 } 1110 if (pos == 2) 1111 { 1112 return getIssueTypeId(); 1113 } 1114 if (pos == 3) 1115 { 1116 return getDisplayValue(); 1117 } 1118 if (pos == 4) 1119 { 1120 return Boolean.valueOf(getActive()); 1121 } 1122 if (pos == 5) 1123 { 1124 return Boolean.valueOf(getRequired()); 1125 } 1126 if (pos == 6) 1127 { 1128 return new Integer (getOrder()); 1129 } 1130 if (pos == 7) 1131 { 1132 return Boolean.valueOf(getQuickSearch()); 1133 } 1134 if (pos == 8) 1135 { 1136 return Boolean.valueOf(getDefaultTextFlag()); 1137 } 1138 return null; 1139 } 1140 1141 1147 public void save() throws Exception 1148 { 1149 save(RModuleAttributePeer.getMapBuilder() 1150 .getDatabaseMap().getName()); 1151 } 1152 1153 1163 public void save(String dbName) throws TorqueException 1164 { 1165 Connection con = null; 1166 try 1167 { 1168 con = Transaction.begin(dbName); 1169 save(con); 1170 Transaction.commit(con); 1171 } 1172 catch(TorqueException e) 1173 { 1174 Transaction.safeRollback(con); 1175 throw e; 1176 } 1177 } 1178 1179 1181 private boolean alreadyInSave = false; 1182 1192 public void save(Connection con) throws TorqueException 1193 { 1194 if (!alreadyInSave) 1195 { 1196 alreadyInSave = true; 1197 1198 1199 1200 if (isModified()) 1202 { 1203 if (isNew()) 1204 { 1205 RModuleAttributePeer.doInsert((RModuleAttribute)this, con); 1206 setNew(false); 1207 } 1208 else 1209 { 1210 RModuleAttributePeer.doUpdate((RModuleAttribute)this, con); 1211 } 1212 1213 if (isCacheOnSave()) 1214 { 1215 RModuleAttributeManager.putInstance(this); 1216 } 1217 } 1218 1219 1220 if (collConditions != null) 1221 { 1222 for (int i = 0; i < collConditions.size(); i++) 1223 { 1224 ((Condition)collConditions.get(i)).save(con); 1225 } 1226 } 1227 alreadyInSave = false; 1228 } 1229 } 1230 1231 1235 protected boolean isCacheOnSave() 1236 { 1237 return true; 1238 } 1239 1240 1241 1242 private final SimpleKey[] pks = new SimpleKey[3]; 1243 private final ComboKey comboPK = new ComboKey(pks); 1244 1245 1250 public void setPrimaryKey(ObjectKey key) throws TorqueException 1251 { 1252 SimpleKey[] keys = (SimpleKey[]) key.getValue(); 1253 SimpleKey tmpKey = null; 1254 setModuleId(new Integer (((NumberKey)keys[0]).intValue())); 1255 setAttributeId(new Integer (((NumberKey)keys[1]).intValue())); 1256 setIssueTypeId(new Integer (((NumberKey)keys[2]).intValue())); 1257 } 1258 1259 1266 public void setPrimaryKey( Integer moduleId, Integer attributeId, Integer issueTypeId) 1267 throws TorqueException 1268 { 1269 setModuleId(moduleId); 1270 setAttributeId(attributeId); 1271 setIssueTypeId(issueTypeId); 1272 } 1273 1274 1277 public void setPrimaryKey(String key) throws TorqueException 1278 { 1279 setPrimaryKey(new ComboKey(key)); 1280 } 1281 1282 1286 public ObjectKey getPrimaryKey() 1287 { 1288 pks[0] = SimpleKey.keyFor(getModuleId()); 1289 pks[1] = SimpleKey.keyFor(getAttributeId()); 1290 pks[2] = SimpleKey.keyFor(getIssueTypeId()); 1291 return comboPK; 1292 } 1293 1294 1298 public String getQueryKey() 1299 { 1300 if (getPrimaryKey() == null) 1301 { 1302 return ""; 1303 } 1304 else 1305 { 1306 return getPrimaryKey().toString(); 1307 } 1308 } 1309 1310 1314 public void setQueryKey(String key) 1315 throws TorqueException 1316 { 1317 setPrimaryKey(key); 1318 } 1319 1320 1326 public RModuleAttribute copy() throws TorqueException 1327 { 1328 RModuleAttribute copyObj = new RModuleAttribute(); 1329 copyObj.setModuleId(moduleId); 1330 copyObj.setAttributeId(attributeId); 1331 copyObj.setIssueTypeId(issueTypeId); 1332 copyObj.setDisplayValue(displayValue); 1333 copyObj.setActive(active); 1334 copyObj.setRequired(required); 1335 copyObj.setOrder(order); 1336 copyObj.setQuickSearch(quickSearch); 1337 copyObj.setDefaultTextFlag(defaultTextFlag); 1338 1339 copyObj.setModuleId((Integer )null); 1340 copyObj.setAttributeId((Integer )null); 1341 copyObj.setIssueTypeId((Integer )null); 1342 1343 1344 1345 List v = getConditions(); 1346 for (int i = 0; i < v.size(); i++) 1347 { 1348 Condition obj = (Condition) v.get(i); 1349 copyObj.addCondition(obj.copy()); 1350 } 1351 return copyObj; 1352 } 1353 1354 1360 public RModuleAttributePeer getPeer() 1361 { 1362 return peer; 1363 } 1364 1365 public String toString() 1366 { 1367 StringBuffer str = new StringBuffer (); 1368 str.append("RModuleAttribute:\n"); 1369 str.append("ModuleId = ") 1370 .append(getModuleId()) 1371 .append("\n"); 1372 str.append("AttributeId = ") 1373 .append(getAttributeId()) 1374 .append("\n"); 1375 str.append("IssueTypeId = ") 1376 .append(getIssueTypeId()) 1377 .append("\n"); 1378 str.append("DisplayValue = ") 1379 .append(getDisplayValue()) 1380 .append("\n"); 1381 str.append("Active = ") 1382 .append(getActive()) 1383 .append("\n"); 1384 str.append("Required = ") 1385 .append(getRequired()) 1386 .append("\n"); 1387 str.append("Order = ") 1388 .append(getOrder()) 1389 .append("\n"); 1390 str.append("QuickSearch = ") 1391 .append(getQuickSearch()) 1392 .append("\n"); 1393 str.append("DefaultTextFlag = ") 1394 .append(getDefaultTextFlag()) 1395 .append("\n"); 1396 return(str.toString()); 1397 } 1398} 1399 | Popular Tags |