Subversion Repositories SmartDukaan

Rev

Rev 11751 | Rev 13600 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11751 Rev 11801
Line 58... Line 58...
58
     * Throws an exception if no more purchases are allowed against the given purchase order.
58
     * Throws an exception if no more purchases are allowed against the given purchase order.
59
     * 
59
     * 
60
     * @param purchaseOrderId
60
     * @param purchaseOrderId
61
     * @param invoiceNumber
61
     * @param invoiceNumber
62
     * @param freightCharges
62
     * @param freightCharges
-
 
63
     * @param purchaseComments
63
     */
64
     */
64
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws PurchaseServiceException, org.apache.thrift.TException;
65
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws PurchaseServiceException, org.apache.thrift.TException;
65
 
66
 
66
    /**
67
    /**
67
     * Marks a purchase as complete and updates the receivedOn time.
68
     * Marks a purchase as complete and updates the receivedOn time.
68
     * Throws an exception if no such purchase exists.
69
     * Throws an exception if no such purchase exists.
69
     * 
70
     * 
Line 255... Line 256...
255
 
256
 
256
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
257
    public void getAllPurchaseOrders(POStatus status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchaseOrders_call> resultHandler) throws org.apache.thrift.TException;
257
 
258
 
258
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
259
    public void getSupplier(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSupplier_call> resultHandler) throws org.apache.thrift.TException;
259
 
260
 
260
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
261
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startPurchase_call> resultHandler) throws org.apache.thrift.TException;
261
 
262
 
262
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
263
    public void closePurchase(long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.closePurchase_call> resultHandler) throws org.apache.thrift.TException;
263
 
264
 
264
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
265
    public void getAllPurchases(long purchaseOrderId, boolean open, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllPurchases_call> resultHandler) throws org.apache.thrift.TException;
265
 
266
 
Line 433... Line 434...
433
        throw result.e;
434
        throw result.e;
434
      }
435
      }
435
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
436
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
436
    }
437
    }
437
 
438
 
438
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws PurchaseServiceException, org.apache.thrift.TException
439
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws PurchaseServiceException, org.apache.thrift.TException
439
    {
440
    {
440
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges);
441
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges, purchaseComments);
441
      return recv_startPurchase();
442
      return recv_startPurchase();
442
    }
443
    }
443
 
444
 
444
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws org.apache.thrift.TException
445
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments) throws org.apache.thrift.TException
445
    {
446
    {
446
      startPurchase_args args = new startPurchase_args();
447
      startPurchase_args args = new startPurchase_args();
447
      args.setPurchaseOrderId(purchaseOrderId);
448
      args.setPurchaseOrderId(purchaseOrderId);
448
      args.setInvoiceNumber(invoiceNumber);
449
      args.setInvoiceNumber(invoiceNumber);
449
      args.setFreightCharges(freightCharges);
450
      args.setFreightCharges(freightCharges);
-
 
451
      args.setPurchaseComments(purchaseComments);
450
      sendBase("startPurchase", args);
452
      sendBase("startPurchase", args);
451
    }
453
    }
452
 
454
 
453
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
455
    public long recv_startPurchase() throws PurchaseServiceException, org.apache.thrift.TException
454
    {
456
    {
Line 1204... Line 1206...
1204
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1206
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1205
        return (new Client(prot)).recv_getSupplier();
1207
        return (new Client(prot)).recv_getSupplier();
1206
      }
1208
      }
1207
    }
1209
    }
1208
 
1210
 
1209
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
1211
    public void startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler) throws org.apache.thrift.TException {
1210
      checkReady();
1212
      checkReady();
1211
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, resultHandler, this, ___protocolFactory, ___transport);
1213
      startPurchase_call method_call = new startPurchase_call(purchaseOrderId, invoiceNumber, freightCharges, purchaseComments, resultHandler, this, ___protocolFactory, ___transport);
1212
      this.___currentMethod = method_call;
1214
      this.___currentMethod = method_call;
1213
      ___manager.call(method_call);
1215
      ___manager.call(method_call);
1214
    }
1216
    }
1215
 
1217
 
1216
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1218
    public static class startPurchase_call extends org.apache.thrift.async.TAsyncMethodCall {
1217
      private long purchaseOrderId;
1219
      private long purchaseOrderId;
1218
      private String invoiceNumber;
1220
      private String invoiceNumber;
1219
      private double freightCharges;
1221
      private double freightCharges;
-
 
1222
      private String purchaseComments;
1220
      public startPurchase_call(long purchaseOrderId, String invoiceNumber, double freightCharges, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1223
      public startPurchase_call(long purchaseOrderId, String invoiceNumber, double freightCharges, String purchaseComments, org.apache.thrift.async.AsyncMethodCallback<startPurchase_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1221
        super(client, protocolFactory, transport, resultHandler, false);
1224
        super(client, protocolFactory, transport, resultHandler, false);
1222
        this.purchaseOrderId = purchaseOrderId;
1225
        this.purchaseOrderId = purchaseOrderId;
1223
        this.invoiceNumber = invoiceNumber;
1226
        this.invoiceNumber = invoiceNumber;
1224
        this.freightCharges = freightCharges;
1227
        this.freightCharges = freightCharges;
-
 
1228
        this.purchaseComments = purchaseComments;
1225
      }
1229
      }
1226
 
1230
 
1227
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1231
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1228
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1232
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPurchase", org.apache.thrift.protocol.TMessageType.CALL, 0));
1229
        startPurchase_args args = new startPurchase_args();
1233
        startPurchase_args args = new startPurchase_args();
1230
        args.setPurchaseOrderId(purchaseOrderId);
1234
        args.setPurchaseOrderId(purchaseOrderId);
1231
        args.setInvoiceNumber(invoiceNumber);
1235
        args.setInvoiceNumber(invoiceNumber);
1232
        args.setFreightCharges(freightCharges);
1236
        args.setFreightCharges(freightCharges);
-
 
1237
        args.setPurchaseComments(purchaseComments);
1233
        args.write(prot);
1238
        args.write(prot);
1234
        prot.writeMessageEnd();
1239
        prot.writeMessageEnd();
1235
      }
1240
      }
1236
 
1241
 
1237
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
1242
      public long getResult() throws PurchaseServiceException, org.apache.thrift.TException {
Line 2220... Line 2225...
2220
      }
2225
      }
2221
 
2226
 
2222
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
2227
      protected startPurchase_result getResult(I iface, startPurchase_args args) throws org.apache.thrift.TException {
2223
        startPurchase_result result = new startPurchase_result();
2228
        startPurchase_result result = new startPurchase_result();
2224
        try {
2229
        try {
2225
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges);
2230
          result.success = iface.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges, args.purchaseComments);
2226
          result.setSuccessIsSet(true);
2231
          result.setSuccessIsSet(true);
2227
        } catch (PurchaseServiceException e) {
2232
        } catch (PurchaseServiceException e) {
2228
          result.e = e;
2233
          result.e = e;
2229
        }
2234
        }
2230
        return result;
2235
        return result;
Line 5444... Line 5449...
5444
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
5449
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPurchase_args");
5445
 
5450
 
5446
    private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrderId", org.apache.thrift.protocol.TType.I64, (short)1);
5451
    private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrderId", org.apache.thrift.protocol.TType.I64, (short)1);
5447
    private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)2);
5452
    private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)2);
5448
    private static final org.apache.thrift.protocol.TField FREIGHT_CHARGES_FIELD_DESC = new org.apache.thrift.protocol.TField("freightCharges", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
5453
    private static final org.apache.thrift.protocol.TField FREIGHT_CHARGES_FIELD_DESC = new org.apache.thrift.protocol.TField("freightCharges", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
-
 
5454
    private static final org.apache.thrift.protocol.TField PURCHASE_COMMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseComments", org.apache.thrift.protocol.TType.STRING, (short)4);
5449
 
5455
 
5450
    private long purchaseOrderId; // required
5456
    private long purchaseOrderId; // required
5451
    private String invoiceNumber; // required
5457
    private String invoiceNumber; // required
5452
    private double freightCharges; // required
5458
    private double freightCharges; // required
-
 
5459
    private String purchaseComments; // required
5453
 
5460
 
5454
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5461
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5455
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5462
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5456
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
5463
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
5457
      INVOICE_NUMBER((short)2, "invoiceNumber"),
5464
      INVOICE_NUMBER((short)2, "invoiceNumber"),
5458
      FREIGHT_CHARGES((short)3, "freightCharges");
5465
      FREIGHT_CHARGES((short)3, "freightCharges"),
-
 
5466
      PURCHASE_COMMENTS((short)4, "purchaseComments");
5459
 
5467
 
5460
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5468
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5461
 
5469
 
5462
      static {
5470
      static {
5463
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5471
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 5474... Line 5482...
5474
            return PURCHASE_ORDER_ID;
5482
            return PURCHASE_ORDER_ID;
5475
          case 2: // INVOICE_NUMBER
5483
          case 2: // INVOICE_NUMBER
5476
            return INVOICE_NUMBER;
5484
            return INVOICE_NUMBER;
5477
          case 3: // FREIGHT_CHARGES
5485
          case 3: // FREIGHT_CHARGES
5478
            return FREIGHT_CHARGES;
5486
            return FREIGHT_CHARGES;
-
 
5487
          case 4: // PURCHASE_COMMENTS
-
 
5488
            return PURCHASE_COMMENTS;
5479
          default:
5489
          default:
5480
            return null;
5490
            return null;
5481
        }
5491
        }
5482
      }
5492
      }
5483
 
5493
 
Line 5527... Line 5537...
5527
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5537
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5528
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5538
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5529
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5539
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5530
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5540
      tmpMap.put(_Fields.FREIGHT_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("freightCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5531
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
5541
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
5542
      tmpMap.put(_Fields.PURCHASE_COMMENTS, new org.apache.thrift.meta_data.FieldMetaData("purchaseComments", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
5543
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5532
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5544
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5533
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
5545
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
5534
    }
5546
    }
5535
 
5547
 
5536
    public startPurchase_args() {
5548
    public startPurchase_args() {
5537
    }
5549
    }
5538
 
5550
 
5539
    public startPurchase_args(
5551
    public startPurchase_args(
5540
      long purchaseOrderId,
5552
      long purchaseOrderId,
5541
      String invoiceNumber,
5553
      String invoiceNumber,
5542
      double freightCharges)
5554
      double freightCharges,
-
 
5555
      String purchaseComments)
5543
    {
5556
    {
5544
      this();
5557
      this();
5545
      this.purchaseOrderId = purchaseOrderId;
5558
      this.purchaseOrderId = purchaseOrderId;
5546
      setPurchaseOrderIdIsSet(true);
5559
      setPurchaseOrderIdIsSet(true);
5547
      this.invoiceNumber = invoiceNumber;
5560
      this.invoiceNumber = invoiceNumber;
5548
      this.freightCharges = freightCharges;
5561
      this.freightCharges = freightCharges;
5549
      setFreightChargesIsSet(true);
5562
      setFreightChargesIsSet(true);
-
 
5563
      this.purchaseComments = purchaseComments;
5550
    }
5564
    }
5551
 
5565
 
5552
    /**
5566
    /**
5553
     * Performs a deep copy on <i>other</i>.
5567
     * Performs a deep copy on <i>other</i>.
5554
     */
