Subversion Repositories SmartDukaan

Rev

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

Rev 20873 Rev 20930
Line 894... Line 894...
894
 
894
 
895
    public String validateRecharge(RechargeType rechargeType, String deviceNumber, long userSelectedProviderId, String clientAddress) throws org.apache.thrift.TException;
895
    public String validateRecharge(RechargeType rechargeType, String deviceNumber, long userSelectedProviderId, String clientAddress) throws org.apache.thrift.TException;
896
 
896
 
897
    public List<RechargeOrder> getRechargeOrdersForDevice(String deviceNumber) throws org.apache.thrift.TException;
897
    public List<RechargeOrder> getRechargeOrdersForDevice(String deviceNumber) throws org.apache.thrift.TException;
898
 
898
 
899
    public void addAmountToWallet(long userId, long orderId, long amount) throws org.apache.thrift.TException;
-
 
900
 
-
 
901
    public void creditBatch(long batchId, String userAmount) throws org.apache.thrift.TException;
899
    public void creditBatch(long batchId, String userAmount) throws org.apache.thrift.TException;
902
 
900
 
903
    public RechargeStatistics getRechargeStatistics() throws org.apache.thrift.TException;
901
    public RechargeStatistics getRechargeStatistics() throws org.apache.thrift.TException;
904
 
902
 
905
    public List<RechargeOrder> getRechargeOrdersForStatus(long status) throws org.apache.thrift.TException;
903
    public List<RechargeOrder> getRechargeOrdersForStatus(long status) throws org.apache.thrift.TException;
Line 1542... Line 1540...
1542
 
1540
 
1543
    public void validateRecharge(RechargeType rechargeType, String deviceNumber, long userSelectedProviderId, String clientAddress, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.validateRecharge_call> resultHandler) throws org.apache.thrift.TException;
1541
    public void validateRecharge(RechargeType rechargeType, String deviceNumber, long userSelectedProviderId, String clientAddress, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.validateRecharge_call> resultHandler) throws org.apache.thrift.TException;
1544
 
1542
 
1545
    public void getRechargeOrdersForDevice(String deviceNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRechargeOrdersForDevice_call> resultHandler) throws org.apache.thrift.TException;
1543
    public void getRechargeOrdersForDevice(String deviceNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRechargeOrdersForDevice_call> resultHandler) throws org.apache.thrift.TException;
1546
 
1544
 
1547
    public void addAmountToWallet(long userId, long orderId, long amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addAmountToWallet_call> resultHandler) throws org.apache.thrift.TException;
-
 
1548
 
-
 
1549
    public void creditBatch(long batchId, String userAmount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.creditBatch_call> resultHandler) throws org.apache.thrift.TException;
1545
    public void creditBatch(long batchId, String userAmount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.creditBatch_call> resultHandler) throws org.apache.thrift.TException;
1550
 
1546
 
1551
    public void getRechargeStatistics(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRechargeStatistics_call> resultHandler) throws org.apache.thrift.TException;
1547
    public void getRechargeStatistics(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRechargeStatistics_call> resultHandler) throws org.apache.thrift.TException;
1552
 
1548
 
1553
    public void getRechargeOrdersForStatus(long status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRechargeOrdersForStatus_call> resultHandler) throws org.apache.thrift.TException;
1549
    public void getRechargeOrdersForStatus(long status, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRechargeOrdersForStatus_call> resultHandler) throws org.apache.thrift.TException;
Line 5482... Line 5478...
5482
        return result.success;
5478
        return result.success;
5483
      }
5479
      }
5484
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRechargeOrdersForDevice failed: unknown result");
5480
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRechargeOrdersForDevice failed: unknown result");
5485
    }
5481
    }
5486
 
5482
 
5487
    public void addAmountToWallet(long userId, long orderId, long amount) throws org.apache.thrift.TException
-
 
5488
    {
-
 
5489
      send_addAmountToWallet(userId, orderId, amount);
-
 
5490
      recv_addAmountToWallet();
-
 
5491
    }
-
 
5492
 
-
 
5493
    public void send_addAmountToWallet(long userId, long orderId, long amount) throws org.apache.thrift.TException
-
 
5494
    {
-
 
5495
      addAmountToWallet_args args = new addAmountToWallet_args();
-
 
5496
      args.setUserId(userId);
-
 
5497
      args.setOrderId(orderId);
-
 
5498
      args.setAmount(amount);
-
 
5499
      sendBase("addAmountToWallet", args);
-
 
5500
    }
-
 
5501
 
-
 
5502
    public void recv_addAmountToWallet() throws org.apache.thrift.TException
-
 
5503
    {
-
 
5504
      addAmountToWallet_result result = new addAmountToWallet_result();
-
 
5505
      receiveBase(result, "addAmountToWallet");
-
 
5506
      return;
-
 
5507
    }
