Subversion Repositories SmartDukaan

Rev

Rev 495 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 495 Rev 640
Line 41... Line 41...
41
 
41
 
42
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException;
42
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException;
43
 
43
 
44
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
44
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
45
 
45
 
46
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException;
46
    public boolean addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TransactionServiceException, TException;
47
 
47
 
48
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException;
48
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException;
49
 
49
 
50
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
50
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
51
 
51
 
Line 384... Line 384...
384
        throw result.ex;
384
        throw result.ex;
385
      }
385
      }
386
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
386
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
387
    }
387
    }
388
 
388
 
389
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
389
    public boolean addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TransactionServiceException, TException
390
    {
390
    {
391
      send_addBillingDetails(orderId, invoice_number, billed_by);
391
      send_addBillingDetails(orderId, invoice_number, jacket_number, billed_by);
392
      return recv_addBillingDetails();
392
      return recv_addBillingDetails();
393
    }
393
    }
394
 
394
 
395
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
395
    public void send_addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TException
396
    {
396
    {
397
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
397
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
398
      addBillingDetails_args args = new addBillingDetails_args();
398
      addBillingDetails_args args = new addBillingDetails_args();
399
      args.orderId = orderId;
399
      args.orderId = orderId;
400
      args.invoice_number = invoice_number;
400
      args.invoice_number = invoice_number;
-
 
401
      args.jacket_number = jacket_number;
401
      args.billed_by = billed_by;
402
      args.billed_by = billed_by;
402
      args.write(oprot_);
403
      args.write(oprot_);
403
      oprot_.writeMessageEnd();
404
      oprot_.writeMessageEnd();
404
      oprot_.getTransport().flush();
405
      oprot_.getTransport().flush();
405
    }
406
    }
Line 956... Line 957...
956
        addBillingDetails_args args = new addBillingDetails_args();
957
        addBillingDetails_args args = new addBillingDetails_args();
957
        args.read(iprot);
958
        args.read(iprot);
958
        iprot.readMessageEnd();
959
        iprot.readMessageEnd();
959
        addBillingDetails_result result = new addBillingDetails_result();
960
        addBillingDetails_result result = new addBillingDetails_result();
960
        try {
961
        try {
961
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
962
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.jacket_number, args.billed_by);
962
          result.setSuccessIsSet(true);
963
          result.setSuccessIsSet(true);
963
        } catch (TransactionServiceException ex) {
964
        } catch (TransactionServiceException ex) {
964
          result.ex = ex;
965
          result.ex = ex;
965
        } catch (Throwable th) {
966
        } catch (Throwable th) {
966
          LOGGER.error("Internal error processing addBillingDetails", th);
967
          LOGGER.error("Internal error processing addBillingDetails", th);
Line 7225... Line 7226...
7225
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
7226
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
7226
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
7227
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
7227
 
7228
 
7228
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
7229
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
7229
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
7230
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
-
 
7231
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacket_number", TType.I64, (short)3);
7230
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
7232
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)4);
7231
 
7233
 
7232
    private long orderId;
7234
    private long orderId;
7233
    private String invoice_number;
7235
    private String invoice_number;
-
 
7236
    private long jacket_number;
7234
    private String billed_by;
7237
    private String billed_by;
7235
 
7238
 
7236
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7239
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7237
    public enum _Fields implements TFieldIdEnum {
7240
    public enum _Fields implements TFieldIdEnum {
7238
      ORDER_ID((short)1, "orderId"),
7241
      ORDER_ID((short)1, "orderId"),
7239
      INVOICE_NUMBER((short)2, "invoice_number"),
7242
      INVOICE_NUMBER((short)2, "invoice_number"),
-
 
7243
      JACKET_NUMBER((short)3, "jacket_number"),
7240
      BILLED_BY((short)3, "billed_by");
7244
      BILLED_BY((short)4, "billed_by");
7241
 
7245
 
7242
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7246
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7243
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7247
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7244
 
7248
 
7245
      static {
7249
      static {
Line 7290... Line 7294...
7290
      }
7294
      }
7291
    }
7295
    }
7292
 
7296
 
7293
    // isset id assignments