5568
     */
Line 5558... Line 5572...
5558
      this.purchaseOrderId = other.purchaseOrderId;
5572
      this.purchaseOrderId = other.purchaseOrderId;
5559
      if (other.isSetInvoiceNumber()) {
5573
      if (other.isSetInvoiceNumber()) {
5560
        this.invoiceNumber = other.invoiceNumber;
5574
        this.invoiceNumber = other.invoiceNumber;
5561
      }
5575
      }
5562
      this.freightCharges = other.freightCharges;
5576
      this.freightCharges = other.freightCharges;
-
 
5577
      if (other.isSetPurchaseComments()) {
-
 
5578
        this.purchaseComments = other.purchaseComments;
-
 
5579
      }
5563
    }
5580
    }
5564
 
5581
 
5565
    public startPurchase_args deepCopy() {
5582
    public startPurchase_args deepCopy() {
5566
      return new startPurchase_args(this);
5583
      return new startPurchase_args(this);
5567
    }
5584
    }
Line 5571... Line 5588...
5571
      setPurchaseOrderIdIsSet(false);
5588
      setPurchaseOrderIdIsSet(false);
5572
      this.purchaseOrderId = 0;
5589
      this.purchaseOrderId = 0;
5573
      this.invoiceNumber = null;
5590
      this.invoiceNumber = null;