-
 
5508
 
-
 
5509
    public void creditBatch(long batchId, String userAmount) throws org.apache.thrift.TException
5483
    public void creditBatch(long batchId, String userAmount) throws org.apache.thrift.TException
5510
    {
5484
    {
5511
      send_creditBatch(batchId, userAmount);
5485
      send_creditBatch(batchId, userAmount);
5512
      recv_creditBatch();
5486
      recv_creditBatch();
5513
    }
5487
    }
Line 14551... Line 14525...
14551
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
14525
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
14552
        return (new Client(prot)).recv_getRechargeOrdersForDevice();
14526
        return (new Client(prot)).recv_getRechargeOrdersForDevice();
14553
      }
14527
      }
14554
    }
14528
    }
14555
 
14529
 
14556
    public void addAmountToWallet(long userId, long orderId, long amount, org.apache.thrift.async.AsyncMethodCallback<addAmountToWallet_call> resultHandler) throws org.apache.thrift.TException {
-
 
14557
      checkReady();
-
 
14558
      addAmountToWallet_call method_call = new addAmountToWallet_call(userId, orderId, amount, resultHandler, this, ___protocolFactory, ___transport);
-
 
14559
      this.___currentMethod = method_call;
-
 
14560
      ___manager.call(method_call);
-
 
14561
    }
-
 
14562
 
-
 
14563
    public static class addAmountToWallet_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
14564
      private long userId;
-
 
14565
      private long orderId;
-
 
14566
      private long amount;
-
 
14567
      public addAmountToWallet_call(long userId, long orderId, long amount, org.apache.thrift.async.AsyncMethodCallback<addAmountToWallet_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 {
-
 
14568
        super(client, protocolFactory, transport, resultHandler, false);
-
 
14569
        this.userId = userId;
-
 
14570
        this.orderId = orderId;
-
 
14571
        this.amount = amount;
-
 
14572
      }
-
 
14573
 
-
 
14574
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
14575
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addAmountToWallet", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
14576
        addAmountToWallet_args args = new addAmountToWallet_args();
-
 
14577
        args.setUserId(userId);
-
 
14578
        args.setOrderId(orderId);
-
 
14579
        args.setAmount(amount);
-
 
14580
        args.write(prot);
-
 
14581
        prot.writeMessageEnd();
-
 
14582
      }
-
 
14583
 
-
 
14584
      public void getResult() throws org.apache.thrift.TException {
-
 
14585
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
14586
          throw new IllegalStateException("Method call not finished!");
-
 
14587
        }
-
 
14588
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
14589
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
14590
        (new Client(prot)).recv_addAmountToWallet();
-
 
14591
      }
-
 
14592
    }
-
 
14593
 
-
 
14594
    public void creditBatch(long batchId, String userAmount, org.apache.thrift.async.AsyncMethodCallback<creditBatch_call> resultHandler) throws org.apache.thrift.TException {
14530
    public void creditBatch(long batchId, String userAmount, org.apache.thrift.async.AsyncMethodCallback<creditBatch_call> resultHandler) throws org.apache.thrift.TException {
14595
      checkReady();
14531
      checkReady();
14596
      creditBatch_call method_call = new creditBatch_call(batchId, userAmount, resultHandler, this, ___protocolFactory, ___transport);
14532
      creditBatch_call method_call = new creditBatch_call(batchId, userAmount, resultHandler, this, ___protocolFactory, ___transport);
14597
      this.___currentMethod = method_call;
14533
      this.___currentMethod = method_call;
14598
      ___manager.call(method_call);
14534
      ___manager.call(method_call);
Line 20539... Line 20475...
20539
      processMap.put("getRechargeOrdersForTransaction", new getRechargeOrdersForTransaction());
20475
      processMap.put("getRechargeOrdersForTransaction", new getRechargeOrdersForTransaction());
20540
      processMap.put("getServiceProviders", new getServiceProviders());
20476
      processMap.put("getServiceProviders", new getServiceProviders());
20541
      processMap.put("getServiceProviderForDevice", new getServiceProviderForDevice());
20477
      processMap.put("getServiceProviderForDevice", new getServiceProviderForDevice());
20542
      processMap.put("validateRecharge", new validateRecharge());
20478
      processMap.put("validateRecharge", new validateRecharge());
20543
      processMap.put("getRechargeOrdersForDevice", new getRechargeOrdersForDevice());
20479
      processMap.put("getRechargeOrdersForDevice", new getRechargeOrdersForDevice());
20544
      processMap.put("addAmountToWallet", new addAmountToWallet());
-
 
20545
      processMap.put("creditBatch", new creditBatch());
20480
      processMap.put("creditBatch", new creditBatch());
20546
      processMap.put("getRechargeStatistics", new getRechargeStatistics());
20481
      processMap.put("getRechargeStatistics", new getRechargeStatistics());
20547
      processMap.put("getRechargeOrdersForStatus", new getRechargeOrdersForStatus());
20482
      processMap.put("getRechargeOrdersForStatus", new getRechargeOrdersForStatus());
20548
      processMap.put("getPlansForOperator", new getPlansForOperator());
20483
      processMap.put("getPlansForOperator", new getPlansForOperator());
20549
      processMap.put("getRechargeDenominations", new getRechargeDenominations());
20484
      processMap.put("getRechargeDenominations", new getRechargeDenominations());
Line 23390... Line 23325...
23390
        result.success = iface.getRechargeOrdersForDevice(args.deviceNumber);
23325
        result.success = iface.getRechargeOrdersForDevice(args.deviceNumber);
23391
        return result;
23326
        return result;
23392
      }
23327
      }