7297
    // isset id assignments
7294
    private static final int __ORDERID_ISSET_ID = 0;
7298
    private static final int __ORDERID_ISSET_ID = 0;
-
 
7299
    private static final int __JACKET_NUMBER_ISSET_ID = 1;
7295
    private BitSet __isset_bit_vector = new BitSet(1);
7300
    private BitSet __isset_bit_vector = new BitSet(2);
7296
 
7301
 
7297
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7302
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7298
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
7303
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
7299
          new FieldValueMetaData(TType.I64)));
7304
          new FieldValueMetaData(TType.I64)));
7300
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
7305
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
7301
          new FieldValueMetaData(TType.STRING)));
7306
          new FieldValueMetaData(TType.STRING)));
-
 
7307
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacket_number", TFieldRequirementType.DEFAULT, 
-
 
7308
          new FieldValueMetaData(TType.I64)));
7302
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
7309
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
7303
          new FieldValueMetaData(TType.STRING)));
7310
          new FieldValueMetaData(TType.STRING)));
7304
    }});
7311
    }});
7305
 
7312
 
7306
    static {
7313
    static {
Line 7311... Line 7318...
7311
    }
7318
    }
7312
 
7319
 
7313
    public addBillingDetails_args(
7320
    public addBillingDetails_args(
7314
      long orderId,
7321
      long orderId,
7315
      String invoice_number,
7322
      String invoice_number,
-
 
7323
      long jacket_number,
7316
      String billed_by)
7324
      String billed_by)
7317
    {
7325
    {
7318
      this();
7326
      this();
7319
      this.orderId = orderId;
7327
      this.orderId = orderId;
7320
      setOrderIdIsSet(true);
7328
      setOrderIdIsSet(true);
7321
      this.invoice_number = invoice_number;
7329
      this.invoice_number = invoice_number;
-
 
7330
      this.jacket_number = jacket_number;
-
 
7331
      setJacket_numberIsSet(true);
7322
      this.billed_by = billed_by;
7332
      this.billed_by = billed_by;
7323
    }
7333
    }
7324
 
7334
 
7325
    /**
7335
    /**
7326
     * Performs a deep copy on <i>other</i>.
7336
     * Performs a deep copy on <i>other</i>.
Line 7330... Line 7340...
7330
      __isset_bit_vector.or(other.__isset_bit_vector);
7340
      __isset_bit_vector.or(other.__isset_bit_vector);
7331
      this.orderId = other.orderId;
7341
      this.orderId = other.orderId;
7332
      if (other.isSetInvoice_number()) {
7342
      if (other.isSetInvoice_number()) {
7333
        this.invoice_number = other.invoice_number;
7343
        this.invoice_number = other.invoice_number;
7334
      }
7344
      }
-
 
7345
      this.jacket_number = other.jacket_number;
7335
      if (other.isSetBilled_by()) {
7346
      if (other.isSetBilled_by()) {
7336
        this.billed_by = other.billed_by;
7347
        this.billed_by = other.billed_by;
7337
      }
7348
      }
7338
    }
7349
    }
7339
 
7350
 
Line 7391... Line 7402...
7391
      if (!value) {
7402
      if (!value) {
7392
        this.invoice_number = null;
7403
        this.invoice_number = null;
7393
      }
7404
      }
7394
    }
7405
    }
7395
 
7406
 
-
 
7407
    public long getJacket_number() {
-
 
7408
      return this.jacket_number;
-
 
7409
    }
-
 
7410
 
-
 
7411
    public addBillingDetails_args setJacket_number(long jacket_number) {
-
 
7412
      this.jacket_number = jacket_number;
-
 
7413
      setJacket_numberIsSet(true);
-
 
7414
      return this;
-
 
7415
    }
-
 
7416
 
-
 
7417
    public void unsetJacket_number() {
-
 
7418
      __isset_bit_vector.clear(__JACKET_NUMBER_ISSET_ID);
-
 
7419
    }
-
 
7420
 
-
 
7421
    /** Returns true if field jacket_number is set (has been asigned a value) and false otherwise */
-
 
7422
    public boolean isSetJacket_number() {
-
 
7423
      return __isset_bit_vector.get(__JACKET_NUMBER_ISSET_ID);
-
 
7424
    }