5574
      setFreightChargesIsSet(false);
5591
      setFreightChargesIsSet(false);
5575
      this.freightCharges = 0.0;
5592
      this.freightCharges = 0.0;
-
 
5593
      this.purchaseComments = null;
5576
    }
5594
    }
5577
 
5595
 
5578
    public long getPurchaseOrderId() {
5596
    public long getPurchaseOrderId() {
5579
      return this.purchaseOrderId;
5597
      return this.purchaseOrderId;
5580
    }
5598
    }
Line 5640... Line 5658...
5640
 
5658
 
5641
    public void setFreightChargesIsSet(boolean value) {
5659
    public void setFreightChargesIsSet(boolean value) {
5642
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
5660
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
5643
    }
5661
    }
5644
 
5662
 
-
 
5663
    public String getPurchaseComments() {
-
 
5664
      return this.purchaseComments;
-
 
5665
    }
-
 
5666
 
-
 
5667
    public void setPurchaseComments(String purchaseComments) {
-
 
5668
      this.purchaseComments = purchaseComments;
-
 
5669
    }
-
 
5670
 
-
 
5671
    public void unsetPurchaseComments() {
-
 
5672
      this.purchaseComments = null;
-
 
5673
    }
-
 
5674
 
-
 
5675
    /** Returns true if field purchaseComments is set (has been assigned a value) and false otherwise */