23393
    }
23328
    }
23394
 
23329
 
23395
    private static class addAmountToWallet<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addAmountToWallet_args> {
-
 
23396
      public addAmountToWallet() {
-
 
23397
        super("addAmountToWallet");
-
 
23398
      }
-
 
23399
 
-
 
23400
      protected addAmountToWallet_args getEmptyArgsInstance() {
-
 
23401
        return new addAmountToWallet_args();
-
 
23402
      }
-
 
23403
 
-
 
23404
      protected addAmountToWallet_result getResult(I iface, addAmountToWallet_args args) throws org.apache.thrift.TException {
-
 
23405
        addAmountToWallet_result result = new addAmountToWallet_result();
-
 
23406
        iface.addAmountToWallet(args.userId, args.orderId, args.amount);
-
 
23407
        return result;
-
 
23408
      }
-
 
23409
    }
-
 
23410
 
-
 
23411
    private static class creditBatch<I extends Iface> extends org.apache.thrift.ProcessFunction<I, creditBatch_args> {
23330
    private static class creditBatch<I extends Iface> extends org.apache.thrift.ProcessFunction<I, creditBatch_args> {
23412
      public creditBatch() {
23331
      public creditBatch() {
23413
        super("creditBatch");
23332
        super("creditBatch");
23414
      }
23333
      }
23415
 
23334
 
Line 130435... Line 130354...
130435
      }
130354
      }
130436
    }
130355
    }
130437
 
130356
 
130438
  }
130357
  }
130439
 
130358
 
130440
  public static class addAmountToWallet_args implements org.apache.thrift.TBase<addAmountToWallet_args, addAmountToWallet_args._Fields>, java.io.Serializable, Cloneable   {
-
 
130441
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addAmountToWallet_args");
-
 
130442
 
-
 
130443
    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
130444
    private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
130445
    private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.I64, (short)3);
-
 
130446
 
-
 
130447
    private long userId; // required
-
 
130448
    private long orderId; // required
-
 
130449
    private long amount; // required
-
 
130450
 
-
 
130451
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
130452
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
130453
      USER_ID((short)1, "userId"),
-
 
130454
      ORDER_ID((short)2, "orderId"),
-
 
130455
      AMOUNT((short)3, "amount");
-
 
130456
 
-
 
130457
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
130458
 
-
 
130459
      static {
-
 
130460
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
130461
          byName.put(field.getFieldName(), field);
-
 
130462
        }
-
 
130463
      }
-
 
130464
 
-
 
130465
      /**
-
 
130466
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
130467
       */
-
 
130468
      public static _Fields findByThriftId(int fieldId) {
-
 
130469
        switch(fieldId) {
-
 
130470
          case 1: // USER_ID
-
 
130471
            return USER_ID;
-
 
130472
          case 2: // ORDER_ID
-
 
130473
            return ORDER_ID;
-
 
130474
          case 3: // AMOUNT
-
 
130475
            return AMOUNT;
-
 
130476
          default:
-
 
130477
            return null;
-
 
130478
        }
-
 
130479
      }
-
 
130480
 
-
 
130481
      /**
-
 
130482
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
130483
       * if it is not found.
-
 
130484
       */
-
 
130485
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
130486
        _Fields fields = findByThriftId(fieldId);
-
 
130487
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
130488
        return fields;
-
 
130489
      }
-
 
130490
 
-
 
130491
      /**
-
 
130492
       * Find the _Fields constant that matches name, or null if its not found.
-
 
130493
       */
-
 
130494
      public static _Fields findByName(String name) {
-
 
130495
        return byName.get(name);
-
 
130496
      }
-
 
130497
 
-
 
130498
      private final short _thriftId;
-
 
130499
      private final String _fieldName;
-
 
130500
 
-
 
130501
      _Fields(short thriftId, String fieldName) {
-
 
130502
        _thriftId = thriftId;
-
 
130503
        _fieldName = fieldName;
-
 
130504
      }
-
 
