Subversion Repositories SmartDukaan

Rev

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

Rev 6049 Rev 6050
Line 864... Line 864...
864
 
864
 
865
    public UserWallet getUserWallet(long userId) throws org.apache.thrift.TException;
865
    public UserWallet getUserWallet(long userId) throws org.apache.thrift.TException;
866
 
866
 
867
    public List<UserWalletHistory> getUserWalletHistory(long userId) throws org.apache.thrift.TException;
867
    public List<UserWalletHistory> getUserWalletHistory(long userId) throws org.apache.thrift.TException;
868
 
868
 
-
 
869
    /**
-
 
870
     * Returns a recharge order for a given transactionId
-
 
871
     * 
-
 
872
     * @param txnId
-
 
873
     */
-
 
874
    public RechargeOrder getRechargeOrdersForTransaction(long txnId) throws TransactionServiceException, org.apache.thrift.TException;
-
 
875
 
869
    public Map<Long,String> getServiceProviders(RechargeType rechargeType) throws org.apache.thrift.TException;
876
    public Map<Long,String> getServiceProviders(RechargeType rechargeType) throws org.apache.thrift.TException;
870
 
877
 
871
    public long getServiceProviderForDevice(RechargeType rechargeType, String deviceNumber) throws org.apache.thrift.TException;
878
    public long getServiceProviderForDevice(RechargeType rechargeType, String deviceNumber) throws org.apache.thrift.TException;
872
 
879
 
873
  }
880
  }
Line 1140... Line 1147...
1140
 
1147
 
1141
    public void getUserWallet(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserWallet_call> resultHandler) throws org.apache.thrift.TException;
1148
    public void getUserWallet(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserWallet_call> resultHandler) throws org.apache.thrift.TException;
1142
 
1149
 
1143
    public void getUserWalletHistory(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserWalletHistory_call> resultHandler) throws org.apache.thrift.TException;
1150
    public void getUserWalletHistory(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserWalletHistory_call> resultHandler) throws org.apache.thrift.TException;
1144
 
1151
 
-
 
1152
    public void getRechargeOrdersForTransaction(long txnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRechargeOrdersForTransaction_call> resultHandler) throws org.apache.thrift.TException;
-
 
1153
 
1145
    public void getServiceProviders(RechargeType rechargeType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getServiceProviders_call> resultHandler) throws org.apache.thrift.TException;
1154
    public void getServiceProviders(RechargeType rechargeType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getServiceProviders_call> resultHandler) throws org.apache.thrift.TException;
1146
 
1155
 
1147
    public void getServiceProviderForDevice(RechargeType rechargeType, String deviceNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getServiceProviderForDevice_call> resultHandler) throws org.apache.thrift.TException;
1156
    public void getServiceProviderForDevice(RechargeType rechargeType, String deviceNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getServiceProviderForDevice_call> resultHandler) throws org.apache.thrift.TException;
1148
 
1157
 
1149
  }
1158
  }
Line 4561... Line 4570...
4561
        return result.success;
4570
        return result.success;
4562
      }
4571
      }
4563
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserWalletHistory failed: unknown result");
4572
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserWalletHistory failed: unknown result");
4564
    }
4573
    }
4565
 
4574
 
-
 
4575
    public RechargeOrder getRechargeOrdersForTransaction(long txnId) throws TransactionServiceException, org.apache.thrift.TException
-
 
4576
    {
-
 
4577
      send_getRechargeOrdersForTransaction(txnId);
-
 
4578
      return recv_getRechargeOrdersForTransaction();
-
 
4579
    }
-
 
4580
 
-
 
4581
    public void send_getRechargeOrdersForTransaction(long txnId) throws org.apache.thrift.TException
-
 
4582
    {
-
 
4583
      getRechargeOrdersForTransaction_args args = new getRechargeOrdersForTransaction_args();
-
 
4584
      args.setTxnId(txnId);
-
 
4585
      sendBase("getRechargeOrdersForTransaction", args);
-
 
4586
    }
-
 
4587
 
-
 
4588
    public RechargeOrder recv_getRechargeOrdersForTransaction() throws TransactionServiceException, org.apache.thrift.TException
-
 
4589
    {
-
 
4590
      getRechargeOrdersForTransaction_result result = new getRechargeOrdersForTransaction_result();
-
 
4591
      receiveBase(result, "getRechargeOrdersForTransaction");
-
 
4592
      if (result.isSetSuccess()) {
-
 
4593
        return result.success;
-
 
4594
      }
-
 
4595
      if (result.ex != null) {
-
 
4596
        throw result.ex;
-
 
4597
      }
-
 
4598
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRechargeOrdersForTransaction failed: unknown result");
-
 
4599
    }
-
 
4600
 
4566
    public Map<Long,String> getServiceProviders(RechargeType rechargeType) throws org.apache.thrift.TException
