Subversion Repositories SmartDukaan

Rev

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

Rev 5407 Rev 5553
Line 115... Line 115...
115
 
115
 
116
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, org.apache.thrift.TException;
116
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, org.apache.thrift.TException;
117
 
117
 
118
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, org.apache.thrift.TException;
118
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, org.apache.thrift.TException;
119
 
119
 
-
 
120
    public void addStoreToCart(long cartId, long storeId) throws ShoppingCartException, org.apache.thrift.TException;
-
 
121
 
120
    public void applyCouponToCart(long cartId, String couponCode, double totalPrice, double discountedPrice) throws ShoppingCartException, org.apache.thrift.TException;
122
    public void applyCouponToCart(long cartId, String couponCode, double totalPrice, double discountedPrice) throws ShoppingCartException, org.apache.thrift.TException;
121
 
123
 
122
    public void removeCoupon(long cartId) throws ShoppingCartException, org.apache.thrift.TException;
124
    public void removeCoupon(long cartId) throws ShoppingCartException, org.apache.thrift.TException;
123
 
125
 
124
    /**
126
    /**
Line 370... Line 372...
370
 
372
 
371
    public void deleteItemFromCart(long cartId, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteItemFromCart_call> resultHandler) throws org.apache.thrift.TException;
373
    public void deleteItemFromCart(long cartId, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteItemFromCart_call> resultHandler) throws org.apache.thrift.TException;
372
 
374
 
373
    public void addAddressToCart(long cartId, long addressId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addAddressToCart_call> resultHandler) throws org.apache.thrift.TException;
375
    public void addAddressToCart(long cartId, long addressId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addAddressToCart_call> resultHandler) throws org.apache.thrift.TException;
374
 
376
 
-
 
377
    public void addStoreToCart(long cartId, long storeId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addStoreToCart_call> resultHandler) throws org.apache.thrift.TException;
-
 
378
 
375
    public void applyCouponToCart(long cartId, String couponCode, double totalPrice, double discountedPrice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.applyCouponToCart_call> resultHandler) throws org.apache.thrift.TException;
379
    public void applyCouponToCart(long cartId, String couponCode, double totalPrice, double discountedPrice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.applyCouponToCart_call> resultHandler) throws org.apache.thrift.TException;
376
 
380
 
377
    public void removeCoupon(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.removeCoupon_call> resultHandler) throws org.apache.thrift.TException;
381
    public void removeCoupon(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.removeCoupon_call> resultHandler) throws org.apache.thrift.TException;
378
 
382
 
379
    public void deleteDiscountsFromCart(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteDiscountsFromCart_call> resultHandler) throws org.apache.thrift.TException;
383
    public void deleteDiscountsFromCart(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteDiscountsFromCart_call> resultHandler) throws org.apache.thrift.TException;
Line 1632... Line 1636...
1632
        throw result.scx;
1636
        throw result.scx;
1633
      }
1637
      }
1634
      return;
1638
      return;
1635
    }
1639
    }
1636
 
1640
 
-
 
1641
    public void addStoreToCart(long cartId, long storeId) throws ShoppingCartException, org.apache.thrift.TException
-
 
1642
    {
-
 
1643
      send_addStoreToCart(cartId, storeId);
-
 
1644
      recv_addStoreToCart();
-
 
1645
    }
-
 
1646
 
-
 
1647
    public void send_addStoreToCart(long cartId, long storeId) throws org.apache.thrift.TException
-
 
1648
    {
-
 
1649
      addStoreToCart_args args = new addStoreToCart_args();
-
 
1650
      args.setCartId(cartId);
-
 
1651
      args.setStoreId(storeId);
-
 
1652
      sendBase("addStoreToCart", args);
-
 
1653
    }
-
 
1654
 
-
 
1655
    public void recv_addStoreToCart() throws ShoppingCartException, org.apache.thrift.TException
-
 
1656
    {
-
 
1657
      addStoreToCart_result result = new addStoreToCart_result();
-
 
1658
      receiveBase(result, "addStoreToCart");
-
 
1659
      if (result.scx != null) {
-
 
1660
        throw result.scx;
-
 
1661
      }
-
 
1662
      return;
-
 
1663
    }
-
 
1664
 
1637
    public void applyCouponToCart(long cartId, String couponCode, double totalPrice, double discountedPrice) throws ShoppingCartException, org.apache.thrift.TException
1665
    public void applyCouponToCart(long cartId, String couponCode, double totalPrice, double discountedPrice) throws ShoppingCartException, org.apache.thrift.TException
1638
    {
1666
    {
1639
      send_applyCouponToCart(cartId, couponCode, totalPrice, discountedPrice);
1667
      send_applyCouponToCart(cartId, couponCode, totalPrice, discountedPrice);
1640
      recv_applyCouponToCart();
1668
      recv_applyCouponToCart();
1641
    }
1669
    }
Line 3725... Line 3753...
3725
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
3753
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
3726
        (new Client(prot)).recv_addAddressToCart();
3754
        (new Client(prot)).recv_addAddressToCart();
3727
      }
3755
      }
3728
    }
3756
    }
3729
 
3757
 
-
 
3758
    public void addStoreToCart(long cartId, long storeId, org.apache.thrift.async.AsyncMethodCallback<addStoreToCart_call> resultHandler) throws org.apache.thrift.TException {
-
 
3759
      checkReady();
-
 
3760
      addStoreToCart_call method_call = new addStoreToCart_call(cartId, storeId, resultHandler, this, ___protocolFactory, ___transport);
-
 
3761
      this.___currentMethod = method_call;
-
 
3762
      ___manager.call(method_call);
-
 
3763
    }
-
 
3764
 
-
 
3765
    public static class addStoreToCart_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
3766
      private long cartId;
-
 
3767
      private long storeId;
-
 
3768
      public addStoreToCart_call(long cartId, long storeId, org.apache.thrift.async.AsyncMethodCallback<addStoreToCart_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 {
-
 
3769
        super(client, protocolFactory, transport, resultHandler, false);
-
 
3770
        this.cartId = cartId;
-
 
3771
        this.storeId = storeId;
-
 
3772
      }
-
 
3773
 
-
 
3774
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
3775
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addStoreToCart", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
3776
        addStoreToCart_args args = new addStoreToCart_args();
-
 
3777
        args.setCartId(cartId);
-
 
3778
        args.setStoreId(storeId);
-
 
3779
        args.write(prot);
-
 
3780
        prot.writeMessageEnd();
-
 
3781
      }
-
 
3782
 
-
 
3783
      public void getResult() throws ShoppingCartException, org.apache.thrift.TException {
-
 
3784
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
3785
          throw new IllegalStateException("Method call not finished!");
-
 
3786
        }
-
 
3787
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
3788
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
3789
        (new Client(prot)).recv_addStoreToCart();
-
 
3790
      }
-
 
3791
    }
-
 
3792
 
3730
    public void applyCouponToCart(long cartId, String couponCode, double totalPrice, double discountedPrice, org.apache.thrift.async.AsyncMethodCallback<applyCouponToCart_call> resultHandler) throws org.apache.thrift.TException {
3793
    public void applyCouponToCart(long cartId, String couponCode, double totalPrice, double discountedPrice, org.apache.thrift.async.AsyncMethodCallback<applyCouponToCart_call> resultHandler) throws org.apache.thrift.TException {
3731
      checkReady();
3794
      checkReady();
3732
      applyCouponToCart_call method_call = new applyCouponToCart_call(cartId, couponCode, totalPrice, discountedPrice, resultHandler, this, ___protocolFactory, ___transport);
3795
      applyCouponToCart_call method_call = new applyCouponToCart_call(cartId, couponCode, totalPrice, discountedPrice, resultHandler, this, ___protocolFactory, ___transport);
3733
      this.___currentMethod = method_call;
3796
      this.___currentMethod = method_call;
3734
      ___manager.call(method_call);
3797
      ___manager.call(method_call);
Line 4555... Line 4618...
4555
      processMap.put("getCart", new getCart());
4618
      processMap.put("getCart", new getCart());
4556
      processMap.put("getCartsByTime", new getCartsByTime());
4619
      processMap.put("getCartsByTime", new getCartsByTime());
4557
      processMap.put("addItemToCart", new addItemToCart());
4620
      processMap.put("addItemToCart", new addItemToCart());
4558
      processMap.put("deleteItemFromCart", new deleteItemFromCart());
4621
      processMap.put("deleteItemFromCart", new deleteItemFromCart());
4559
      processMap.put("addAddressToCart", new addAddressToCart());
4622
      processMap.put("addAddressToCart", new addAddressToCart());
-
 
4623
      processMap.put("addStoreToCart", new addStoreToCart());
4560
      processMap.put("applyCouponToCart", new applyCouponToCart());
4624
      processMap.put("applyCouponToCart", new applyCouponToCart());
4561
      processMap.put("removeCoupon", new removeCoupon());
4625
      processMap.put("removeCoupon", new removeCoupon());
4562
      processMap.put("deleteDiscountsFromCart", new deleteDiscountsFromCart());
4626
      processMap.put("deleteDiscountsFromCart", new deleteDiscountsFromCart());
4563
      processMap.put("saveDiscounts", new saveDiscounts());
4627
      processMap.put("saveDiscounts", new saveDiscounts());
4564
      processMap.put("createOrders", new createOrders());
4628
      processMap.put("createOrders", new createOrders());
Line 5491... Line 5555...
5491
        }
5555
        }
5492
        return result;
5556
        return result;
5493
      }
5557
      }
5494
    }
5558
    }
5495
 
5559
 
-
 
5560
    private static class addStoreToCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addStoreToCart_args> {
-
 
5561
      public addStoreToCart() {
-
 
5562
        super("addStoreToCart");
-
 
5563
      }
-
 
5564
 
-
 
5565
      protected addStoreToCart_args getEmptyArgsInstance() {
-
 
5566
        return new addStoreToCart_args();
-
 
5567
      }
-
 
5568
 
-
 
5569
      protected addStoreToCart_result getResult(I iface, addStoreToCart_args args) throws org.apache.thrift.TException {
-
 
5570
        addStoreToCart_result result = new addStoreToCart_result();
-
 
5571
        try {
-
 
5572
          iface.addStoreToCart(args.cartId, args.storeId);
-
 
5573
        } catch (ShoppingCartException scx) {
-
 
5574
          result.scx = scx;
-
 
5575
        }
-
 
5576
        return result;
-
 
5577
      }
-
 
5578
    }
-
 
5579
 
5496
    private static class applyCouponToCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, applyCouponToCart_args> {
5580
    private static class applyCouponToCart<I extends Iface> extends org.apache.thrift.ProcessFunction<I, applyCouponToCart_args> {
5497
      public applyCouponToCart() {
5581
      public applyCouponToCart() {
5498
        super("applyCouponToCart");
5582
        super("applyCouponToCart");
5499
      }
5583
      }
5500
 
5584
 
Line 39381... Line 39465...
39381
      }
39465
      }
39382
    }
39466
    }
39383
 
39467
 
39384
  }
39468
  }
39385
 
39469
 
-
 
39470
  public static class addStoreToCart_args implements org.apache.thrift.TBase<addStoreToCart_args, addStoreToCart_args._Fields>, java.io.Serializable, Cloneable   {
-
 
39471
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addStoreToCart_args");
-
 
39472
 
-
 
39473
    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
39474
    private static final org.apache.thrift.protocol.TField STORE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("storeId", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
39475
 
-
 
39476
    private long cartId; // required
-
 
39477
    private long storeId; // required
-
 
39478
 
-
 
39479
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
39480
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
39481
      CART_ID((short)1, "cartId"),
-
 
39482
      STORE_ID((short)2, "storeId");
-
 
39483
 
-
 
39484
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
39485
 
-
 
39486
      static {
-
 
39487
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
39488
          byName.put(field.getFieldName(), field);
-
 
39489
        }
-
 
39490
      }
-
 
39491
 
-
 
39492
      /**
-
 
39493
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
39494
       */