130505
 
-
 
130506
      public short getThriftFieldId() {
-
 
130507
        return _thriftId;
-
 
130508
      }
-
 
130509
 
-
 
130510
      public String getFieldName() {
-
 
130511
        return _fieldName;
-
 
130512
      }
-
 
130513
    }
-
 
130514
 
-
 
130515
    // isset id assignments
-
 
130516
    private static final int __USERID_ISSET_ID = 0;
-
 
130517
    private static final int __ORDERID_ISSET_ID = 1;
-
 
130518
    private static final int __AMOUNT_ISSET_ID = 2;
-
 
130519
    private BitSet __isset_bit_vector = new BitSet(3);
-
 
130520
 
-
 
130521
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
130522
    static {
-
 
130523
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
130524
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
130525
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
130526
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
130527
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
130528
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
130529
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
130530
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
130531
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addAmountToWallet_args.class, metaDataMap);
-
 
130532
    }
-
 
130533
 
-
 
130534
    public addAmountToWallet_args() {
-
 
130535
    }
-
 
130536
 
-
 
130537
    public addAmountToWallet_args(
-
 
130538
      long userId,
-
 
130539
      long orderId,
-
 
130540
      long amount)
-
 
130541
    {
-
 
130542
      this();
-
 
130543
      this.userId = userId;
-
 
130544
      setUserIdIsSet(true);
-
 
130545
      this.orderId = orderId;
-
 
130546
      setOrderIdIsSet(true);
-
 
130547
      this.amount = amount;
-
 
130548
      setAmountIsSet(true);
-
 
130549
    }
-
 
130550
 
-
 
130551
    /**
-
 
130552
     * Performs a deep copy on <i>other</i>.
-
 
130553
     */
-
 
130554
    public addAmountToWallet_args(addAmountToWallet_args other) {
-
 
130555
      __isset_bit_vector.clear();
-
 
130556
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
130557
      this.userId = other.userId;
-
 
130558
      this.orderId = other.orderId;
-
 
130559
      this.amount = other.amount;
-
 
130560
    }
-
 
130561
 
-
 
130562
    public addAmountToWallet_args deepCopy() {
-
 
130563
      return new addAmountToWallet_args(this);
-
 
130564
    }
-
 
130565
 
-
 
130566
    @Override
-
 
130567
    public void clear() {
-
 
130568
      setUserIdIsSet(false);
-
 
130569
      this.userId = 0;
-
 
130570
      setOrderIdIsSet(false);
-
 
130571
      this.orderId = 0;
-
 
130572
      setAmountIsSet(false);
-
 
130573
      this.amount = 0;
-
 
130574
    }
-
 
130575
 
-
 
130576
    public long getUserId() {
-
 
130577
      return this.userId;
-
 
130578
    }
-
 
130579
 
-
 
130580
    public void setUserId(long userId) {
-
 
130581
      this.userId = userId;
-
 
130582
      setUserIdIsSet(true);
-
 
130583
    }
-
 
130584
 
-
 
130585
    public void unsetUserId() {
-
 
130586
      __isset_bit_vector.clear(__USERID_ISSET_ID);
-
 
130587
    }
-
 
130588
 
-
 
130589
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
-
 
130590
    public boolean isSetUserId() {
-
 
130591
      return __isset_bit_vector.get(__USERID_ISSET_ID);
-
 
130592
    }
-
 
130593
 
-
 
130594
    public void setUserIdIsSet(boolean value) {
-
 
130595
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
-
 
130596
    }
-
 
130597
 
-
 
130598
    public long getOrderId() {
-
 
130599
      return this.orderId;
-
 
130600
    }
-
 
130601
 
-
 
130602
    public void setOrderId(long orderId) {
-
 
130603
      this.orderId = orderId;
-
 
130604
      setOrderIdIsSet(true);
-
 
130605
    }
-
 
130606
 
-
 
130607
    public void unsetOrderId() {
-
 
130608
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
-
 
130609
    }
-
 
130610
 
-
 
130611
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
-
 
130612
    public boolean isSetOrderId() {
-
 
130613
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
-
 
130614
    }
-
 
130615
 
-
 
130616
    public void setOrderIdIsSet(boolean value) {
-
 
130617
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
-
 
130618
    }
-
 
130619
 
-
 
130620
    public long getAmount() {
-
 
130621
      return this.amount;
-
 
130622
    }
-
 
130623
 
-
 
130624
    public void setAmount(long amount) {
-
 
130625
      this.amount = amount;
-
 
130626
      setAmountIsSet(true);
-
 
130627
    }
-
 
130628
 
-
 
130629
    public void unsetAmount() {
-
 
130630
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
-
 
130631
    }
-
 
130632
 
-
 
130633
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
-
 
130634
    public boolean isSetAmount() {
-
 
130635
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
-
 
130636
    }