4601
    public Map<Long,String> getServiceProviders(RechargeType rechargeType) throws org.apache.thrift.TException
4567
    {
4602
    {
4568
      send_getServiceProviders(rechargeType);
4603
      send_getServiceProviders(rechargeType);
4569
      return recv_getServiceProviders();
4604
      return recv_getServiceProviders();
4570
    }
4605
    }
Line 9313... Line 9348...
9313
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
9348
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
9314
        return (new Client(prot)).recv_getUserWalletHistory();
9349
        return (new Client(prot)).recv_getUserWalletHistory();
9315
      }
9350
      }
9316
    }
9351
    }
9317
 
9352
 
-
 
9353
    public void getRechargeOrdersForTransaction(long txnId, org.apache.thrift.async.AsyncMethodCallback<getRechargeOrdersForTransaction_call> resultHandler) throws org.apache.thrift.TException {
-
 
9354
      checkReady();
-
 
9355
      getRechargeOrdersForTransaction_call method_call = new getRechargeOrdersForTransaction_call(txnId, resultHandler, this, ___protocolFactory, ___transport);
-
 
9356
      this.___currentMethod = method_call;
-
 
9357
      ___manager.call(method_call);
-
 
9358
    }
-
 
9359
 
-
 
9360
    public static class getRechargeOrdersForTransaction_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
9361
      private long txnId;
-
 
9362
      public getRechargeOrdersForTransaction_call(long txnId, org.apache.thrift.async.AsyncMethodCallback<getRechargeOrdersForTransaction_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 {
-
 
9363
        super(client, protocolFactory, transport, resultHandler, false);
-
 
9364
        this.txnId = txnId;
-
 
9365
      }
-
 
9366
 
-
 
9367
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
9368
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRechargeOrdersForTransaction", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
9369
        getRechargeOrdersForTransaction_args args = new getRechargeOrdersForTransaction_args();
-
 
9370
        args.setTxnId(txnId);
-
 
9371
        args.write(prot);
-
 
9372
        prot.writeMessageEnd();
-
 
9373
      }
-
 
9374
 
-
 
9375
      public RechargeOrder getResult() throws TransactionServiceException, org.apache.thrift.TException {
-
 
9376
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
9377
          throw new IllegalStateException("Method call not finished!");
-
 
9378
        }
-
 
9379
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
9380
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
9381
        return (new Client(prot)).recv_getRechargeOrdersForTransaction();
-
 
9382
      }
-
 
9383
    }
-
 
9384
 
9318
    public void getServiceProviders(RechargeType rechargeType, org.apache.thrift.async.AsyncMethodCallback<getServiceProviders_call> resultHandler) throws org.apache.thrift.TException {
9385
    public void getServiceProviders(RechargeType rechargeType, org.apache.thrift.async.AsyncMethodCallback<getServiceProviders_call> resultHandler) throws org.apache.thrift.TException {
9319
      checkReady();
9386
      checkReady();
9320
      getServiceProviders_call method_call = new getServiceProviders_call(rechargeType, resultHandler, this, ___protocolFactory, ___transport);
9387
      getServiceProviders_call method_call = new getServiceProviders_call(rechargeType, resultHandler, this, ___protocolFactory, ___transport);
9321
      this.___currentMethod = method_call;
9388
      this.___currentMethod = method_call;
9322
      ___manager.call(method_call);
9389
      ___manager.call(method_call);
Line 9527... Line 9594...
9527
      processMap.put("getRechargeOrders", new getRechargeOrders());
9594
      processMap.put("getRechargeOrders", new getRechargeOrders());
9528
      processMap.put("updateRechargeOrderStatus", new updateRechargeOrderStatus());
9595
      processMap.put("updateRechargeOrderStatus", new updateRechargeOrderStatus());
9529
      processMap.put("activateRechargeTxn", new activateRechargeTxn());
9596
      processMap.put("activateRechargeTxn", new activateRechargeTxn());
9530
      processMap.put("getUserWallet", new getUserWallet());
9597
      processMap.put("getUserWallet", new getUserWallet());
9531
      processMap.put("getUserWalletHistory", new getUserWalletHistory());
9598
      processMap.put("getUserWalletHistory", new getUserWalletHistory());
-
 
9599
      processMap.put("getRechargeOrdersForTransaction", new getRechargeOrdersForTransaction());
9532
      processMap.put("getServiceProviders", new getServiceProviders());
9600
      processMap.put("getServiceProviders", new getServiceProviders());
9533
      processMap.put("getServiceProviderForDevice", new getServiceProviderForDevice());
9601
      processMap.put("getServiceProviderForDevice", new getServiceProviderForDevice());
9534
      return processMap;
9602
      return processMap;
9535
    }
9603
    }
9536
 
9604
 
Line 12090... Line 12158...
12090
        result.success = iface.getUserWalletHistory(args.userId);