-
 
39495
      public static _Fields findByThriftId(int fieldId) {
-
 
39496
        switch(fieldId) {
-
 
39497
          case 1: // CART_ID
-
 
39498
            return CART_ID;
-
 
39499
          case 2: // STORE_ID
-
 
39500
            return STORE_ID;
-
 
39501
          default:
-
 
39502
            return null;
-
 
39503
        }
-
 
39504
      }
-
 
39505
 
-
 
39506
      /**
-
 
39507
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
39508
       * if it is not found.
-
 
39509
       */
-
 
39510
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
39511
        _Fields fields = findByThriftId(fieldId);
-
 
39512
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
39513
        return fields;
-
 
39514
      }
-
 
39515
 
-
 
39516
      /**
-
 
39517
       * Find the _Fields constant that matches name, or null if its not found.
-
 
39518
       */
-
 
39519
      public static _Fields findByName(String name) {
-
 
39520
        return byName.get(name);
-
 
39521
      }
-
 
39522
 
-
 
39523
      private final short _thriftId;
-
 
39524
      private final String _fieldName;
-
 
39525
 
-
 
39526
      _Fields(short thriftId, String fieldName) {
-
 
39527
        _thriftId = thriftId;
-
 
39528
        _fieldName = fieldName;
-
 
39529
      }