-
 
130637
 
-
 
130638
    public void setAmountIsSet(boolean value) {
-
 
130639
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
-
 
130640
    }
-
 
130641
 
-
 
130642
    public void setFieldValue(_Fields field, Object value) {
-
 
130643
      switch (field) {
-
 
130644
      case USER_ID:
-
 
130645
        if (value == null) {
-
 
130646
          unsetUserId();
-
 
130647
        } else {
-
 
130648
          setUserId((Long)value);
-
 
130649
        }
-
 
130650
        break;
-
 
130651
 
-
 
130652
      case ORDER_ID:
-
 
130653
        if (value == null) {
-
 
130654
          unsetOrderId();
-
 
130655
        } else {
-
 
130656
          setOrderId((Long)value);
-
 
130657
        }
-
 
130658
        break;
-
 
130659
 
-
 
130660
      case AMOUNT:
-
 
130661
        if (value == null) {
-
 
130662
          unsetAmount();
-
 
130663
        } else {
-
 
130664
          setAmount((Long)value);
-
 
130665
        }
-
 
130666
        break;
-
 
130667
 
-
 
130668
      }
-
 
130669
    }
-
 
130670
 
-
 
130671
    public Object getFieldValue(_Fields field) {
-
 
130672
      switch (field) {
-
 
130673
      case USER_ID:
-
 
130674
        return Long.valueOf(getUserId());
-
 
130675
 
-
 
130676
      case ORDER_ID:
-
 
130677
        return Long.valueOf(getOrderId());
-
 
130678
 
-
 
130679
      case AMOUNT:
-
 
130680
        return Long.valueOf(getAmount());
-
 
130681
 
-
 
130682
      }
-
 
130683
      throw new IllegalStateException();
-
 
130684
    }
-
 
130685
 
-
 
130686
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
130687
    public boolean isSet(_Fields field) {
-
 
130688
      if (field == null) {
-
 
130689
        throw new IllegalArgumentException();
-
 
130690
      }
-
 
130691
 
-
 
130692
      switch (field) {
-
 
130693
      case USER_ID:
-
 
130694
        return isSetUserId();
-
 
130695
      case ORDER_ID:
-
 
130696
        return isSetOrderId();
-
 
130697
      case AMOUNT:
-
 
130698
        return isSetAmount();
-
 
130699
      }
-
 
130700
      throw new IllegalStateException();
-
 
130701
    }
-
 
130702
 
-
 
130703
    @Override
-
 
130704
    public boolean equals(Object that) {
-
 
130705
      if (that == null)
-
 
130706
        return false;
-
 
130707
      if (that instanceof addAmountToWallet_args)
-
 
130708
        return this.equals((addAmountToWallet_args)that);
-
 
130709
      return false;
-
 
130710
    }
-
 
130711
 
-
 
130712
    public boolean equals(addAmountToWallet_args that) {
-
 
130713
      if (that == null)
-
 
130714
        return false;
-
 
130715
 
-
 
130716
      boolean this_present_userId = true;
-
 
130717
      boolean that_present_userId = true;
-
 
130718
      if (this_present_userId || that_present_userId) {
-
 
130719
        if (!(this_present_userId && that_present_userId))
-
 
130720
          return false;
-
 
130721
        if (this.userId != that.userId)
-
 
130722
          return false;
-
 
130723
      }
-
 
130724
 
-
 
130725
      boolean this_present_orderId = true;
-
 
130726
      boolean that_present_orderId = true;
-
 
130727
      if (this_present_orderId || that_present_orderId) {
-
 
130728
        if (!(this_present_orderId && that_present_orderId))
-
 
130729
          return false;
-
 
130730
        if (this.orderId != that.orderId)
-
 
130731
          return false;
-
 
130732
      }
-
 
130733
 
-
 
130734
      boolean this_present_amount = true;
-
 
130735
      boolean that_present_amount = true;
-
 
130736
      if (this_present_amount || that_present_amount) {
-
 
130737
        if (!(this_present_amount && that_present_amount))
-
 
130738
          return false;
-
 
130739
        if (this.amount != that.amount)
-
 
130740
          return false;
-
 
130741
      }
-
 
130742
 
-
 
130743
      return true;
-
 
130744
    }
-
 
130745
 
-
 
130746
    @Override
-
 
130747
    public int hashCode() {
-
 
130748
      return 0;
-
 
130749
    }
-
 
130750
 
-
 