12158
        result.success = iface.getUserWalletHistory(args.userId);
12091
        return result;
12159
        return result;
12092
      }
12160
      }
12093
    }
12161
    }
12094
 
12162
 
-
 
12163
    private static class getRechargeOrdersForTransaction<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRechargeOrdersForTransaction_args> {
-
 
12164
      public getRechargeOrdersForTransaction() {
-
 
12165
        super("getRechargeOrdersForTransaction");
-
 
12166
      }
-
 
12167
 
-
 
12168
      protected getRechargeOrdersForTransaction_args getEmptyArgsInstance() {
-
 
12169
        return new getRechargeOrdersForTransaction_args();
-
 
12170
      }
-
 
12171
 
-
 
12172
      protected getRechargeOrdersForTransaction_result getResult(I iface, getRechargeOrdersForTransaction_args args) throws org.apache.thrift.TException {
-
 
12173
        getRechargeOrdersForTransaction_result result = new getRechargeOrdersForTransaction_result();
-
 
12174
        try {
-
 
12175
          result.success = iface.getRechargeOrdersForTransaction(args.txnId);
-
 
12176
        } catch (TransactionServiceException ex) {
-
 
12177
          result.ex = ex;
-
 
12178
        }
-
 
12179
        return result;
-
 
12180
      }
-
 
12181
    }
-
 
12182
 
12095
    private static class getServiceProviders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getServiceProviders_args> {
12183
    private static class getServiceProviders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getServiceProviders_args> {
12096
      public getServiceProviders() {
12184
      public getServiceProviders() {
12097
        super("getServiceProviders");
12185
        super("getServiceProviders");
12098
      }
12186
      }
12099
 
12187
 
Line 56053... Line 56141...
56053
      }
56141
      }
56054
    }
56142
    }
56055
 
56143
 
56056
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
56144
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
56057
      try {
56145
      try {
-
 
56146
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
56147
        __isset_bit_vector = new BitSet(1);
56058
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
56148
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
56059
      } catch (org.apache.thrift.TException te) {
56149
      } catch (org.apache.thrift.TException te) {
56060
        throw new java.io.IOException(te);
56150
        throw new java.io.IOException(te);
56061
      }
56151
      }
56062
    }
56152
    }
Line 60903... Line 60993...
60903
      }
60993
      }
60904
    }
60994
    }
60905
 
60995
 
60906
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
60996
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
60907
      try {
60997
      try {
-
 
60998
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
60999
        __isset_bit_vector = new BitSet(1);
60908
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
61000
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
60909
      } catch (org.apache.thrift.TException te) {
61001
      } catch (org.apache.thrift.TException te) {
60910
        throw new java.io.IOException(te);
61002
        throw new java.io.IOException(te);
60911
      }
61003
      }
60912
    }
61004
    }
Line 62334... Line 62426...
62334
      }
62426
      }
62335
    }
62427
    }
62336
 
62428
 
62337
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
62429
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
62338
      try {
62430
      try {
-
 
62431
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
62432
        __isset_bit_vector = new BitSet(1);
62339
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
62433
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
62340
      } catch (org.apache.thrift.TException te) {
62434
      } catch (org.apache.thrift.TException te) {
62341
        throw new java.io.IOException(te);
62435
        throw new java.io.IOException(te);
62342
      }
62436
      }
62343
    }
62437
    }
Line 110227... Line 110321...
110227
      }
110321
      }
110228
      first = false;
110322
      first = false;
110229
      sb.append(")");
110323
      sb.append(")");
110230
      return sb.toString();
110324
      return sb.toString();
110231
    }
110325
    }
-
 
110326
 
-
 
110327
    public void validate() throws org.apache.thrift.TException {
-
 
110328
      // check for required fields
-
 
110329
    }
-
 
110330
 
-
 
110331
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
110332
      try {
-
 
110333
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
110334
      } catch (org.apache.thrift.TException te) {
-
 
110335
        throw new java.io.IOException(te);
-
 
110336
      }
-
 
110337
    }
-
 
110338
 
-
 
110339
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
110340
      try {
-
 
110341
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
110342
      } catch (org.apache.thrift.TException te) {
-
 
110343
        throw new java.io.IOException(te);
-
 
110344
      }
-
 
110345
    }
-
 
110346
 
-
 
110347
  }
-
 
110348
 
-
 
110349
  public static class getRechargeOrdersForTransaction_args implements org.apache.thrift.TBase<getRechargeOrdersForTransaction_args, getRechargeOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable   {
-
 
110350
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRechargeOrdersForTransaction_args");
-
 
110351
 
-
 
110352
    private static final org.apache.thrift.protocol.TField TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
110353
 
-
 
110354
    private long txnId; // required
-
 
110355
 
-
 
110356
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
110357
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
110358
      TXN_ID((short)1, "txnId");
-
 
110359
 
-
 
110360
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
110361
 
-
 
110362
      static {
-
 
110363
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
110364
          byName.put(field.getFieldName(), field);
-
 
110365
        }
-
 
110366
      }
