1 package org.campware.cream.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.turbine.om.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 30 31 32 40 public abstract class BasePrintSubscription extends BaseObject 41 implements org.apache.turbine.om.Retrievable 42 { 43 44 private static final PrintSubscriptionPeer peer = 45 new PrintSubscriptionPeer(); 46 47 48 49 private int printSubsId; 50 51 52 private String printSubsCode = "AUTO"; 53 54 55 private int status = 30; 56 57 58 private int priority = 30; 59 60 61 private Date issuedDate; 62 63 64 private Date closedDate; 65 66 67 private int sorderId = 1000; 68 69 70 private int customerId = 1000; 71 72 73 private int recipientId = 1000; 74 75 76 private int carrierId = 1000; 77 78 79 private int projectId = 1000; 80 81 82 private int productId = 1000; 83 84 85 private int quantity = 1; 86 87 88 private Date startDate; 89 90 91 private Date endDate; 92 93 94 private String subject = "---"; 95 96 97 private String notes; 98 99 100 private Date created; 101 102 103 private Date modified; 104 105 106 private String createdBy; 107 108 109 private String modifiedBy; 110 111 112 117 public int getPrintSubsId() 118 { 119 return printSubsId; 120 } 121 122 123 128 public void setPrintSubsId(int v) 129 { 130 131 if (this.printSubsId != v) 132 { 133 this.printSubsId = v; 134 setModified(true); 135 } 136 137 138 } 139 140 145 public String getPrintSubsCode() 146 { 147 return printSubsCode; 148 } 149 150 151 156 public void setPrintSubsCode(String v) 157 { 158 159 if (!ObjectUtils.equals(this.printSubsCode, v)) 160 { 161 this.printSubsCode = v; 162 setModified(true); 163 } 164 165 166 } 167 168 173 public int getStatus() 174 { 175 return status; 176 } 177 178 179 184 public void setStatus(int v) 185 { 186 187 if (this.status != v) 188 { 189 this.status = v; 190 setModified(true); 191 } 192 193 194 } 195 196 201 public int getPriority() 202 { 203 return priority; 204 } 205 206 207 212 public void setPriority(int v) 213 { 214 215 if (this.priority != v) 216 { 217 this.priority = v; 218 setModified(true); 219 } 220 221 222 } 223 224 229 public Date getIssuedDate() 230 { 231 return issuedDate; 232 } 233 234 235 240 public void setIssuedDate(Date v) 241 { 242 243 if (!ObjectUtils.equals(this.issuedDate, v)) 244 { 245 this.issuedDate = v; 246 setModified(true); 247 } 248 249 250 } 251 252 257 public Date getClosedDate() 258 { 259 return closedDate; 260 } 261 262 263 268 public void setClosedDate(Date v) 269 { 270 271 if (!ObjectUtils.equals(this.closedDate, v)) 272 { 273 this.closedDate = v; 274 setModified(true); 275 } 276 277 278 } 279 280 285 public int getSorderId() 286 { 287 return sorderId; 288 } 289 290 291 296 public void setSorderId(int v) throws TorqueException 297 { 298 299 if (this.sorderId != v) 300 { 301 this.sorderId = v; 302 setModified(true); 303 } 304 305 306 if (aSorder != null && !(aSorder.getSorderId() == v)) 307 { 308 aSorder = null; 309 } 310 311 } 312 313 318 public int getCustomerId() 319 { 320 return customerId; 321 } 322 323 324 329 public void setCustomerId(int v) throws TorqueException 330 { 331 332 if (this.customerId != v) 333 { 334 this.customerId = v; 335 setModified(true); 336 } 337 338 339 if (aCustomerRelatedByCustomerId != null && !(aCustomerRelatedByCustomerId.getCustomerId() == v)) 340 { 341 aCustomerRelatedByCustomerId = null; 342 } 343 344 } 345 346 351 public int getRecipientId() 352 { 353 return recipientId; 354 } 355 356 357 362 public void setRecipientId(int v) throws TorqueException 363 { 364 365 if (this.recipientId != v) 366 { 367 this.recipientId = v; 368 setModified(true); 369 } 370 371 372 if (aCustomerRelatedByRecipientId != null && !(aCustomerRelatedByRecipientId.getCustomerId() == v)) 373 { 374 aCustomerRelatedByRecipientId = null; 375 } 376 377 } 378 379 384 public int getCarrierId() 385 { 386 return carrierId; 387 } 388 389 390 395 public void setCarrierId(int v) throws TorqueException 396 { 397 398 if (this.carrierId != v) 399 { 400 this.carrierId = v; 401 setModified(true); 402 } 403 404 405 if (aCarrier != null && !(aCarrier.getCarrierId() == v)) 406 { 407 aCarrier = null; 408 } 409 410 } 411 412 417 public int getProjectId() 418 { 419 return projectId; 420 } 421 422 423 428 public void setProjectId(int v) throws TorqueException 429 { 430 431 if (this.projectId != v) 432 { 433 this.projectId = v; 434 setModified(true); 435 } 436 437 438 if (aProject != null && !(aProject.getProjectId() == v)) 439 { 440 aProject = null; 441 } 442 443 } 444 445 450 public int getProductId() 451 { 452 return productId; 453 } 454 455 456 461 public void setProductId(int v) throws TorqueException 462 { 463 464 if (this.productId != v) 465 { 466 this.productId = v; 467 setModified(true); 468 } 469 470 471 if (aProduct != null && !(aProduct.getProductId() == v)) 472 { 473 aProduct = null; 474 } 475 476 } 477 478 483 public int getQuantity() 484 { 485 return quantity; 486 } 487 488 489 494 public void setQuantity(int v) 495 { 496 497 if (this.quantity != v) 498 { 499 this.quantity = v; 500 setModified(true); 501 } 502 503 504 } 505 506 511 public Date getStartDate() 512 { 513 return startDate; 514 } 515 516 517 522 public void setStartDate(Date v) 523 { 524 525 if (!ObjectUtils.equals(this.startDate, v)) 526 { 527 this.startDate = v; 528 setModified(true); 529 } 530 531 532 } 533 534 539 public Date getEndDate() 540 { 541 return endDate; 542 } 543 544 545 550 public void setEndDate(Date v) 551 { 552 553 if (!ObjectUtils.equals(this.endDate, v)) 554 { 555 this.endDate = v; 556 setModified(true); 557 } 558 559 560 } 561 562 567 public String getSubject() 568 { 569 return subject; 570 } 571 572 573 578 public void setSubject(String v) 579 { 580 581 if (!ObjectUtils.equals(this.subject, v)) 582 { 583 this.subject = v; 584 setModified(true); 585 } 586 587 588 } 589 590 595 public String getNotes() 596 { 597 return notes; 598 } 599 600 601 606 public void setNotes(String v) 607 { 608 609 if (!ObjectUtils.equals(this.notes, v)) 610 { 611 this.notes = v; 612 setModified(true); 613 } 614 615 616 } 617 618 623 public Date getCreated() 624 { 625 return created; 626 } 627 628 629 634 public void setCreated(Date v) 635 { 636 637 if (!ObjectUtils.equals(this.created, v)) 638 { 639 this.created = v; 640 setModified(true); 641 } 642 643 644 } 645 646 651 public Date getModified() 652 { 653 return modified; 654 } 655 656 657 662 public void setModified(Date v) 663 { 664 665 if (!ObjectUtils.equals(this.modified, v)) 666 { 667 this.modified = v; 668 setModified(true); 669 } 670 671 672 } 673 674 679 public String getCreatedBy() 680 { 681 return createdBy; 682 } 683 684 685 690 public void setCreatedBy(String v) 691 { 692 693 if (!ObjectUtils.equals(this.createdBy, v)) 694 { 695 this.createdBy = v; 696 setModified(true); 697 } 698 699 700 } 701 702 707 public String getModifiedBy() 708 { 709 return modifiedBy; 710 } 711 712 713 718 public void setModifiedBy(String v) 719 { 720 721 if (!ObjectUtils.equals(this.modifiedBy, v)) 722 { 723 this.modifiedBy = v; 724 setModified(true); 725 } 726 727 728 } 729 730 731 732 733 734 private Customer aCustomerRelatedByCustomerId; 735 736 742 public void setCustomerRelatedByCustomerId(Customer v) throws TorqueException 743 { 744 if (v == null) 745 { 746 setCustomerId( 1000); 747 } 748 else 749 { 750 setCustomerId(v.getCustomerId()); 751 } 752 aCustomerRelatedByCustomerId = v; 753 } 754 755 756 762 public Customer getCustomerRelatedByCustomerId() throws TorqueException 763 { 764 if (aCustomerRelatedByCustomerId == null && (this.customerId != 0)) 765 { 766 aCustomerRelatedByCustomerId = CustomerPeer.retrieveByPK(SimpleKey.keyFor(this.customerId)); 767 768 777 } 778 return aCustomerRelatedByCustomerId; 779 } 780 781 787 public void setCustomerRelatedByCustomerIdKey(ObjectKey key) throws TorqueException 788 { 789 790 setCustomerId(((NumberKey) key).intValue()); 791 } 792 793 794 795 796 private Customer aCustomerRelatedByRecipientId; 797 798 804 public void setCustomerRelatedByRecipientId(Customer v) throws TorqueException 805 { 806 if (v == null) 807 { 808 setRecipientId( 1000); 809 } 810 else 811 { 812 setRecipientId(v.getCustomerId()); 813 } 814 aCustomerRelatedByRecipientId = v; 815 } 816 817 818 824 public Customer getCustomerRelatedByRecipientId() throws TorqueException 825 { 826 if (aCustomerRelatedByRecipientId == null && (this.recipientId != 0)) 827 { 828 aCustomerRelatedByRecipientId = CustomerPeer.retrieveByPK(SimpleKey.keyFor(this.recipientId)); 829 830 839 } 840 return aCustomerRelatedByRecipientId; 841 } 842 843 849 public void setCustomerRelatedByRecipientIdKey(ObjectKey key) throws TorqueException 850 { 851 852 setRecipientId(((NumberKey) key).intValue()); 853 } 854 855 856 857 858 private Carrier aCarrier; 859 860 866 public void setCarrier(Carrier v) throws TorqueException 867 { 868 if (v == null) 869 { 870 setCarrierId( 1000); 871 } 872 else 873 { 874 setCarrierId(v.getCarrierId()); 875 } 876 aCarrier = v; 877 } 878 879 880 886 public Carrier getCarrier() throws TorqueException 887 { 888 if (aCarrier == null && (this.carrierId != 0)) 889 { 890 aCarrier = CarrierPeer.retrieveByPK(SimpleKey.keyFor(this.carrierId)); 891 892 901 } 902 return aCarrier; 903 } 904 905 911 public void setCarrierKey(ObjectKey key) throws TorqueException 912 { 913 914 setCarrierId(((NumberKey) key).intValue()); 915 } 916 917 918 919 920 private Project aProject; 921 922 928 public void setProject(Project v) throws TorqueException 929 { 930 if (v == null) 931 { 932 setProjectId( 1000); 933 } 934 else 935 { 936 setProjectId(v.getProjectId()); 937 } 938 aProject = v; 939 } 940 941 942 948 public Project getProject() throws TorqueException 949 { 950 if (aProject == null && (this.projectId != 0)) 951 { 952 aProject = ProjectPeer.retrieveByPK(SimpleKey.keyFor(this.projectId)); 953 954 963 } 964 return aProject; 965 } 966 967 973 public void setProjectKey(ObjectKey key) throws TorqueException 974 { 975 976 setProjectId(((NumberKey) key).intValue()); 977 } 978 979 980 981 982 private Product aProduct; 983 984 990 public void setProduct(Product v) throws TorqueException 991 { 992 if (v == null) 993 { 994 setProductId( 1000); 995 } 996 else 997 { 998 setProductId(v.getProductId()); 999 } 1000 aProduct = v; 1001 } 1002 1003 1004 1010 public Product getProduct() throws TorqueException 1011 { 1012 if (aProduct == null && (this.productId != 0)) 1013 { 1014 aProduct = ProductPeer.retrieveByPK(SimpleKey.keyFor(this.productId)); 1015 1016 1025 } 1026 return aProduct; 1027 } 1028 1029 1035 public void setProductKey(ObjectKey key) throws TorqueException 1036 { 1037 1038 setProductId(((NumberKey) key).intValue()); 1039 } 1040 1041 1042 1043 1044 private Sorder aSorder; 1045 1046 1052 public void setSorder(Sorder v) throws TorqueException 1053 { 1054 if (v == null) 1055 { 1056 setSorderId( 1000); 1057 } 1058 else 1059 { 1060 setSorderId(v.getSorderId()); 1061 } 1062 aSorder = v; 1063 } 1064 1065 1066 1072 public Sorder getSorder() throws TorqueException 1073 { 1074 if (aSorder == null && (this.sorderId != 0)) 1075 { 1076 aSorder = SorderPeer.retrieveByPK(SimpleKey.keyFor(this.sorderId)); 1077 1078 1087 } 1088 return aSorder; 1089 } 1090 1091 1097 public void setSorderKey(ObjectKey key) throws TorqueException 1098 { 1099 1100 setSorderId(((NumberKey) key).intValue()); 1101 } 1102 1103 1104 private static List fieldNames = null; 1105 1106 1111 public static synchronized List getFieldNames() 1112 { 1113 if (fieldNames == null) 1114 { 1115 fieldNames = new ArrayList (); 1116 fieldNames.add("PrintSubsId"); 1117 fieldNames.add("PrintSubsCode"); 1118 fieldNames.add("Status"); 1119 fieldNames.add("Priority"); 1120 fieldNames.add("IssuedDate"); 1121 fieldNames.add("ClosedDate"); 1122 fieldNames.add("SorderId"); 1123 fieldNames.add("CustomerId"); 1124 fieldNames.add("RecipientId"); 1125 fieldNames.add("CarrierId"); 1126 fieldNames.add("ProjectId"); 1127 fieldNames.add("ProductId"); 1128 fieldNames.add("Quantity"); 1129 fieldNames.add("StartDate"); 1130 fieldNames.add("EndDate"); 1131 fieldNames.add("Subject"); 1132 fieldNames.add("Notes"); 1133 fieldNames.add("Created"); 1134 fieldNames.add("Modified"); 1135 fieldNames.add("CreatedBy"); 1136 fieldNames.add("ModifiedBy"); 1137 fieldNames = Collections.unmodifiableList(fieldNames); 1138 } 1139 return fieldNames; 1140 } 1141 1142 1148 public Object getByName(String name) 1149 { 1150 if (name.equals("PrintSubsId")) 1151 { 1152 return new Integer (getPrintSubsId()); 1153 } 1154 if (name.equals("PrintSubsCode")) 1155 { 1156 return getPrintSubsCode(); 1157 } 1158 if (name.equals("Status")) 1159 { 1160 return new Integer (getStatus()); 1161 } 1162 if (name.equals("Priority")) 1163 { 1164 return new Integer (getPriority()); 1165 } 1166 if (name.equals("IssuedDate")) 1167 { 1168 return getIssuedDate(); 1169 } 1170 if (name.equals("ClosedDate")) 1171 { 1172 return getClosedDate(); 1173 } 1174 if (name.equals("SorderId")) 1175 { 1176 return new Integer (getSorderId()); 1177 } 1178 if (name.equals("CustomerId")) 1179 { 1180 return new Integer (getCustomerId()); 1181 } 1182 if (name.equals("RecipientId")) 1183 { 1184 return new Integer (getRecipientId()); 1185 } 1186 if (name.equals("CarrierId")) 1187 { 1188 return new Integer (getCarrierId()); 1189 } 1190 if (name.equals("ProjectId")) 1191 { 1192 return new Integer (getProjectId()); 1193 } 1194 if (name.equals("ProductId")) 1195 { 1196 return new Integer (getProductId()); 1197 } 1198 if (name.equals("Quantity")) 1199 { 1200 return new Integer (getQuantity()); 1201 } 1202 if (name.equals("StartDate")) 1203 { 1204 return getStartDate(); 1205 } 1206 if (name.equals("EndDate")) 1207 { 1208 return getEndDate(); 1209 } 1210 if (name.equals("Subject")) 1211 { 1212 return getSubject(); 1213 } 1214 if (name.equals("Notes")) 1215 { 1216 return getNotes(); 1217 } 1218 if (name.equals("Created")) 1219 { 1220 return getCreated(); 1221 } 1222 if (name.equals("Modified")) 1223 { 1224 return getModified(); 1225 } 1226 if (name.equals("CreatedBy")) 1227 { 1228 return getCreatedBy(); 1229 } 1230 if (name.equals("ModifiedBy")) 1231 { 1232 return getModifiedBy(); 1233 } 1234 return null; 1235 } 1236 1237 1245 public Object getByPeerName(String name) 1246 { 1247 if (name.equals(PrintSubscriptionPeer.PRINT_SUBS_ID)) 1248 { 1249 return new Integer (getPrintSubsId()); 1250 } 1251 if (name.equals(PrintSubscriptionPeer.PRINT_SUBS_CODE)) 1252 { 1253 return getPrintSubsCode(); 1254 } 1255 if (name.equals(PrintSubscriptionPeer.STATUS)) 1256 { 1257 return new Integer (getStatus()); 1258 } 1259 if (name.equals(PrintSubscriptionPeer.PRIORITY)) 1260 { 1261 return new Integer (getPriority()); 1262 } 1263 if (name.equals(PrintSubscriptionPeer.ISSUED_DATE)) 1264 { 1265 return getIssuedDate(); 1266 } 1267 if (name.equals(PrintSubscriptionPeer.CLOSED_DATE)) 1268 { 1269 return getClosedDate(); 1270 } 1271 if (name.equals(PrintSubscriptionPeer.SORDER_ID)) 1272 { 1273 return new Integer (getSorderId()); 1274 } 1275 if (name.equals(PrintSubscriptionPeer.CUSTOMER_ID)) 1276 { 1277 return new Integer (getCustomerId()); 1278 } 1279 if (name.equals(PrintSubscriptionPeer.RECIPIENT_ID)) 1280 { 1281 return new Integer (getRecipientId()); 1282 } 1283 if (name.equals(PrintSubscriptionPeer.CARRIER_ID)) 1284 { 1285 return new Integer (getCarrierId()); 1286 } 1287 if (name.equals(PrintSubscriptionPeer.PROJECT_ID)) 1288 { 1289 return new Integer (getProjectId()); 1290 } 1291 if (name.equals(PrintSubscriptionPeer.PRODUCT_ID)) 1292 { 1293 return new Integer (getProductId()); 1294 } 1295 if (name.equals(PrintSubscriptionPeer.QUANTITY)) 1296 { 1297 return new Integer (getQuantity()); 1298 } 1299 if (name.equals(PrintSubscriptionPeer.START_DATE)) 1300 { 1301 return getStartDate(); 1302 } 1303 if (name.equals(PrintSubscriptionPeer.END_DATE)) 1304 { 1305 return getEndDate(); 1306 } 1307 if (name.equals(PrintSubscriptionPeer.SUBJECT)) 1308 { 1309 return getSubject(); 1310 } 1311 if (name.equals(PrintSubscriptionPeer.NOTES)) 1312 { 1313 return getNotes(); 1314 } 1315 if (name.equals(PrintSubscriptionPeer.CREATED)) 1316 { 1317 return getCreated(); 1318 } 1319 if (name.equals(PrintSubscriptionPeer.MODIFIED)) 1320 { 1321 return getModified(); 1322 } 1323 if (name.equals(PrintSubscriptionPeer.CREATED_BY)) 1324 { 1325 return getCreatedBy(); 1326 } 1327 if (name.equals(PrintSubscriptionPeer.MODIFIED_BY)) 1328 { 1329 return getModifiedBy(); 1330 } 1331 return null; 1332 } 1333 1334 1341 public Object getByPosition(int pos) 1342 { 1343 if (pos == 0) 1344 { 1345 return new Integer (getPrintSubsId()); 1346 } 1347 if (pos == 1) 1348 { 1349 return getPrintSubsCode(); 1350 } 1351 if (pos == 2) 1352 { 1353 return new Integer (getStatus()); 1354 } 1355 if (pos == 3) 1356 { 1357 return new Integer (getPriority()); 1358 } 1359 if (pos == 4) 1360 { 1361 return getIssuedDate(); 1362 } 1363 if (pos == 5) 1364 { 1365 return getClosedDate(); 1366 } 1367 if (pos == 6) 1368 { 1369 return new Integer (getSorderId()); 1370 } 1371 if (pos == 7) 1372 { 1373 return new Integer (getCustomerId()); 1374 } 1375 if (pos == 8) 1376 { 1377 return new Integer (getRecipientId()); 1378 } 1379 if (pos == 9) 1380 { 1381 return new Integer (getCarrierId()); 1382 } 1383 if (pos == 10) 1384 { 1385 return new Integer (getProjectId()); 1386 } 1387 if (pos == 11) 1388 { 1389 return new Integer (getProductId()); 1390 } 1391 if (pos == 12) 1392 { 1393 return new Integer (getQuantity()); 1394 } 1395 if (pos == 13) 1396 { 1397 return getStartDate(); 1398 } 1399 if (pos == 14) 1400 { 1401 return getEndDate(); 1402 } 1403 if (pos == 15) 1404 { 1405 return getSubject(); 1406 } 1407 if (pos == 16) 1408 { 1409 return getNotes(); 1410 } 1411 if (pos == 17) 1412 { 1413 return getCreated(); 1414 } 1415 if (pos == 18) 1416 { 1417 return getModified(); 1418 } 1419 if (pos == 19) 1420 { 1421 return getCreatedBy(); 1422 } 1423 if (pos == 20) 1424 { 1425 return getModifiedBy(); 1426 } 1427 return null; 1428 } 1429 1430 1436 public void save() throws Exception  1437 { 1438 save(PrintSubscriptionPeer.getMapBuilder() 1439 .getDatabaseMap().getName()); 1440 } 1441 1442 1452 public void save(String dbName) throws TorqueException 1453 { 1454 Connection con = null; 1455 try 1456 { 1457 con = Transaction.begin(dbName); 1458 save(con); 1459 Transaction.commit(con); 1460 } 1461 catch(TorqueException e) 1462 { 1463 Transaction.safeRollback(con); 1464 throw e; 1465 } 1466 } 1467 1468 1470 private boolean alreadyInSave = false; 1471 1481 public void save(Connection con) throws TorqueException 1482 { 1483 if (!alreadyInSave) 1484 { 1485 alreadyInSave = true; 1486 1487 1488 1489 if (isModified()) 1491 { 1492 if (isNew()) 1493 { 1494 PrintSubscriptionPeer.doInsert((PrintSubscription) this, con); 1495 setNew(false); 1496 } 1497 else 1498 { 1499 PrintSubscriptionPeer.doUpdate((PrintSubscription) this, con); 1500 } 1501 } 1502 1503 alreadyInSave = false; 1504 } 1505 } 1506 1507 1508 1513 public void setPrimaryKey(ObjectKey key) 1514 1515 { 1516 setPrintSubsId(((NumberKey) key).intValue()); 1517 } 1518 1519 1524 public void setPrimaryKey(String key) 1525 { 1526 setPrintSubsId(Integer.parseInt(key)); 1527 } 1528 1529 1530 1534 public ObjectKey getPrimaryKey() 1535 { 1536 return SimpleKey.keyFor(getPrintSubsId()); 1537 } 1538 1539 1543 public String getQueryKey() 1544 { 1545 if (getPrimaryKey() == null) 1546 { 1547 return ""; 1548 } 1549 else 1550 { 1551 return getPrimaryKey().toString(); 1552 } 1553 } 1554 1555 1559 public void setQueryKey(String key) 1560 throws TorqueException 1561 { 1562 setPrimaryKey(key); 1563 } 1564 1565 1571 public PrintSubscription copy() throws TorqueException 1572 { 1573 return copyInto(new PrintSubscription()); 1574 } 1575 1576 protected PrintSubscription copyInto(PrintSubscription copyObj) throws TorqueException 1577 { 1578 copyObj.setPrintSubsId(printSubsId); 1579 copyObj.setPrintSubsCode(printSubsCode); 1580 copyObj.setStatus(status); 1581 copyObj.setPriority(priority); 1582 copyObj.setIssuedDate(issuedDate); 1583 copyObj.setClosedDate(closedDate); 1584 copyObj.setSorderId(sorderId); 1585 copyObj.setCustomerId(customerId); 1586 copyObj.setRecipientId(recipientId); 1587 copyObj.setCarrierId(carrierId); 1588 copyObj.setProjectId(projectId); 1589 copyObj.setProductId(productId); 1590 copyObj.setQuantity(quantity); 1591 copyObj.setStartDate(startDate); 1592 copyObj.setEndDate(endDate); 1593 copyObj.setSubject(subject); 1594 copyObj.setNotes(notes); 1595 copyObj.setCreated(created); 1596 copyObj.setModified(modified); 1597 copyObj.setCreatedBy(createdBy); 1598 copyObj.setModifiedBy(modifiedBy); 1599 1600 copyObj.setPrintSubsId( 0); 1601 1602 return copyObj; 1603 } 1604 1605 1611 public PrintSubscriptionPeer getPeer() 1612 { 1613 return peer; 1614 } 1615 1616 public String toString() 1617 { 1618 StringBuffer str = new StringBuffer (); 1619 str.append("PrintSubscription:\n"); 1620 str.append("PrintSubsId = ") 1621 .append(getPrintSubsId()) 1622 .append("\n"); 1623 str.append("PrintSubsCode = ") 1624 .append(getPrintSubsCode()) 1625 .append("\n"); 1626 str.append("Status = ") 1627 .append(getStatus()) 1628 .append("\n"); 1629 str.append("Priority = ") 1630 .append(getPriority()) 1631 .append("\n"); 1632 str.append("IssuedDate = ") 1633 .append(getIssuedDate()) 1634 .append("\n"); 1635 str.append("ClosedDate = ") 1636 .append(getClosedDate()) 1637 .append("\n"); 1638 str.append("SorderId = ") 1639 .append(getSorderId()) 1640 .append("\n"); 1641 str.append("CustomerId = ") 1642 .append(getCustomerId()) 1643 .append("\n"); 1644 str.append("RecipientId = ") 1645 .append(getRecipientId()) 1646 .append("\n"); 1647 str.append("CarrierId = ") 1648 .append(getCarrierId()) 1649 .append("\n"); 1650 str.append("ProjectId = ") 1651 .append(getProjectId()) 1652 .append("\n"); 1653 str.append("ProductId = ") 1654 .append(getProductId()) 1655 .append("\n"); 1656 str.append("Quantity = ") 1657 .append(getQuantity()) 1658 .append("\n"); 1659 str.append("StartDate = ") 1660 .append(getStartDate()) 1661 .append("\n"); 1662 str.append("EndDate = ") 1663 .append(getEndDate()) 1664 .append("\n"); 1665 str.append("Subject = ") 1666 .append(getSubject()) 1667 .append("\n"); 1668 str.append("Notes = ") 1669 .append(getNotes()) 1670 .append("\n"); 1671 str.append("Created = ") 1672 .append(getCreated()) 1673 .append("\n"); 1674 str.append("Modified = ") 1675 .append(getModified()) 1676 .append("\n"); 1677 str.append("CreatedBy = ") 1678 .append(getCreatedBy()) 1679 .append("\n"); 1680 str.append("ModifiedBy = ") 1681 .append(getModifiedBy()) 1682 .append("\n"); 1683 return(str.toString()); 1684 } 1685} 1686
| Popular Tags
|