130751
    public int compareTo(addAmountToWallet_args other) {
-
 
130752
      if (!getClass().equals(other.getClass())) {
-
 
130753
        return getClass().getName().compareTo(other.getClass().getName());
-
 
130754
      }
-
 
130755
 
-
 
130756
      int lastComparison = 0;
-
 
130757
      addAmountToWallet_args typedOther = (addAmountToWallet_args)other;
-
 
130758
 
-
 
130759
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
-
 
130760
      if (lastComparison != 0) {
-
 
130761
        return lastComparison;
-
 
130762
      }
-
 
130763
      if (isSetUserId()) {
-
 
130764
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
-
 
130765
        if (lastComparison != 0) {
-
 
130766
          return lastComparison;
-
 
130767
        }
-
 
130768
      }
-
 
130769
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
-
 
130770
      if (lastComparison != 0) {
-
 
130771
        return lastComparison;
-
 
130772
      }
-
 
130773
      if (isSetOrderId()) {
-
 
130774
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
-
 
130775
        if (lastComparison != 0) {
-
 
130776
          return lastComparison;
-
 
130777
        }
-
 
130778
      }
-
 
130779
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
-
 
130780
      if (lastComparison != 0) {
-
 
130781
        return lastComparison;
-
 
130782
      }
-
 
130783
      if (isSetAmount()) {
-
 
130784
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
-
 
130785
        if (lastComparison != 0) {
-
 
130786
          return lastComparison;
-
 
130787
        }
-
 
130788
      }
-
 
130789
      return 0;
-
 
130790
    }
-
 
130791
 
-
 
130792
    public _Fields fieldForId(int fieldId) {
-
 
130793
      return _Fields.findByThriftId(fieldId);
-
 
130794
    }
-
 
130795
 
-
 
130796
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
130797
      org.apache.thrift.protocol.TField field;
-
 
130798
      iprot.readStructBegin();
-
 
130799
      while (true)
-
 
130800
      {
-
 
130801
        field = iprot.readFieldBegin();
-
 
130802
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
130803
          break;
-
 
130804
        }
-
 
130805
        switch (field.id) {
-
 
130806
          case 1: // USER_ID
-
 
130807
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
130808
              this.userId = iprot.readI64();
-
 
130809
              setUserIdIsSet(true);
-
 
130810
            } else { 
-
 
130811
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
130812
            }
-
 
130813
            break;
-
 
130814
          case 2: // ORDER_ID
-
 
130815
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
130816
              this.orderId = iprot.readI64();
-
 
130817
              setOrderIdIsSet(true);
-
 
130818
            } else { 
-
 
130819
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
130820
            }
-
 
130821
            break;
-
 
130822
          case 3: // AMOUNT
-
 
130823
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
130824
              this.amount = iprot.readI64();
-
 
130825
              setAmountIsSet(true);
-
 
130826
            } else { 
-
 
130827
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
130828
            }
-
 
130829
            break;
-
 
130830
          default:
-
 
130831
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
130832
        }
-
 
130833
        iprot.readFieldEnd();
-
 
130834
      }
-
 
130835
      iprot.readStructEnd();
-
 
130836
      validate();
-
 
130837
    }
-
 
130838
 
-
 
130839
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
130840
      validate();
-
 
130841
 
-
 
130842
      oprot.writeStructBegin(STRUCT_DESC);
-
 
130843
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
-
 
130844
      oprot.writeI64(this.userId);
-
 
130845
      oprot.writeFieldEnd();
-
 
130846
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
-
 
130847
      oprot.writeI64(this.orderId);
-
 
130848
      oprot.writeFieldEnd();
-
 
130849
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
-
 
130850
      oprot.writeI64(this.amount);
-
 
130851
      oprot.writeFieldEnd();
-
 
130852
      oprot.writeFieldStop();
-
 
130853
      oprot.writeStructEnd();
-
 
130854
    }
-
 
130855
 
-
 
130856
    @Override
-
 
130857
    public String toString() {
-
 
130858
      StringBuilder sb = new StringBuilder("addAmountToWallet_args(");
-
 
130859
      boolean first = true;
-
 
130860
 
-
 
130861
      sb.append("userId:");
-
 
130862
      sb.append(this.userId);
-
 
130863
      first = false;
-
 
130864
      if (!first) sb.append(", ");
-
 
130865
      sb.append("orderId:");
-
 
130866
      sb.append(this.orderId);
-
 
130867
      first = false;
-
 
130868
      if (!first) sb.append(", ");
-
 
130869
      sb.append("amount:");
-
 
130870
      sb.append(this.amount);
-
 
130871
      first = false;
-
 
130872
      sb.append(")");
-
 
130873
      return sb.toString();
-
 
130874
    }
-
 
130875
 
-
 
130876
    public void validate() throws org.apache.thrift.TException {
-
 
130877
      // check for required fields
-
 
130878
    }
-
 
130879
 
-
 
130880
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
130881
      try {
-
 
130882
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
130883
      } catch (org.apache.thrift.TException te) {
-
 
130884
        throw new java.io.IOException(te);
-
 
130885
      }
-
 
130886
    }
-
 
130887
 
-
 