-
 
39530
 
-
 
39531
      public short getThriftFieldId() {
-
 
39532
        return _thriftId;
-
 
39533
      }
-
 
39534
 
-
 
39535
      public String getFieldName() {
-
 
39536
        return _fieldName;
-
 
39537
      }
-
 
39538
    }
-
 
39539
 
-
 
39540
    // isset id assignments
-
 
39541
    private static final int __CARTID_ISSET_ID = 0;
-
 
39542
    private static final int __STOREID_ISSET_ID = 1;
-
 
39543
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
39544
 
-
 
39545
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
39546
    static {
-
 
39547
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
39548
      tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
39549
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
39550
      tmpMap.put(_Fields.STORE_ID, new org.apache.thrift.meta_data.FieldMetaData("storeId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
39551
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
39552
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
39553
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addStoreToCart_args.class, metaDataMap);
-
 
39554
    }
-
 
39555
 
-
 
39556
    public addStoreToCart_args() {
-
 
39557
    }
-
 
39558
 
-
 
39559
    public addStoreToCart_args(
-
 
39560
      long cartId,
-
 
39561
      long storeId)
-
 
39562
    {
-
 
39563
      this();
-
 
39564
      this.cartId = cartId;
-
 
39565
      setCartIdIsSet(true);
-
 
39566
      this.storeId = storeId;
-
 
39567
      setStoreIdIsSet(true);
-
 
39568
    }
-
 
39569
 
-
 
39570
    /**
-
 
39571
     * Performs a deep copy on <i>other</i>.
-
 
39572
     */
-
 
39573
    public addStoreToCart_args(addStoreToCart_args other) {
-
 
39574
      __isset_bit_vector.clear();
-
 
39575
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
39576
      this.cartId = other.cartId;
-
 
39577
      this.storeId = other.storeId;
-
 
39578
    }
-
 
39579
 
-
 
39580
    public addStoreToCart_args deepCopy() {
-
 
39581
      return new addStoreToCart_args(this);
-
 
39582
    }
-
 
39583
 
-
 
39584
    @Override
-
 
39585
    public void clear() {
-
 
39586
      setCartIdIsSet(false);
-
 
39587
      this.cartId = 0;
-
 
39588
      setStoreIdIsSet(false);
-
 
39589
      this.storeId = 0;
-
 
39590
    }
-
 
39591
 
-
 
39592
    public long getCartId() {
-
 
39593
      return this.cartId;
-
 
39594
    }
-
 
39595
 
-
 
39596
    public void setCartId(long cartId) {
-
 
39597
      this.cartId = cartId;
-
 
39598
      setCartIdIsSet(true);
-
 
39599
    }
-
 
39600
 
-
 
39601
    public void unsetCartId() {
-
 
39602
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
-
 
39603
    }
-
 
39604
 
-
 
39605
    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
-
 
39606
    public boolean isSetCartId() {
-
 
39607
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
-
 
39608
    }
-
 
39609
 
-
 
39610
    public void setCartIdIsSet(boolean value) {
-
 
39611
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
-
 
39612
    }
-
 
39613
 
-
 
39614
    public long getStoreId() {
-
 
39615
      return this.storeId;
-
 
39616
    }
-
 
39617
 
-
 
39618
    public void setStoreId(long storeId) {
-
 
39619
      this.storeId = storeId;
-
 
39620
      setStoreIdIsSet(true);
-
 
39621
    }
-
 
39622
 
-
 
39623
    public void unsetStoreId() {
-
 
39624
      __isset_bit_vector.clear(__STOREID_ISSET_ID);
-
 
39625
    }
-
 
39626
 
-
 
39627
    /** Returns true if field storeId is set (has been assigned a value) and false otherwise */
-
 
39628
    public boolean isSetStoreId() {
-
 
39629
      return __isset_bit_vector.get(__STOREID_ISSET_ID);
-
 
39630
    }
-
 
39631
 
-
 
39632
    public void setStoreIdIsSet(boolean value) {
-
 
39633
      __isset_bit_vector.set(__STOREID_ISSET_ID, value);
-
 
39634
    }
-
 
39635
 
-
 
39636
    public void setFieldValue(_Fields field, Object value) {
-
 
39637
      switch (field) {
-
 
39638
      case CART_ID:
-
 
39639
        if (value == null) {
-
 
39640
          unsetCartId();
-
 
39641
        } else {
-
 
39642
          setCartId((Long)value);
-
 
39643
        }
-
 
39644
        break;
-
 
39645
 
-
 
39646
      case STORE_ID:
-
 
39647
        if (value == null) {
-
 
39648
          unsetStoreId();
-
 
39649
        } else {
-
 
39650
          setStoreId((Long)value);
-
 
39651
        }
-
 
39652
        break;
-
 
39653
 
-
 
39654
      }
-
 
39655
    }
-
 
39656
 
-
 
39657
    public Object getFieldValue(_Fields field) {
-
 
39658
      switch (field) {
-
 
39659
      case CART_ID:
-
 
39660
        return Long.valueOf(getCartId());
-
 
39661
 
-
 
39662
      case STORE_ID:
-
 
39663
        return Long.valueOf(getStoreId());
-
 
39664
 
-
 
39665
      }
-
 
39666
      throw new IllegalStateException();
-
 
39667
    }
-
 
39668
 
-
 
39669
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
39670
    public boolean isSet(_Fields field) {
-
 
39671
      if (field == null) {
-
 
39672
        throw new IllegalArgumentException();
-
 
39673
      }
-
 
39674
 
-
 
39675
      switch (field) {
-
 
39676
      case CART_ID:
-
 
39677
        return isSetCartId();
-
 
39678
      case STORE_ID:
-
 
39679
        return isSetStoreId();
-
 
39680
      }
-
 
39681
      throw new IllegalStateException();
-
 
39682
    }
-
 
39683
 
-
 
39684
    @Override
-
 
39685
    public boolean equals(Object that) {
-
 
39686
      if (that == null)
-
 
39687
        return false;
-
 
39688
      if (that instanceof addStoreToCart_args)
-
 
39689
        return this.equals((addStoreToCart_args)that);
-
 
39690
      return false;
-
 
39691
    }
-
 
39692
 
-
 
39693
    public boolean equals(addStoreToCart_args that) {
-
 
39694
      if (that == null)
-
 
39695
        return false;
-
 
39696
 
-
 
39697
      boolean this_present_cartId = true;
-
 
39698
      boolean that_present_cartId = true;
-
 
39699
      if (this_present_cartId || that_present_cartId) {
-
 
39700
        if (!(this_present_cartId && that_present_cartId))
-
 
39701
          return false;
-
 
39702
        if (this.cartId != that.cartId)
-
 
39703
          return false;
-
 
39704
      }
-
 
39705
 
-
 
39706
      boolean this_present_storeId = true;
-
 
39707
      boolean that_present_storeId = true;
-
 
39708
      if (this_present_storeId || that_present_storeId) {
-
 
39709
        if (!(this_present_storeId && that_present_storeId))
-
 
39710
          return false;
-
 
39711
        if (this.storeId != that.storeId)
-
 
39712
          return false;
-
 
39713
      }
-
 
39714
 
-
 
39715
      return true;
-
 
39716
    }
-
 
39717
 
-
 
39718
    @Override
-
 
39719
    public int hashCode() {
-
 
39720
      return 0;
-
 
39721
    }
-
 
39722
 
-
 
39723
    public int compareTo(addStoreToCart_args other) {
-
 
39724
      if (!getClass().equals(other.getClass())) {
-
 
39725
        return getClass().getName().compareTo(other.getClass().getName());
-
 
39726
      }
-
 
39727
 
-
 
39728
      int lastComparison = 0;
-
 
39729
      addStoreToCart_args typedOther = (addStoreToCart_args)other;
-
 
39730
 
-
 
39731
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
-
 
39732
      if (lastComparison != 0) {
-
 
39733
        return lastComparison;
-
 
39734
      }
-
 
39735
      if (isSetCartId()) {
-
 
39736
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
-
 
39737
        if (lastComparison != 0) {
-
 
39738
          return lastComparison;
-
 
39739
        }
-
 
39740
      }
-
 
39741
      lastComparison = Boolean.valueOf(isSetStoreId()).compareTo(typedOther.isSetStoreId());
-
 
39742
      if (lastComparison != 0) {
-
 
39743
        return lastComparison;
-
 
39744
      }
-
 
39745
      if (isSetStoreId()) {
-
 
39746
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storeId, typedOther.storeId);
-
 
39747
        if (lastComparison != 0) {
-
 
39748
          return lastComparison;
-
 
39749
        }
-
 
39750
      }
-
 
39751
      return 0;
-
 
39752
    }