-
 
110367
 
-
 
110368
      /**
-
 
110369
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
110370
       */
-
 
110371
      public static _Fields findByThriftId(int fieldId) {
-
 
110372
        switch(fieldId) {
-
 
110373
          case 1: // TXN_ID
-
 
110374
            return TXN_ID;
-
 
110375
          default:
-
 
110376
            return null;
-
 
110377
        }
-
 
110378
      }
-
 
110379
 
-
 
110380
      /**
-
 
110381
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
110382
       * if it is not found.
-
 
110383
       */
-
 
110384
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
110385
        _Fields fields = findByThriftId(fieldId);
-
 
110386
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
110387
        return fields;
-
 
110388
      }
-
 
110389
 
-
 
110390
      /**
-
 
110391
       * Find the _Fields constant that matches name, or null if its not found.
-
 
110392
       */
-
 
110393
      public static _Fields findByName(String name) {
-
 
110394
        return byName.get(name);
-
 
110395
      }
-
 
110396
 
-
 
110397
      private final short _thriftId;
-
 
110398
      private final String _fieldName;
-
 
110399
 
-
 
110400
      _Fields(short thriftId, String fieldName) {
-
 
110401
        _thriftId = thriftId;
-
 
110402
        _fieldName = fieldName;
-
 
110403
      }
-
 
110404
 
-
 
110405
      public short getThriftFieldId() {
-
 
110406
        return _thriftId;
-
 
110407
      }
-
 
110408
 
-
 
110409
      public String getFieldName() {
-
 
110410
        return _fieldName;
-
 
110411
      }
-
 
110412
    }
-
 
110413
 
-
 
110414
    // isset id assignments
-
 
110415
    private static final int __TXNID_ISSET_ID = 0;
-
 
110416
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
110417
 
-
 
110418
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
110419
    static {
-
 
110420
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
110421
      tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
110422
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
110423
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
110424
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRechargeOrdersForTransaction_args.class, metaDataMap);
-
 
110425
    }
-
 
110426
 
-
 
110427
    public getRechargeOrdersForTransaction_args() {
-
 
110428
    }
-
 
110429
 
-
 
110430
    public getRechargeOrdersForTransaction_args(
-
 
110431
      long txnId)
-
 
110432
    {
-
 
110433
      this();
-
 
110434
      this.txnId = txnId;
-
 
110435
      setTxnIdIsSet(true);
-
 
110436
    }
-
 
110437
 
-
 
110438
    /**
-
 
110439
     * Performs a deep copy on <i>other</i>.
-
 
110440
     */
-
 
110441
    public getRechargeOrdersForTransaction_args(getRechargeOrdersForTransaction_args other) {
-
 
110442
      __isset_bit_vector.clear();
-
 
110443
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
110444
      this.txnId = other.txnId;
-
 
110445
    }
-
 
110446
 
-
 
110447
    public getRechargeOrdersForTransaction_args deepCopy() {
-
 
110448
      return new getRechargeOrdersForTransaction_args(this);
-
 
110449
    }
-
 
110450
 
-
 
110451
    @Override
-
 
110452
    public void clear() {
-
 
110453
      setTxnIdIsSet(false);
-
 
110454
      this.txnId = 0;
-
 
110455
    }
-
 
110456
 
-
 
110457
    public long getTxnId() {
-
 
110458
      return this.txnId;
-
 
110459
    }
-
 
110460
 
-
 
110461
    public void setTxnId(long txnId) {
-
 
110462
      this.txnId = txnId;
-
 
110463
      setTxnIdIsSet(true);
-
 
110464
    }
-
 
110465
 
-
 
110466
    public void unsetTxnId() {
-
 
110467
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
-
 
110468
    }
-
 
110469
 
-
 
110470
    /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
-
 
110471
    public boolean isSetTxnId() {
-
 
110472
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
-
 
110473
    }
-
 
110474
 
-
 
110475
    public void setTxnIdIsSet(boolean value) {
-
 
110476
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
-
 
110477
    }
-
 
110478
 
-
 
110479
    public void setFieldValue(_Fields field, Object value) {
-
 
110480
      switch (field) {
-
 
110481
      case TXN_ID:
-
 
110482
        if (value == null) {
-
 
110483
          unsetTxnId();
-
 
110484
        } else {
-
 
110485
          setTxnId((Long)value);
-
 
110486
        }
-
 
110487
        break;
-
 
110488
 
-
 
110489
      }
-
 
110490
    }
-
 
110491
 
-
 
110492
    public Object getFieldValue(_Fields field) {
-
 
110493
      switch (field) {
-
 
110494
      case TXN_ID:
-
 
110495
        return Long.valueOf(getTxnId());
-
 
110496
 
-
 
110497
      }
-
 
110498
      throw new IllegalStateException();
-
 
110499
    }