130888
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
130889
      try {
-
 
130890
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
130891
        __isset_bit_vector = new BitSet(1);
-
 
130892
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
130893
      } catch (org.apache.thrift.TException te) {
-
 
130894
        throw new java.io.IOException(te);
-
 
130895
      }
-
 
130896
    }
-
 
130897
 
-
 
130898
  }
-
 
130899
 
-
 
130900
  public static class addAmountToWallet_result implements org.apache.thrift.TBase<addAmountToWallet_result, addAmountToWallet_result._Fields>, java.io.Serializable, Cloneable   {
-
 
130901
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addAmountToWallet_result");
-
 
130902
 
-
 
130903
 
-
 
130904
 
-
 
130905
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
130906
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
130907
;
-
 
130908
 
-
 
130909
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
130910
 
-
 
130911
      static {
-
 
130912
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
130913
          byName.put(field.getFieldName(), field);
-
 
130914
        }
-
 
130915
      }
-
 
130916
 
-
 
130917
      /**
-
 
130918
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
130919
       */
-
 
130920
      public static _Fields findByThriftId(int fieldId) {
-
 
130921
        switch(fieldId) {
-
 
130922
          default:
-
 
130923
            return null;
-
 
130924
        }
-
 
130925
      }
-
 
130926
 
-
 
130927
      /**
-
 
130928
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
130929
       * if it is not found.
-
 
130930
       */
-
 
130931
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
130932
        _Fields fields = findByThriftId(fieldId);
-
 
130933
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
130934
        return fields;
-
 
130935
      }
-
 
130936
 
-
 
130937
      /**
-
 
130938
       * Find the _Fields constant that matches name, or null if its not found.
-
 
130939
       */
-
 
130940
      public static _Fields findByName(String name) {
-
 
130941
        return byName.get(name);
-
 
130942
      }
-
 
130943
 
-
 
130944
      private final short _thriftId;
-
 
130945
      private final String _fieldName;
-
 
130946
 
-
 
130947
      _Fields(short thriftId, String fieldName) {
-
 
130948
        _thriftId = thriftId;
-
 
130949
        _fieldName = fieldName;
-
 
130950
      }
-
 
130951
 
-
 
130952
      public short getThriftFieldId() {
-
 
130953
        return _thriftId;
-
 
130954
      }
-
 
130955
 
-
 
130956
      public String getFieldName() {
-
 
130957
        return _fieldName;
-
 
130958
      }
-
 
130959
    }
-
 
130960
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
130961
    static {
-
 
130962
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
130963
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
130964
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addAmountToWallet_result.class, metaDataMap);
-
 
130965
    }
-
 
130966
 
-
 
130967
    public addAmountToWallet_result() {
-
 
130968
    }
-
 
130969
 
-
 
130970
    /**
-
 
130971
     * Performs a deep copy on <i>other</i>.
-
 
130972
     */
-
 
130973
    public addAmountToWallet_result(addAmountToWallet_result other) {
-
 
130974
    }
-
 
130975
 
-
 
130976
    public addAmountToWallet_result deepCopy() {
-
 
130977
      return new addAmountToWallet_result(this);
-
 
130978
    }
-
 
130979
 
-
 
130980
    @Override
-
 
130981
    public void clear() {
-
 
130982
    }
-
 
130983
 
-
 
130984
    public void setFieldValue(_Fields field, Object value) {
-
 
130985
      switch (field) {
-
 
130986
      }
-
 
130987
    }
-
 
130988
 
-
 
130989
    public Object getFieldValue(_Fields field) {
-
 
130990
      switch (field) {
-
 
130991
      }
-
 
130992
      throw new IllegalStateException();
-
 
130993
    }
-
 
130994
 
-
 
130995
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
130996
    public boolean isSet(_Fields field) {
-
 
130997
      if (field == null) {
-
 
130998
        throw new IllegalArgumentException();
-
 
130999
      }
-
 
131000
 
-
 
131001
      switch (field) {
-
 
131002
      }
-
 
131003
      throw new IllegalStateException();
-
 
131004
    }
-
 
131005
 
-
 
131006
    @Override
-
 
131007
    public boolean equals(Object that) {
-
 
131008
      if (that == null)
-
 
131009
        return false;
-
 
131010
      if (that instanceof addAmountToWallet_result)
-
 
131011
        return this.equals((addAmountToWallet_result)that);
-
 
131012
      return false;
-
 
131013
    }
-
 
131014
 
-
 
131015
    public boolean equals(addAmountToWallet_result that) {
-
 
131016
      if (that == null)
-
 
131017
        return false;
-
 
131018
 
-
 
131019
      return true;
-
 
131020
    }
-
 
131021
 
-
 
131022
    @Override
-
 
131023
    public int hashCode() {
-
 
131024
      return 0;
-
 
131025
    }