-
 
5676
    public boolean isSetPurchaseComments() {
-
 
5677
      return this.purchaseComments != null;
-
 
5678
    }
-
 
5679
 
-
 
5680
    public void setPurchaseCommentsIsSet(boolean value) {
-
 
5681
      if (!value) {
-
 
5682
        this.purchaseComments = null;
-
 
5683
      }
-
 
5684
    }
-
 
5685
 
5645
    public void setFieldValue(_Fields field, Object value) {
5686
    public void setFieldValue(_Fields field, Object value) {
5646
      switch (field) {
5687
      switch (field) {
5647
      case PURCHASE_ORDER_ID:
5688
      case PURCHASE_ORDER_ID:
5648
        if (value == null) {
5689
        if (value == null) {
5649
          unsetPurchaseOrderId();
5690
          unsetPurchaseOrderId();
Line 5666... Line 5707...
5666
        } else {
5707
        } else {
5667
          setFreightCharges((Double)value);
5708
          setFreightCharges((Double)value);
5668
        }
5709
        }
5669
        break;
5710
        break;
5670
 
5711
 
-
 
5712
      case PURCHASE_COMMENTS:
-
 
5713
        if (value == null) {
-
 
5714
          unsetPurchaseComments();
-
 
5715
        } else {
-
 
5716
          setPurchaseComments((String)value);
-
 
5717
        }
-
 
5718
        break;
-
 
5719
 
5671
      }
5720
      }
5672
    }
5721
    }
5673
 
5722
 
5674
    public Object getFieldValue(_Fields field) {
5723
    public Object getFieldValue(_Fields field) {
5675
      switch (field) {
5724
      switch (field) {
Line 5680... Line 5729...
5680
        return getInvoiceNumber();
5729
        return getInvoiceNumber();
5681
 
5730
 
5682
      case FREIGHT_CHARGES:
5731
      case FREIGHT_CHARGES:
5683
        return Double.valueOf(getFreightCharges());
5732
        return Double.valueOf(getFreightCharges());
5684
 
5733
 
-
 
5734
      case PURCHASE_COMMENTS:
-
 
5735
        return getPurchaseComments();
-
 
5736
 
5685
      }
5737
      }
5686
      throw new IllegalStateException();
5738
      throw new IllegalStateException();
5687
    }
5739
    }
5688
 
5740
 
5689
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5741
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 5697... Line 5749...
5697
        return isSetPurchaseOrderId();
5749
        return isSetPurchaseOrderId();
5698
      case INVOICE_NUMBER:
5750
      case INVOICE_NUMBER:
5699
        return isSetInvoiceNumber();
5751
        return isSetInvoiceNumber();
5700
      case FREIGHT_CHARGES:
5752
      case FREIGHT_CHARGES:
5701
        return isSetFreightCharges();
5753
        return isSetFreightCharges();
-
 
5754
      case PURCHASE_COMMENTS:
-
 
5755
        return isSetPurchaseComments();
5702
      }
5756
      }
5703
      throw new IllegalStateException();
5757
      throw new IllegalStateException();
5704
    }
5758
    }
5705
 
5759
 
5706
    @Override
5760
    @Override
Line 5741... Line 5795...
5741
          return false;
5795
          return false;
5742
        if (this.freightCharges != that.freightCharges)
5796
        if (this.freightCharges != that.freightCharges)
5743
          return false;
5797
          return false;
5744
      }
5798
      }
5745
 
5799
 
-
 
5800
      boolean this_present_purchaseComments = true && this.isSetPurchaseComments();
-
 
5801
      boolean that_present_purchaseComments = true && that.isSetPurchaseComments();