-
 
110500
 
-
 
110501
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
110502
    public boolean isSet(_Fields field) {
-
 
110503
      if (field == null) {
-
 
110504
        throw new IllegalArgumentException();
-
 
110505
      }
-
 
110506
 
-
 
110507
      switch (field) {
-
 
110508
      case TXN_ID:
-
 
110509
        return isSetTxnId();
-
 
110510
      }
-
 
110511
      throw new IllegalStateException();
-
 
110512
    }
-
 
110513
 
-
 
110514
    @Override
-
 
110515
    public boolean equals(Object that) {
-
 
110516
      if (that == null)
-
 
110517
        return false;
-
 
110518
      if (that instanceof getRechargeOrdersForTransaction_args)
-
 
110519
        return this.equals((getRechargeOrdersForTransaction_args)that);
-
 
110520
      return false;
-
 
110521
    }
-
 
110522
 
-
 
110523
    public boolean equals(getRechargeOrdersForTransaction_args that) {
-
 
110524
      if (that == null)
-
 
110525
        return false;
-
 
110526
 
-
 
110527
      boolean this_present_txnId = true;
-
 
110528
      boolean that_present_txnId = true;
-
 
110529
      if (this_present_txnId || that_present_txnId) {
-
 
110530
        if (!(this_present_txnId && that_present_txnId))
-
 
110531
          return false;
-
 
110532
        if (this.txnId != that.txnId)
-
 
110533
          return false;
-
 
110534
      }
-
 
110535
 
-
 
110536
      return true;
-
 
110537
    }
-
 
110538
 
-
 
110539
    @Override
-
 
110540
    public int hashCode() {
-
 
110541
      return 0;
-
 
110542
    }
-
 
110543
 
-
 
110544
    public int compareTo(getRechargeOrdersForTransaction_args other) {
-
 
110545
      if (!getClass().equals(other.getClass())) {
-
 
110546
        return getClass().getName().compareTo(other.getClass().getName());
-
 
110547
      }
-
 
110548
 
-
 
110549
      int lastComparison = 0;
-
 
110550
      getRechargeOrdersForTransaction_args typedOther = (getRechargeOrdersForTransaction_args)other;
-
 
110551
 
-
 
110552
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(typedOther.isSetTxnId());
-
 
110553
      if (lastComparison != 0) {
-
 
110554
        return lastComparison;
-
 
110555
      }
-
 
110556
      if (isSetTxnId()) {
-
 
110557
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, typedOther.txnId);
-
 
110558
        if (lastComparison != 0) {
-
 
110559
          return lastComparison;
-
 
110560
        }
-
 
110561
      }
-
 
110562
      return 0;
-
 
110563
    }
-
 
110564
 
-
 
110565
    public _Fields fieldForId(int fieldId) {
-
 
110566
      return _Fields.findByThriftId(fieldId);
-
 
110567
    }
-
 
110568
 
-
 
110569
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
110570
      org.apache.thrift.protocol.TField field;
-
 
110571
      iprot.readStructBegin();
-
 
110572
      while (true)
-
 
110573
      {
-
 
110574
        field = iprot.readFieldBegin();
-
 
110575
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
110576
          break;
-
 
110577
        }
-
 
110578
        switch (field.id) {
-
 
110579
          case 1: // TXN_ID
-
 
110580
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
110581
              this.txnId = iprot.readI64();
-
 
110582
              setTxnIdIsSet(true);
-
 
110583
            } else { 
-
 
110584
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
110585
            }
-
 
110586
            break;
-
 
110587
          default:
-
 
110588
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
110589
        }
-
 
110590
        iprot.readFieldEnd();
-
 
110591
      }
-
 
110592
      iprot.readStructEnd();
-
 
110593
      validate();
-
 
110594
    }
-
 
110595
 
-
 
110596
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
110597
      validate();
-
 
110598
 
-
 
110599
      oprot.writeStructBegin(STRUCT_DESC);
-
 
110600
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
-
 
110601
      oprot.writeI64(this.txnId);
-
 
110602
      oprot.writeFieldEnd();
-
 
110603
      oprot.writeFieldStop();
-
 
110604
      oprot.writeStructEnd();
-
 
110605
    }
-
 
110606
 
-
 
110607
    @Override
-
 
110608
    public String toString() {
-
 
110609
      StringBuilder sb = new StringBuilder("getRechargeOrdersForTransaction_args(");
-
 
110610
      boolean first = true;
-
 
110611
 
-
 
110612
      sb.append("txnId:");
-
 
110613
      sb.append(this.txnId);
-
 
110614
      first = false;
-
 
110615
      sb.append(")");
-
 
110616
      return sb.toString();
-
 
110617
    }
-
 
110618
 
-
 