-
 
131026
 
-
 
131027
    public int compareTo(addAmountToWallet_result other) {
-
 
131028
      if (!getClass().equals(other.getClass())) {
-
 
131029
        return getClass().getName().compareTo(other.getClass().getName());
-
 
131030
      }
-
 
131031
 
-
 
131032
      int lastComparison = 0;
-
 
131033
      addAmountToWallet_result typedOther = (addAmountToWallet_result)other;
-
 
131034
 
-
 
131035
      return 0;
-
 
131036
    }
-
 
131037
 
-
 
131038
    public _Fields fieldForId(int fieldId) {
-
 
131039
      return _Fields.findByThriftId(fieldId);
-
 
131040
    }
-
 
131041
 
-
 
131042
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
131043
      org.apache.thrift.protocol.TField field;
-
 
131044
      iprot.readStructBegin();
-
 
131045
      while (true)
-
 
131046
      {
-
 
131047
        field = iprot.readFieldBegin();
-
 
131048
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
131049
          break;
-
 
131050
        }
-
 
131051
        switch (field.id) {
-
 
131052
          default:
-
 
131053
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
131054
        }
-
 
131055
        iprot.readFieldEnd();
-
 
131056
      }
-
 
131057
      iprot.readStructEnd();
-
 
131058
      validate();
-
 
131059
    }
-
 
131060
 
-
 
131061
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
131062
      oprot.writeStructBegin(STRUCT_DESC);
-
 
131063
 
-
 
131064
      oprot.writeFieldStop();
-
 
131065
      oprot.writeStructEnd();
-
 
131066
    }
-
 
131067
 
-
 
131068
    @Override
-
 
131069
    public String toString() {
-
 
131070
      StringBuilder sb = new StringBuilder("addAmountToWallet_result(");
-
 
131071
      boolean first = true;
-
 
131072
 
-
 
131073
      sb.append(")");
-
 
131074
      return sb.toString();
-
 
131075
    }
-
 
131076
 
-
 
131077
    public void validate() throws org.apache.thrift.TException {
-
 
131078
      // check for required fields
-
 
131079
    }
-
 
131080
 
-
 
131081
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
131082
      try {
-
 
131083
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
131084
      } catch (org.apache.thrift.TException te) {
-
 
131085
        throw new java.io.IOException(te);
-
 
131086
      }
-
 
131087
    }
-
 
131088
 
-
 
131089
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
131090
      try {
-
 
131091
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
131092
      } catch (org.apache.thrift.TException te) {
-
 
131093
        throw new java.io.IOException(te);
-
 
131094
      }
-
 
131095
    }
-
 
131096
 
-
 
131097
  }
-
 
131098
 
-
 
131099
  public static class creditBatch_args implements org.apache.thrift.TBase<creditBatch_args, creditBatch_args._Fields>, java.io.Serializable, Cloneable   {
130359
  public static class creditBatch_args implements org.apache.thrift.TBase<creditBatch_args, creditBatch_args._Fields>, java.io.Serializable, Cloneable   {
131100
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("creditBatch_args");
130360
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("creditBatch_args");
131101
 
130361
 
131102
    private static final org.apache.thrift.protocol.TField BATCH_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("batchId", org.apache.thrift.protocol.TType.I64, (short)1);
130362
    private static final org.apache.thrift.protocol.TField BATCH_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("batchId", org.apache.thrift.protocol.TType.I64, (short)1);
131103
    private static final org.apache.thrift.protocol.TField USER_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("userAmount", org.apache.thrift.protocol.TType.STRING, (short)2);
130363
    private static final org.apache.thrift.protocol.TField USER_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("userAmount", org.apache.thrift.protocol.TType.STRING, (short)2);
Line 208289... Line 207549...
208289
      }
207549
      }
208290
    }
207550
    }
208291
 
207551
 
208292
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
207552
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
208293
      try {
207553
      try {
-
 
207554
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
207555
        __isset_bit_vector = new BitSet(1);
208294
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
207556
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
208295
      } catch (org.apache.thrift.TException te) {
207557
      } catch (org.apache.thrift.TException te) {
208296
        throw new java.io.IOException(te);
207558
        throw new java.io.IOException(te);
208297
      }
207559
      }
208298
    }
207560
    }
Line 209095... Line 208357...
209095
      }
208357
      }
209096
    }
208358
    }
209097
 
208359
 
209098
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
208360
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
209099
      try {
208361
      try {
209100
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
209101
        __isset_bit_vector = new BitSet(1);
-
 
209102
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
208362
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
209103
      } catch (org.apache.thrift.TException te) {
208363
      } catch (org.apache.thrift.TException te) {
209104
        throw new java.io.IOException(te);
208364
        throw new java.io.IOException(te);
209105
      }
208365
      }
209106
    }
208366
    }