-
 
39753
 
-
 
39754
    public _Fields fieldForId(int fieldId) {
-
 
39755
      return _Fields.findByThriftId(fieldId);
-
 
39756
    }
-
 
39757
 
-
 
39758
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
39759
      org.apache.thrift.protocol.TField field;
-
 
39760
      iprot.readStructBegin();
-
 
39761
      while (true)
-
 
39762
      {
-
 
39763
        field = iprot.readFieldBegin();
-
 
39764
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
39765
          break;
-
 
39766
        }
-
 
39767
        switch (field.id) {
-
 
39768
          case 1: // CART_ID
-
 
39769
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
39770
              this.cartId = iprot.readI64();
-
 
39771
              setCartIdIsSet(true);
-
 
39772
            } else { 
-
 
39773
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
39774
            }
-
 
39775
            break;
-
 
39776
          case 2: // STORE_ID
-
 
39777
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
39778
              this.storeId = iprot.readI64();
-
 
39779
              setStoreIdIsSet(true);
-
 
39780
            } else { 
-
 
39781
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
39782
            }
-
 
39783
            break;
-
 
39784
          default:
-
 
39785
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
39786
        }
-
 
39787
        iprot.readFieldEnd();
-
 
39788
      }
-
 
39789
      iprot.readStructEnd();