110619
    public void validate() throws org.apache.thrift.TException {
-
 
110620
      // check for required fields
-
 
110621
    }
-
 
110622
 
-
 
110623
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
110624
      try {
-
 
110625
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
110626
      } catch (org.apache.thrift.TException te) {
-
 
110627
        throw new java.io.IOException(te);
-
 
110628
      }
-
 
110629
    }
-
 
110630
 
-
 
110631
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
110632
      try {
-
 
110633
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
110634
        __isset_bit_vector = new BitSet(1);
-
 
110635
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
110636
      } catch (org.apache.thrift.TException te) {
-
 
110637
        throw new java.io.IOException(te);
-
 
110638
      }
-
 
110639
    }
-
 
110640
 
-
 
110641
  }
-
 
110642
 
-
 
110643
  public static class getRechargeOrdersForTransaction_result implements org.apache.thrift.TBase<getRechargeOrdersForTransaction_result, getRechargeOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable   {
-
 
110644
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRechargeOrdersForTransaction_result");
-
 
110645
 
-
 
110646
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
-
 
110647
    private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
110648
 
-
 
110649
    private RechargeOrder success; // required
-
 
110650
    private TransactionServiceException ex; // required
-
 
110651
 
-
 
110652
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
110653
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
110654
      SUCCESS((short)0, "success"),
-
 
110655
      EX((short)1, "ex");
-
 
110656
 
-
 
110657
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
110658
 
-
 
110659
      static {
-
 
110660
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
110661
          byName.put(field.getFieldName(), field);
-
 
110662
        }
-
 
110663
      }
-
 
110664
 
-
 
110665
      /**
-
 
110666
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
110667
       */
-
 
110668
      public static _Fields findByThriftId(int fieldId) {
-
 
110669
        switch(fieldId) {
-
 
110670
          case 0: // SUCCESS
-
 
110671
            return SUCCESS;
-
 
110672
          case 1: // EX
-
 
110673
            return EX;
-
 
110674
          default:
-
 
110675
            return null;
-
 
110676
        }
-
 
110677
      }
-
 
110678
 
-
 
110679
      /**
-
 
110680
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
110681
       * if it is not found.
-
 
110682
       */
-
 
110683
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
110684
        _Fields fields = findByThriftId(fieldId);
-
 
110685
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
110686
        return fields;
-
 
110687
      }
-
 
110688
 
-
 
110689
      /**
-
 
110690
       * Find the _Fields constant that matches name, or null if its not found.
-
 
110691
       */
-
 
110692
      public static _Fields findByName(String name) {
-
 
110693
        return byName.get(name);
-
 
110694
      }
-
 
110695
 
-
 
110696
      private final short _thriftId;
-
 
110697
      private final String _fieldName;
-
 
110698
 
-
 
110699
      _Fields(short thriftId, String fieldName) {
-
 
110700
        _thriftId = thriftId;
-
 
110701
        _fieldName = fieldName;
-
 
110702
      }
-
 
110703
 
-
 
110704
      public short getThriftFieldId() {
-
 
110705
        return _thriftId;
-
 
110706
      }
-
 
110707
 
-
 
110708
      public String getFieldName() {
-
 
110709
        return _fieldName;
-
 
110710
      }
-
 
110711
    }
-
 
110712
 
-
 
110713
    // isset id assignments
-
 
110714
 
-
 
110715
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
110716
    static {
-
 
110717
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
110718
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
110719
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RechargeOrder.class)));
-
 
110720
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
110721
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
110722
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
110723
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRechargeOrdersForTransaction_result.class, metaDataMap);
-
 
110724
    }
-
 
110725
 
-
 
110726
    public getRechargeOrdersForTransaction_result() {
-
 
110727
    }
-
 
110728
 
-
 
110729
    public getRechargeOrdersForTransaction_result(
-
 
110730
      RechargeOrder success,
-
 
110731
      TransactionServiceException ex)
-
 
110732
    {
-
 
110733
      this();
-
 
110734
      this.success = success;
-
 
110735
      this.ex = ex;
-
 
110736
    }
-
 
110737
 
-
 
110738
    /**
-
 
110739
     * Performs a deep copy on <i>other</i>.
-
 
110740
     */
-
 
110741
    public getRechargeOrdersForTransaction_result(getRechargeOrdersForTransaction_result other) {
-
 
110742
      if (other.isSetSuccess()) {
-
 
110743
        this.success = new RechargeOrder(other.success);
-
 
110744
      }
-
 
110745
      if (other.isSetEx()) {
-
 
110746
        this.ex = new TransactionServiceException(other.ex);
-
 
110747
      }
-
 
110748
    }
-
 
110749
 
-
 
110750
    public getRechargeOrdersForTransaction_result deepCopy() {
-
 
110751
      return new getRechargeOrdersForTransaction_result(this);
-
 
110752
    }
-
 
110753
 