-
 
7425
 
-
 
7426
    public void setJacket_numberIsSet(boolean value) {
-
 
7427
      __isset_bit_vector.set(__JACKET_NUMBER_ISSET_ID, value);
-
 
7428
    }
-
 
7429
 
7396
    public String getBilled_by() {
7430
    public String getBilled_by() {
7397
      return this.billed_by;
7431
      return this.billed_by;
7398
    }
7432
    }
7399
 
7433
 
7400
    public addBillingDetails_args setBilled_by(String billed_by) {
7434
    public addBillingDetails_args setBilled_by(String billed_by) {
Line 7433... Line 7467...
7433
        } else {
7467
        } else {
7434
          setInvoice_number((String)value);
7468
          setInvoice_number((String)value);
7435
        }
7469
        }
7436
        break;
7470
        break;
7437
 
7471
 
-
 
7472
      case JACKET_NUMBER:
-
 
7473
        if (value == null) {
-
 
7474
          unsetJacket_number();
-
 
7475
        } else {
-
 
7476
          setJacket_number((Long)value);
-
 
7477
        }
-
 
7478
        break;
-
 
7479
 
7438
      case BILLED_BY:
7480
      case BILLED_BY:
7439
        if (value == null) {
7481
        if (value == null) {
7440
          unsetBilled_by();
7482
          unsetBilled_by();
7441
        } else {
7483
        } else {
7442
          setBilled_by((String)value);
7484
          setBilled_by((String)value);
Line 7456... Line 7498...
7456
        return new Long(getOrderId());
7498
        return new Long(getOrderId());
7457
 
7499
 
7458
      case INVOICE_NUMBER:
7500
      case INVOICE_NUMBER:
7459
        return getInvoice_number();
7501
        return getInvoice_number();
7460
 
7502
 
-
 
7503
      case JACKET_NUMBER:
-
 
7504
        return new Long(getJacket_number());
-
 
7505
 
7461
      case BILLED_BY:
7506
      case BILLED_BY:
7462
        return getBilled_by();
7507
        return getBilled_by();
7463
 
7508
 
7464
      }
7509
      }
7465
      throw new IllegalStateException();
7510
      throw new IllegalStateException();
Line 7474... Line 7519...
7474
      switch (field) {
7519
      switch (field) {
7475
      case ORDER_ID:
7520
      case ORDER_ID:
7476
        return isSetOrderId();
7521
        return isSetOrderId();
7477
      case INVOICE_NUMBER:
7522
      case INVOICE_NUMBER:
7478
        return isSetInvoice_number();
7523
        return isSetInvoice_number();
-
 
7524
      case JACKET_NUMBER:
-
 
7525
        return isSetJacket_number();
7479
      case BILLED_BY:
7526
      case BILLED_BY:
7480
        return isSetBilled_by();
7527
        return isSetBilled_by();
7481
      }
7528
      }
7482
      throw new IllegalStateException();
7529
      throw new IllegalStateException();
7483
    }
7530
    }
Line 7515... Line 7562...
7515
          return false;
7562
          return false;
7516
        if (!this.invoice_number.equals(that.invoice_number))
7563
        if (!this.invoice_number.equals(that.invoice_number))
7517
          return false;
7564
          return false;
7518
      }
7565
      }
7519
 
7566
 
-
 
7567
      boolean this_present_jacket_number = true;
-
 
7568
      boolean that_present_jacket_number = true;
-
 
7569
      if (this_present_jacket_number || that_present_jacket_number) {
-
 
7570
        if (!(this_present_jacket_number && that_present_jacket_number))
-
 
7571
          return false;
-
 
7572
        if (this.jacket_number != that.jacket_number)
-
 
7573
          return false;
-
 
7574
      }
-
 
7575
 
7520
      boolean this_present_billed_by = true && this.isSetBilled_by();
7576
      boolean this_present_billed_by = true && this.isSetBilled_by();
7521
      boolean that_present_billed_by = true && that.isSetBilled_by();
7577
      boolean that_present_billed_by = true && that.isSetBilled_by();