-
 
39790
      validate();
-
 
39791
    }
-
 
39792
 
-
 
39793
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
39794
      validate();
-
 
39795
 
-
 
39796
      oprot.writeStructBegin(STRUCT_DESC);
-
 
39797
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
-
 
39798
      oprot.writeI64(this.cartId);
-
 
39799
      oprot.writeFieldEnd();
-
 
39800
      oprot.writeFieldBegin(STORE_ID_FIELD_DESC);
-
 
39801
      oprot.writeI64(this.storeId);
-
 
39802
      oprot.writeFieldEnd();
-
 
39803
      oprot.writeFieldStop();
-
 
39804
      oprot.writeStructEnd();
-
 
39805
    }
-
 
39806
 
-
 
39807
    @Override
-
 
39808
    public String toString() {
-
 
39809
      StringBuilder sb = new StringBuilder("addStoreToCart_args(");
-
 
39810
      boolean first = true;
-
 
39811
 
-
 
39812
      sb.append("cartId:");
-
 
39813
      sb.append(this.cartId);
-
 
39814
      first = false;
-
 
39815
      if (!first) sb.append(", ");
-
 
39816
      sb.append("storeId:");
-
 
39817
      sb.append(this.storeId);
-
 
39818
      first = false;
-
 
39819
      sb.append(")");
-
 
39820
      return sb.toString();
-
 
39821
    }