-
 
5802
      if (this_present_purchaseComments || that_present_purchaseComments) {
-
 
5803
        if (!(this_present_purchaseComments && that_present_purchaseComments))
-
 
5804
          return false;
-
 
5805
        if (!this.purchaseComments.equals(that.purchaseComments))
-
 
5806
          return false;
-
 
5807
      }
-
 
5808
 
5746
      return true;
5809
      return true;
5747
    }
5810
    }
5748
 
5811
 
5749
    @Override
5812
    @Override
5750
    public int hashCode() {
5813
    public int hashCode() {
Line 5787... Line 5850...
5787
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
5850
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freightCharges, typedOther.freightCharges);
5788
        if (lastComparison != 0) {
5851
        if (lastComparison != 0) {
5789
          return lastComparison;
5852
          return lastComparison;
5790
        }
5853
        }
5791
      }
5854
      }
-
 
5855
      lastComparison = Boolean.valueOf(isSetPurchaseComments()).compareTo(typedOther.isSetPurchaseComments());
-
 
5856
      if (lastComparison != 0) {
-
 
5857
        return lastComparison;
-
 
5858
      }
-
 
5859
      if (isSetPurchaseComments()) {
-
 
5860
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseComments, typedOther.purchaseComments);
-
 
5861
        if (lastComparison != 0) {
-
 
5862
          return lastComparison;
-
 
5863
        }
-
 
5864
      }
5792
      return 0;
5865
      return 0;
5793
    }
5866
    }
5794
 
5867
 
5795
    public _Fields fieldForId(int fieldId) {
5868
    public _Fields fieldForId(int fieldId) {
5796
      return _Fields.findByThriftId(fieldId);
5869
      return _Fields.findByThriftId(fieldId);
Line 5827... Line 5900...
5827
              setFreightChargesIsSet(true);
5900
              setFreightChargesIsSet(true);
5828
            } else { 
5901
            } else { 
5829
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5902
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5830
            }
5903
            }
5831
            break;
5904
            break;
-
 
5905
          case 4: // PURCHASE_COMMENTS
-
 
5906
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
5907
              this.purchaseComments = iprot.readString();
-
 
5908
            } else { 
-
 
5909
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
5910
            }
-
 
5911
            break;
5832
          default:
5912
          default:
5833
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5913
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5834
        }
5914
        }
5835
        iprot.readFieldEnd();
5915
        iprot.readFieldEnd();
5836
      }
5916
      }
Line 5851... Line 5931...
5851
        oprot.writeFieldEnd();
5931
        oprot.writeFieldEnd();
5852
      }
5932
      }
5853
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
5933
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
5854
      oprot.writeDouble(this.freightCharges);
5934
      oprot.writeDouble(this.freightCharges);
5855
      oprot.writeFieldEnd();
5935
      oprot.writeFieldEnd();
-
 
5936
      if (this.purchaseComments != null) {
-
 
5937
        oprot.writeFieldBegin(PURCHASE_COMMENTS_FIELD_DESC);
-
 
5938
        oprot.writeString(this.purchaseComments);
-
 
5939
        oprot.writeFieldEnd();
-
 
5940
      }
5856
      oprot.writeFieldStop();
5941
      oprot.writeFieldStop();
5857
      oprot.writeStructEnd();
5942
      oprot.writeStructEnd();
5858
    }
5943
    }
5859
 
5944
 
5860
    @Override
5945
    @Override
Line 5875... Line 5960...
5875
      first = false;
5960
      first = false;
5876
      if (!first) sb.append(", ");
5961
      if (!first) sb.append(", ");
5877
      sb.append("freightCharges:");
5962
      sb.append("freightCharges:");
5878
      sb.append(this.freightCharges);
5963
      sb.append(this.freightCharges);
5879
      first = false;
5964
      first = false;
-
 
5965
      if (!first) sb.append(", ");
-
 
5966
      sb.append("purchaseComments:");
-
 
5967
      if (this.purchaseComments == null) {
-
 
5968
        sb.append("null");
-
 
5969
      } else {
-
 
5970
        sb.append(this.purchaseComments);
-
 
5971
      }
-
 
5972
      first = false;
5880
      sb.append(")");
5973
      sb.append(")");
5881
      return sb.toString();
5974
      return sb.toString();
5882
    }
5975
    }
5883
 
5976
 
5884
    public void validate() throws org.apache.thrift.TException {
5977
    public void validate() throws org.apache.thrift.TException {