7522
      if (this_present_billed_by || that_present_billed_by) {
7578
      if (this_present_billed_by || that_present_billed_by) {
7523
        if (!(this_present_billed_by && that_present_billed_by))
7579
        if (!(this_present_billed_by && that_present_billed_by))
7524
          return false;
7580
          return false;
Line 7556... Line 7612...
7556
      }
7612
      }
7557
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
7613
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
7558
      if (lastComparison != 0) {
7614
      if (lastComparison != 0) {
7559
        return lastComparison;
7615
        return lastComparison;
7560
      }
7616
      }
-
 
7617
      lastComparison = Boolean.valueOf(isSetJacket_number()).compareTo(isSetJacket_number());
-
 
7618
      if (lastComparison != 0) {
-
 
7619
        return lastComparison;
-
 
7620
      }
-
 
7621
      lastComparison = TBaseHelper.compareTo(jacket_number, typedOther.jacket_number);
-
 
7622
      if (lastComparison != 0) {
-
 
7623
        return lastComparison;
-
 
7624
      }
7561
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
7625
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
7562
      if (lastComparison != 0) {
7626
      if (lastComparison != 0) {
7563
        return lastComparison;
7627
        return lastComparison;
7564
      }
7628
      }
7565
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
7629
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
Line 7596... Line 7660...
7596
                this.invoice_number = iprot.readString();
7660
                this.invoice_number = iprot.readString();
7597
              } else { 
7661
              } else { 
7598
                TProtocolUtil.skip(iprot, field.type);
7662
                TProtocolUtil.skip(iprot, field.type);
7599
              }
7663
              }
7600
              break;
7664
              break;
-
 
7665
            case JACKET_NUMBER:
-
 
7666
              if (field.type == TType.I64) {
-
 
7667
                this.jacket_number = iprot.readI64();
-
 
7668
                setJacket_numberIsSet(true);
-
 
7669
              } else { 
-
 
7670
                TProtocolUtil.skip(iprot, field.type);
-
 
7671
              }
-
 
7672
              break;
7601
            case BILLED_BY:
7673
            case BILLED_BY:
7602
              if (field.type == TType.STRING) {
7674
              if (field.type == TType.STRING) {
7603
                this.billed_by = iprot.readString();
7675
                this.billed_by = iprot.readString();
7604
              } else { 
7676
              } else { 
7605
                TProtocolUtil.skip(iprot, field.type);
7677
                TProtocolUtil.skip(iprot, field.type);
Line 7623... Line 7695...
7623
      if (this.invoice_number != null) {
7695
      if (this.invoice_number != null) {
7624
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
7696
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
7625
        oprot.writeString(this.invoice_number);
7697
        oprot.writeString(this.invoice_number);
7626
        oprot.writeFieldEnd();
7698
        oprot.writeFieldEnd();
7627
      }
7699
      }
-
 
7700
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
-
 
7701
      oprot.writeI64(this.jacket_number);
-
 
7702
      oprot.writeFieldEnd();
7628
      if (this.billed_by != null) {
7703
      if (this.billed_by != null) {
7629
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
7704
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
7630
        oprot.writeString(this.billed_by);
7705
        oprot.writeString(this.billed_by);
7631
        oprot.writeFieldEnd();
7706
        oprot.writeFieldEnd();
7632
      }
7707
      }
Line 7649... Line 7724...
7649
      } else {
7724
      } else {
7650
        sb.append(this.invoice_number);
7725
        sb.append(this.invoice_number);
7651
      }
7726
      }
7652
      first = false;
7727
      first = false;
7653
      if (!first) sb.append(", ");
7728
      if (!first) sb.append(", ");
-
 
7729
      sb.append("jacket_number:");
-
 
7730
      sb.append(this.jacket_number);
-
 
7731
      first = false;
-
 
7732
      if (!first) sb.append(", ");
7654
      sb.append("billed_by:");
7733
      sb.append("billed_by:");
7655
      if (this.billed_by == null) {
7734
      if (this.billed_by == null) {
7656
        sb.append("null");
7735
        sb.append("null");
7657
      } else {
7736
      } else {
7658
        sb.append(this.billed_by);
7737
        sb.append(this.billed_by);