-
 
39822
 
-
 
39823
    public void validate() throws org.apache.thrift.TException {
-
 
39824
      // check for required fields
-
 
39825
    }
-
 
39826
 
-
 
39827
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
39828
      try {
-
 
39829
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
39830
      } catch (org.apache.thrift.TException te) {
-
 
39831
        throw new java.io.IOException(te);
-
 
39832
      }
-
 
39833
    }
-
 
39834
 
-
 
39835
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
39836
      try {
-
 
39837
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
39838
        __isset_bit_vector = new BitSet(1);
-
 
39839
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
39840
      } catch (org.apache.thrift.TException te) {
-
 
39841
        throw new java.io.IOException(te);
-
 
39842
      }
-
 
39843
    }
-
 
39844
 
-
 
39845
  }
-
 
39846
 
-
 
39847
  public static class addStoreToCart_result implements org.apache.thrift.TBase<addStoreToCart_result, addStoreToCart_result._Fields>, java.io.Serializable, Cloneable   {
-
 
39848
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addStoreToCart_result");
-
 
39849
 
-
 
39850
    private static final org.apache.thrift.protocol.TField SCX_FIELD_DESC = new org.apache.thrift.protocol.TField("scx", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
39851
 
-
 
39852
    private ShoppingCartException scx; // required
-
 
39853
 
-
 
39854
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
39855
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
39856
      SCX((short)1, "scx");
-
 
39857
 
-
 
39858
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
39859
 
-
 
39860
      static {
-
 
39861
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
39862
          byName.put(field.getFieldName(), field);
-
 
39863
        }
-
 
39864
      }
-
 
39865
 
-
 
39866
      /**
-
 
39867
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
39868
       */
-
 
39869
      public static _Fields findByThriftId(int fieldId) {
-
 
39870
        switch(fieldId) {
-
 
39871
          case 1: // SCX
-
 
39872
            return SCX;
-
 
39873
          default:
-
 
39874
            return null;
-
 
39875
        }
-
 
39876
      }
-
 
39877
 
-
 
39878
      /**
-
 
39879
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
39880
       * if it is not found.
-
 
39881
       */
-
 
39882
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
39883
        _Fields fields = findByThriftId(fieldId);
-
 
39884
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
39885
        return fields;
-
 
39886
      }
-
 
39887
 
-
 
39888
      /**
-
 
39889
       * Find the _Fields constant that matches name, or null if its not found.
-
 
39890
       */
-
 
39891
      public static _Fields findByName(String name) {
-
 
39892
        return byName.get(name);
-
 
39893
      }
-
 
39894
 
-
 
39895
      private final short _thriftId;
-
 
39896
      private final String _fieldName;
-
 
39897
 
-
 
39898
      _Fields(short thriftId, String fieldName) {
-
 
39899
        _thriftId = thriftId;
-
 
39900
        _fieldName = fieldName;
-
 
39901
      }
-
 
39902
 
-
 
39903
      public short getThriftFieldId() {
-
 
39904
        return _thriftId;
-
 
39905
      }
-
 
39906
 
-
 
39907
      public String getFieldName() {
-
 
39908
        return _fieldName;
-
 
39909
      }
-
 
39910
    }
-
 
39911
 
-
 
39912
    // isset id assignments
-
 
39913
 
-
 