-
 
110754
    @Override
-
 
110755
    public void clear() {
-
 
110756
      this.success = null;
-
 
110757
      this.ex = null;
-
 
110758
    }
-
 
110759
 
-
 
110760
    public RechargeOrder getSuccess() {
-
 
110761
      return this.success;
-
 
110762
    }
-
 
110763
 
-
 
110764
    public void setSuccess(RechargeOrder success) {
-
 
110765
      this.success = success;
-
 
110766
    }
-
 
110767
 
-
 
110768
    public void unsetSuccess() {
-
 
110769
      this.success = null;
-
 
110770
    }
-
 
110771
 
-
 
110772
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
110773
    public boolean isSetSuccess() {
-
 
110774
      return this.success != null;
-
 
110775
    }
-
 
110776
 
-
 
110777
    public void setSuccessIsSet(boolean value) {
-
 
110778
      if (!value) {
-
 
110779
        this.success = null;
-
 
110780
      }
-
 
110781
    }
-
 
110782
 
-
 
110783
    public TransactionServiceException getEx() {
-
 
110784
      return this.ex;
-
 
110785
    }
-
 
110786
 
-
 
110787
    public void setEx(TransactionServiceException ex) {
-
 
110788
      this.ex = ex;
-
 
110789
    }
-
 
110790
 
-
 
110791
    public void unsetEx() {
-
 
110792
      this.ex = null;
-
 
110793
    }
-
 
110794
 
-
 
110795
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
-
 
110796
    public boolean isSetEx() {
-
 
110797
      return this.ex != null;
-
 
110798
    }
-
 
110799
 
-
 
110800
    public void setExIsSet(boolean value) {
-
 
110801
      if (!value) {
-
 
110802
        this.ex = null;
-
 
110803
      }
-
 
110804
    }
-
 
110805
 
-
 
110806
    public void setFieldValue(_Fields field, Object value) {
-
 
110807
      switch (field) {
-
 
110808
      case SUCCESS:
-
 
110809
        if (value == null) {
-
 
110810
          unsetSuccess();
-
 
110811
        } else {
-
 
110812
          setSuccess((RechargeOrder)value);
-
 
110813
        }
-
 
110814
        break;
-
 
110815
 
-
 
110816
      case EX:
-
 
110817
        if (value == null) {
-
 
110818
          unsetEx();
-
 
110819
        } else {
-
 
110820
          setEx((TransactionServiceException)value);
-
 
110821
        }
-
 
110822
        break;
-
 
110823
 
-
 
110824
      }
-
 
110825
    }
-
 
110826
 
-
 
110827
    public Object getFieldValue(_Fields field) {
-
 
110828
      switch (field) {
-
 
110829
      case SUCCESS:
-
 
110830
        return getSuccess();
-
 
110831
 
-
 
110832
      case EX:
-
 
110833
        return getEx();
-
 
110834
 
-
 
110835
      }
-
 
110836
      throw new IllegalStateException();
-
 
110837
    }
-
 
110838
 
-
 
110839
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
110840
    public boolean isSet(_Fields field) {
-
 
110841
      if (field == null) {
-
 
110842
        throw new IllegalArgumentException();
-
 
110843
      }
-
 
110844
 
-
 
110845
      switch (field) {
-
 
110846
      case SUCCESS:
-
 
110847
        return isSetSuccess();
-
 
110848
      case EX:
-
 
110849
        return isSetEx();
-
 
110850
      }
-
 
110851
      throw new IllegalStateException();
-
 
110852
    }
-
 
110853
 
-
 
110854
    @Override
-
 
110855
    public boolean equals(Object that) {
-
 
110856
      if (that == null)
-
 
110857
        return false;
-
 
110858
      if (that instanceof getRechargeOrdersForTransaction_result)
-
 
110859
        return this.equals((getRechargeOrdersForTransaction_result)that);
-
 
110860
      return false;
-
 
110861
    }
-
 
110862
 
-
 
110863
    public boolean equals(getRechargeOrdersForTransaction_result that) {
-
 
110864
      if (that == null)
-
 
110865
        return false;
-
 
110866
 
-
 
110867
      boolean this_present_success = true && this.isSetSuccess();
-
 
110868
      boolean that_present_success = true && that.isSetSuccess();
-
 
110869
      if (this_present_success || that_present_success) {
-
 
110870
        if (!(this_present_success && that_present_success))
-
 
110871
          return false;
-
 
110872
        if (!this.success.equals(that.success))
-
 
110873
          return false;
-
 
110874
      }
-
 
110875
 
-
 
110876
      boolean this_present_ex = true && this.isSetEx();
-
 
110877
      boolean that_present_ex = true && that.isSetEx();
-
 
110878
      if (this_present_ex || that_present_ex) {
-
 
110879
        if (!(this_present_ex && that_present_ex))
-
 
110880
          return false;
-
 
110881
        if (!this.ex.equals(that.ex))
-
 
110882
          return false;
-
 
110883
      }
-
 
110884
 
-
 
110885
      return true;
-
 
110886
    }