39914
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
39915
    static {
-
 
39916
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
39917
      tmpMap.put(_Fields.SCX, new org.apache.thrift.meta_data.FieldMetaData("scx", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
39918
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
39919
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
39920
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addStoreToCart_result.class, metaDataMap);
-
 
39921
    }
-
 
39922
 
-
 
39923
    public addStoreToCart_result() {
-
 
39924
    }
-
 
39925
 
-
 
39926
    public addStoreToCart_result(
-
 
39927
      ShoppingCartException scx)
-
 
39928
    {
-
 
39929
      this();
-
 
39930
      this.scx = scx;
-
 
39931
    }
-
 
39932
 
-
 
39933
    /**
-
 
39934
     * Performs a deep copy on <i>other</i>.
-
 
39935
     */
-
 
39936
    public addStoreToCart_result(addStoreToCart_result other) {
-
 
39937
      if (other.isSetScx()) {
-
 
39938
        this.scx = new ShoppingCartException(other.scx);
-
 
39939
      }
-
 
39940
    }
-
 
39941
 
-
 
39942
    public addStoreToCart_result deepCopy() {
-
 
39943
      return new addStoreToCart_result(this);
-
 
39944
    }
-
 
39945
 
-
 
39946
    @Override
-
 
39947
    public void clear() {
-
 
39948
      this.scx = null;
-
 
39949
    }
-
 
39950
 
-
 
39951
    public ShoppingCartException getScx() {
-
 
39952
      return this.scx;
-
 
39953
    }
-
 
39954
 
-
 
39955
    public void setScx(ShoppingCartException scx) {
-
 
39956
      this.scx = scx;
-
 
39957
    }
-
 
39958
 
-
 
39959
    public void unsetScx() {
-
 
39960
      this.scx = null;
-
 
39961
    }
-
 
39962
 
-
 
39963
    /** Returns true if field scx is set (has been assigned a value) and false otherwise */
-
 
39964
    public boolean isSetScx() {
-
 
39965
      return this.scx != null;
-
 
39966
    }
-
 
39967
 
-
 
39968
    public void setScxIsSet(boolean value) {
-
 
39969
      if (!value) {
-
 
39970
        this.scx = null;
-
 
39971
      }
-
 
39972
    }
-
 
39973
 
-
 
39974
    public void setFieldValue(_Fields field, Object value) {
-
 
39975
      switch (field) {
-
 
39976
      case SCX:
-
 
39977
        if (value == null) {
-
 
39978
          unsetScx();
-
 
39979
        } else {
-
 
39980
          setScx((ShoppingCartException)value);
-
 
39981
        }
-
 
39982
        break;
-
 
39983
 
-
 
39984
      }
-
 
39985
    }
-
 
39986
 
-
 
39987
    public Object getFieldValue(_Fields field) {
-
 
39988
      switch (field) {
-
 
39989
      case SCX:
-
 
39990
        return getScx();
-
 
39991
 
-
 
39992
      }
-
 
39993
      throw new IllegalStateException();
-
 
39994
    }
-
 
39995
 
-
 
39996
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
39997
    public boolean isSet(_Fields field) {
-
 
39998
      if (field == null) {
-
 
39999
        throw new IllegalArgumentException();
-
 
40000
      }
-
 
40001
 
-
 
40002
      switch (field) {
-
 
40003
      case SCX:
-
 
40004
        return isSetScx();
-
 
40005
      }
-
 
40006
      throw new IllegalStateException();
-
 
40007
    }
-
 
40008
 
-
 
40009
    @Override
-
 
40010
    public boolean equals(Object that) {
-
 
40011
      if (that == null)
-
 
40012
        return false;
-
 
40013
      if (that instanceof addStoreToCart_result)
-
 
40014
        return this.equals((addStoreToCart_result)that);
-
 
40015
      return false;
-
 
40016
    }
-
 
40017
 
-
 
40018
    public boolean equals(addStoreToCart_result that) {
-
 
40019
      if (that == null)
-
 
40020
        return false;
-
 
40021
 
-
 
40022
      boolean this_present_scx = true && this.isSetScx();
-
 
40023
      boolean that_present_scx = true && that.isSetScx();
-
 
40024
      if (this_present_scx || that_present_scx) {
-
 
40025
        if (!(this_present_scx && that_present_scx))
-
 
40026
          return false;
-
 
40027
        if (!this.scx.equals(that.scx))
-
 
40028
          return false;
-
 
40029
      }
-
 
40030
 
-
 
40031
      return true;
-
 
40032
    }
-
 
40033
 
-
 
40034
    @Override
-
 
40035
    public int hashCode() {
-
 
40036
      return 0;
-
 
40037
    }
-
 
40038
 
-
 
40039
    public int compareTo(addStoreToCart_result other) {
-
 
40040
      if (!getClass().equals(other.getClass())) {
-
 
40041
        return getClass().getName().compareTo(other.getClass().getName());
-
 
40042
      }
-
 
40043
 
-
 
40044
      int lastComparison = 0;
-
 
40045
      addStoreToCart_result typedOther = (addStoreToCart_result)other;
-
 
40046
 
-
 
40047
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(typedOther.isSetScx());
-
 
40048
      if (lastComparison != 0) {
-
 
40049
        return lastComparison;
-
 
40050
      }
-
 
40051
      if (isSetScx()) {
-
 
40052
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scx, typedOther.scx);
-
 
40053
        if (lastComparison != 0) {
-
 
40054
          return lastComparison;
-
 
40055
        }
-
 
40056
      }
-
 
40057
      return 0;
-
 
40058
    }