-
 
110887
 
-
 
110888
    @Override
-
 
110889
    public int hashCode() {
-
 
110890
      return 0;
-
 
110891
    }
-
 
110892
 
-
 
110893
    public int compareTo(getRechargeOrdersForTransaction_result other) {
-
 
110894
      if (!getClass().equals(other.getClass())) {
-
 
110895
        return getClass().getName().compareTo(other.getClass().getName());
-
 
110896
      }
-
 
110897
 
-
 
110898
      int lastComparison = 0;
-
 
110899
      getRechargeOrdersForTransaction_result typedOther = (getRechargeOrdersForTransaction_result)other;
-
 
110900
 
-
 
110901
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
110902
      if (lastComparison != 0) {
-
 
110903
        return lastComparison;
-
 
110904
      }
-
 
110905
      if (isSetSuccess()) {
-
 
110906
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
110907
        if (lastComparison != 0) {
-
 
110908
          return lastComparison;
-
 
110909
        }
-
 
110910
      }
-
 
110911
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
-
 
110912
      if (lastComparison != 0) {
-
 
110913
        return lastComparison;
-
 
110914
      }
-
 
110915
      if (isSetEx()) {
-
 
110916
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
-
 
110917
        if (lastComparison != 0) {
-
 
110918
          return lastComparison;
-
 
110919
        }
-
 
110920
      }
-
 
110921
      return 0;
-
 
110922
    }
-
 
110923
 
-
 
110924
    public _Fields fieldForId(int fieldId) {
-
 
110925
      return _Fields.findByThriftId(fieldId);
-
 
110926
    }
-
 
110927
 
-
 
110928
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
110929
      org.apache.thrift.protocol.TField field;
-
 
110930
      iprot.readStructBegin();
-
 
110931
      while (true)
-
 
110932
      {
-
 
110933
        field = iprot.readFieldBegin();
-
 
110934
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
110935
          break;
-
 
110936
        }
-
 
110937
        switch (field.id) {
-
 
110938
          case 0: // SUCCESS
-
 
110939
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
110940
              this.success = new RechargeOrder();
-
 
110941
              this.success.read(iprot);
-
 
110942
            } else { 
-
 
110943
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
110944
            }
-
 
110945
            break;
-
 
110946
          case 1: // EX
-
 
110947
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
110948
              this.ex = new TransactionServiceException();
-
 
110949
              this.ex.read(iprot);
-
 
110950
            } else { 
-
 
110951
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
110952
            }
-
 
110953
            break;
-
 
110954
          default:
-
 
110955
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
110956
        }
-
 
110957
        iprot.readFieldEnd();
-
 
110958
      }
-
 
110959
      iprot.readStructEnd();
-
 
110960
      validate();
-
 
110961
    }
-
 
110962
 
-
 
110963
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
110964
      oprot.writeStructBegin(STRUCT_DESC);
-
 
110965
 
-
 
110966
      if (this.isSetSuccess()) {
-
 
110967
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
110968
        this.success.write(oprot);
-
 
110969
        oprot.writeFieldEnd();
-
 
110970
      } else if (this.isSetEx()) {
-
 
110971
        oprot.writeFieldBegin(EX_FIELD_DESC);
-
 
110972
        this.ex.write(oprot);
-
 
110973
        oprot.writeFieldEnd();
-
 
110974
      }
-
 
110975
      oprot.writeFieldStop();
-
 
110976
      oprot.writeStructEnd();
-
 
110977
    }
-
 
110978
 
-
 
110979
    @Override
-
 
110980
    public String toString() {
-
 
110981
      StringBuilder sb = new StringBuilder("getRechargeOrdersForTransaction_result(");
-
 
110982
      boolean first = true;
-
 
110983
 
-
 
110984
      sb.append("success:");
-
 
110985
      if (this.success == null) {
-
 
110986
        sb.append("null");
-
 
110987
      } else {
-
 
110988
        sb.append(this.success);
-
 
110989
      }
-
 
110990
      first = false;
-
 
110991
      if (!first) sb.append(", ");
-
 
110992
      sb.append("ex:");
-
 
110993
      if (this.ex == null) {
-
 
110994
        sb.append("null");
-
 
110995
      } else {
-
 
110996
        sb.append(this.ex);
-
 
110997
      }
-
 
110998
      first = false;
-
 
110999
      sb.append(")");
-
 
111000
      return sb.toString();
-
 
111001
    }
110232
 
111002
 
110233
    public void validate() throws org.apache.thrift.TException {
111003
    public void validate() throws org.apache.thrift.TException {
110234
      // check for required fields
111004
      // check for required fields
110235
    }
111005
    }
110236
 
111006