-
 
40059
 
-
 
40060
    public _Fields fieldForId(int fieldId) {
-
 
40061
      return _Fields.findByThriftId(fieldId);
-
 
40062
    }
-
 
40063
 
-
 
40064
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
40065
      org.apache.thrift.protocol.TField field;
-
 
40066
      iprot.readStructBegin();
-
 
40067
      while (true)
-
 
40068
      {
-
 
40069
        field = iprot.readFieldBegin();
-
 
40070
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
40071
          break;
-
 
40072
        }
-
 
40073
        switch (field.id) {
-
 
40074
          case 1: // SCX
-
 
40075
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
40076
              this.scx = new ShoppingCartException();
-
 
40077
              this.scx.read(iprot);
-
 
40078
            } else { 
-
 
40079
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
40080
            }
-
 
40081
            break;
-
 
40082
          default:
-
 
40083
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
40084
        }
-
 
40085
        iprot.readFieldEnd();
-
 
40086
      }
-
 
40087
      iprot.readStructEnd();
-
 
40088
      validate();
-
 
40089
    }
-
 
40090
 
-
 
40091
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
40092
      oprot.writeStructBegin(STRUCT_DESC);
-
 
40093
 
-
 
40094
      if (this.isSetScx()) {
-
 
40095
        oprot.writeFieldBegin(SCX_FIELD_DESC);
-
 
40096
        this.scx.write(oprot);
-
 
40097
        oprot.writeFieldEnd();
-
 
40098
      }
-
 
40099
      oprot.writeFieldStop();
-
 
40100
      oprot.writeStructEnd();
-
 
40101
    }
-
 
40102
 
-
 
40103
    @Override
-
 
40104
    public String toString() {
-
 
40105
      StringBuilder sb = new StringBuilder("addStoreToCart_result(");
-
 
40106
      boolean first = true;
-
 
40107
 
-
 
40108
      sb.append("scx:");
-
 
40109
      if (this.scx == null) {
-
 
40110
        sb.append("null");
-
 
40111
      } else {
-
 
40112
        sb.append(this.scx);
-
 
40113
      }
-
 
40114
      first = false;
-
 
40115
      sb.append(")");
-
 
40116
      return sb.toString();
-
 
40117
    }
-
 
40118
 
-
 
40119
    public void validate() throws org.apache.thrift.TException {
-
 
40120
      // check for required fields
-
 
40121
    }
-
 
40122
 
-
 
40123
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
40124
      try {
-
 
40125
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
40126
      } catch (org.apache.thrift.TException te) {
-
 
40127
        throw new java.io.IOException(te);
-
 
40128
      }
-
 
40129
    }
-
 
40130
 
-
 
40131
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
40132
      try {
-
 
40133
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
40134
      } catch (org.apache.thrift.TException te) {
-
 
40135
        throw new java.io.IOException(te);
-
 
40136
      }
-
 
40137
    }
-
 
40138
 
-
 
40139
  }
-
 
40140
 
39386
  public static class applyCouponToCart_args implements org.apache.thrift.TBase<applyCouponToCart_args, applyCouponToCart_args._Fields>, java.io.Serializable, Cloneable   {
40141
  public static class applyCouponToCart_args implements org.apache.thrift.TBase<applyCouponToCart_args, applyCouponToCart_args._Fields>, java.io.Serializable, Cloneable   {
39387
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("applyCouponToCart_args");
40142
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("applyCouponToCart_args");
39388
 
40143
 
39389
    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
40144
    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
39390
    private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)2);
40145
    private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)2);
Line 53180... Line 53935...
53180
      }
53935
      }
53181
    }
53936
    }
53182
 
53937
 
53183
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
53938
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
53184
      try {
53939
      try {
53185
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
53186
        __isset_bit_vector = new BitSet(1);
-
 
53187
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
53940
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
53188
      } catch (org.apache.thrift.TException te) {
53941
      } catch (org.apache.thrift.TException te) {
53189
        throw new java.io.IOException(te);
53942
        throw new java.io.IOException(te);
53190
      }
53943
      }
53191
    }
53944
    }
Line 53474... Line 54227...
53474
      }
54227
      }
53475
    }
54228
    }
53476
 
54229
 
53477
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
54230
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
53478
      try {
54231
      try {
-
 
54232
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
54233
        __isset_bit_vector = new BitSet(1);
53479
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
54234
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
53480
      } catch (org.apache.thrift.TException te) {
54235
      } catch (org.apache.thrift.TException te) {
53481
        throw new java.io.IOException(te);
54236
        throw new java.io.IOException(te);
53482
      }
54237
      }
53483
    }
54238
    }