Subversion Repositories SmartDukaan

Rev

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

Rev 18764 Rev 18977
Line 359... Line 359...
359
 
359
 
360
    public Map<String,String> registerCounter(Counter counter, long userId) throws org.apache.thrift.TException;
360
    public Map<String,String> registerCounter(Counter counter, long userId) throws org.apache.thrift.TException;
361
 
361
 
362
    public List<Counter> searchCounter(String type1, String searchString) throws org.apache.thrift.TException;
362
    public List<Counter> searchCounter(String type1, String searchString) throws org.apache.thrift.TException;
363
 
363
 
-
 
364
    public Counter getCounterByUserId(long userId) throws org.apache.thrift.TException;
-
 
365
 
364
    public List<User> getAllUsersByCounter(long counterId) throws org.apache.thrift.TException;
366
    public List<User> getAllUsersByCounter(long counterId) throws org.apache.thrift.TException;
365
 
367
 
366
    public String getActiveAccessTokenForUser(long userId, String source) throws org.apache.thrift.TException;
368
    public String getActiveAccessTokenForUser(long userId, String source) throws org.apache.thrift.TException;
367
 
369
 
368
    public boolean validateAccessToken(String accessToken) throws org.apache.thrift.TException;
370
    public boolean validateAccessToken(String accessToken) throws org.apache.thrift.TException;
Line 543... Line 545...
543
 
545
 
544
    public void registerCounter(Counter counter, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.registerCounter_call> resultHandler) throws org.apache.thrift.TException;
546
    public void registerCounter(Counter counter, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.registerCounter_call> resultHandler) throws org.apache.thrift.TException;
545
 
547
 
546
    public void searchCounter(String type1, String searchString, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.searchCounter_call> resultHandler) throws org.apache.thrift.TException;
548
    public void searchCounter(String type1, String searchString, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.searchCounter_call> resultHandler) throws org.apache.thrift.TException;
547
 
549
 
-
 
550
    public void getCounterByUserId(long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCounterByUserId_call> resultHandler) throws org.apache.thrift.TException;
-
 
551
 
548
    public void getAllUsersByCounter(long counterId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllUsersByCounter_call> resultHandler) throws org.apache.thrift.TException;
552
    public void getAllUsersByCounter(long counterId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllUsersByCounter_call> resultHandler) throws org.apache.thrift.TException;
549
 
553
 
550
    public void getActiveAccessTokenForUser(long userId, String source, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveAccessTokenForUser_call> resultHandler) throws org.apache.thrift.TException;
554
    public void getActiveAccessTokenForUser(long userId, String source, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveAccessTokenForUser_call> resultHandler) throws org.apache.thrift.TException;
551
 
555
 
552
    public void validateAccessToken(String accessToken, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.validateAccessToken_call> resultHandler) throws org.apache.thrift.TException;
556
    public void validateAccessToken(String accessToken, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.validateAccessToken_call> resultHandler) throws org.apache.thrift.TException;
Line 2630... Line 2634...
2630
        return result.success;
2634
        return result.success;
2631
      }
2635
      }
2632
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "searchCounter failed: unknown result");
2636
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "searchCounter failed: unknown result");
2633
    }
2637
    }
2634
 
2638
 
-
 
2639
    public Counter getCounterByUserId(long userId) throws org.apache.thrift.TException
-
 
2640
    {
-
 
2641
      send_getCounterByUserId(userId);
-
 
2642
      return recv_getCounterByUserId();
-
 
2643
    }
-
 
2644
 
-
 
2645
    public void send_getCounterByUserId(long userId) throws org.apache.thrift.TException
-
 
2646
    {
-
 
2647
      getCounterByUserId_args args = new getCounterByUserId_args();
-
 
2648
      args.setUserId(userId);
-
 
2649
      sendBase("getCounterByUserId", args);
-
 
2650
    }
-
 
2651
 
-
 
2652
    public Counter recv_getCounterByUserId() throws org.apache.thrift.TException
-
 
2653
    {
-
 
2654
      getCounterByUserId_result result = new getCounterByUserId_result();
-
 
2655
      receiveBase(result, "getCounterByUserId");
-
 
2656
      if (result.isSetSuccess()) {
-
 
2657
        return result.success;
-
 
2658
      }
-
 
2659
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCounterByUserId failed: unknown result");
-
 
2660
    }
-
 
2661
 
2635
    public List<User> getAllUsersByCounter(long counterId) throws org.apache.thrift.TException
2662
    public List<User> getAllUsersByCounter(long counterId) throws org.apache.thrift.TException
2636
    {
2663
    {
2637
      send_getAllUsersByCounter(counterId);
2664
      send_getAllUsersByCounter(counterId);
2638
      return recv_getAllUsersByCounter();
2665
      return recv_getAllUsersByCounter();
2639
    }
2666
    }
Line 5649... Line 5676...
5649
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5676
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5650
        return (new Client(prot)).recv_searchCounter();
5677
        return (new Client(prot)).recv_searchCounter();
5651
      }
5678
      }
5652
    }
5679
    }
5653
 
5680
 
-
 
5681
    public void getCounterByUserId(long userId, org.apache.thrift.async.AsyncMethodCallback<getCounterByUserId_call> resultHandler) throws org.apache.thrift.TException {
-
 
5682
      checkReady();
-
 
5683
      getCounterByUserId_call method_call = new getCounterByUserId_call(userId, resultHandler, this, ___protocolFactory, ___transport);
-
 
5684
      this.___currentMethod = method_call;
-
 
5685
      ___manager.call(method_call);
-
 
5686
    }
-
 
5687
 
-
 
5688
    public static class getCounterByUserId_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
5689
      private long userId;
-
 
5690
      public getCounterByUserId_call(long userId, org.apache.thrift.async.AsyncMethodCallback<getCounterByUserId_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 {
-
 
5691
        super(client, protocolFactory, transport, resultHandler, false);
-
 
5692
        this.userId = userId;
-
 
5693
      }
-
 
5694
 
-
 
5695
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
5696
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCounterByUserId", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
5697
        getCounterByUserId_args args = new getCounterByUserId_args();
-
 
5698
        args.setUserId(userId);
-
 
5699
        args.write(prot);
-
 
5700
        prot.writeMessageEnd();
-
 
5701
      }
-
 
5702
 
-
 
5703
      public Counter getResult() throws org.apache.thrift.TException {
-
 
5704
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
5705
          throw new IllegalStateException("Method call not finished!");
-
 
5706
        }
-
 
5707
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
5708
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
5709
        return (new Client(prot)).recv_getCounterByUserId();
-
 
5710
      }
-
 
5711
    }
-
 
5712
 
5654
    public void getAllUsersByCounter(long counterId, org.apache.thrift.async.AsyncMethodCallback<getAllUsersByCounter_call> resultHandler) throws org.apache.thrift.TException {
5713
    public void getAllUsersByCounter(long counterId, org.apache.thrift.async.AsyncMethodCallback<getAllUsersByCounter_call> resultHandler) throws org.apache.thrift.TException {
5655
      checkReady();
5714
      checkReady();
5656
      getAllUsersByCounter_call method_call = new getAllUsersByCounter_call(counterId, resultHandler, this, ___protocolFactory, ___transport);
5715
      getAllUsersByCounter_call method_call = new getAllUsersByCounter_call(counterId, resultHandler, this, ___protocolFactory, ___transport);
5657
      this.___currentMethod = method_call;
5716
      this.___currentMethod = method_call;
5658
      ___manager.call(method_call);
5717
      ___manager.call(method_call);
Line 6077... Line 6136...
6077
      processMap.put("addPrivateDealUser", new addPrivateDealUser());
6136
      processMap.put("addPrivateDealUser", new addPrivateDealUser());
6078
      processMap.put("changePrivateDealUserStatus", new changePrivateDealUserStatus());
6137
      processMap.put("changePrivateDealUserStatus", new changePrivateDealUserStatus());
6079
      processMap.put("getPrivateDealUser", new getPrivateDealUser());
6138
      processMap.put("getPrivateDealUser", new getPrivateDealUser());
6080
      processMap.put("registerCounter", new registerCounter());
6139
      processMap.put("registerCounter", new registerCounter());
6081
      processMap.put("searchCounter", new searchCounter());
6140
      processMap.put("searchCounter", new searchCounter());
-
 
6141
      processMap.put("getCounterByUserId", new getCounterByUserId());
6082
      processMap.put("getAllUsersByCounter", new getAllUsersByCounter());
6142
      processMap.put("getAllUsersByCounter", new getAllUsersByCounter());
6083
      processMap.put("getActiveAccessTokenForUser", new getActiveAccessTokenForUser());
6143
      processMap.put("getActiveAccessTokenForUser", new getActiveAccessTokenForUser());
6084
      processMap.put("validateAccessToken", new validateAccessToken());
6144
      processMap.put("validateAccessToken", new validateAccessToken());
6085
      processMap.put("addItemsToCart", new addItemsToCart());
6145
      processMap.put("addItemsToCart", new addItemsToCart());
6086
      processMap.put("validateCartNew", new validateCartNew());
6146
      processMap.put("validateCartNew", new validateCartNew());
Line 7635... Line 7695...
7635
        result.success = iface.searchCounter(args.type1, args.searchString);
7695
        result.success = iface.searchCounter(args.type1, args.searchString);
7636
        return result;
7696
        return result;
7637
      }
7697
      }
7638
    }
7698
    }
7639
 
7699
 
-
 
7700
    private static class getCounterByUserId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCounterByUserId_args> {
-
 
7701
      public getCounterByUserId() {
-
 
7702
        super("getCounterByUserId");
-
 
7703
      }
-
 
7704
 
-
 
7705
      protected getCounterByUserId_args getEmptyArgsInstance() {
-
 
7706
        return new getCounterByUserId_args();
-
 
7707
      }
-
 
7708
 
-
 
7709
      protected getCounterByUserId_result getResult(I iface, getCounterByUserId_args args) throws org.apache.thrift.TException {
-
 
7710
        getCounterByUserId_result result = new getCounterByUserId_result();
-
 
7711
        result.success = iface.getCounterByUserId(args.userId);
-
 
7712
        return result;
-
 
7713
      }
-
 
7714
    }
-
 
7715
 
7640
    private static class getAllUsersByCounter<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUsersByCounter_args> {
7716
    private static class getAllUsersByCounter<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUsersByCounter_args> {
7641
      public getAllUsersByCounter() {
7717
      public getAllUsersByCounter() {
7642
        super("getAllUsersByCounter");
7718
        super("getAllUsersByCounter");
7643
      }
7719
      }
7644
 
7720
 
Line 65427... Line 65503...
65427
      boolean first = true;
65503
      boolean first = true;
65428
 
65504
 
65429
      sb.append("success:");
65505
      sb.append("success:");
65430
      if (this.success == null) {
65506
      if (this.success == null) {
65431
        sb.append("null");
65507
        sb.append("null");
-
 
65508
      } else {
-
 
65509
        sb.append(this.success);
-
 
65510
      }
-
 
65511
      first = false;
-
 
65512
      sb.append(")");
-
 
65513
      return sb.toString();
-
 
65514
    }
-
 
65515
 
-
 
65516
    public void validate() throws org.apache.thrift.TException {
-
 
65517
      // check for required fields
-
 
65518
    }
-
 
65519
 
-
 
65520
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
65521
      try {
-
 
65522
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
65523
      } catch (org.apache.thrift.TException te) {
-
 
65524
        throw new java.io.IOException(te);
-
 
65525
      }
-
 
65526
    }
-
 
65527
 
-
 
65528
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
65529
      try {
-
 
65530
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
65531
      } catch (org.apache.thrift.TException te) {
-
 
65532
        throw new java.io.IOException(te);
-
 
65533
      }
-
 
65534
    }
-
 
65535
 
-
 
65536
  }
-
 
65537
 
-
 
65538
  public static class getCounterByUserId_args implements org.apache.thrift.TBase<getCounterByUserId_args, getCounterByUserId_args._Fields>, java.io.Serializable, Cloneable   {
-
 
65539
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCounterByUserId_args");
-
 
65540
 
-
 
65541
    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);
-
 
65542
 
-
 
65543
    private long userId; // required
-
 
65544
 
-
 
65545
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
65546
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
65547
      USER_ID((short)1, "userId");
-
 
65548
 
-
 
65549
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
65550
 
-
 
65551
      static {
-
 
65552
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
65553
          byName.put(field.getFieldName(), field);
-
 
65554
        }
-
 
65555
      }
-
 
65556
 
-
 
65557
      /**
-
 
65558
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
65559
       */
-
 
65560
      public static _Fields findByThriftId(int fieldId) {
-
 
65561
        switch(fieldId) {
-
 
65562
          case 1: // USER_ID
-
 
65563
            return USER_ID;
-
 
65564
          default:
-
 
65565
            return null;
-
 
65566
        }
-
 
65567
      }
-
 
65568
 
-
 
65569
      /**
-
 
65570
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
65571
       * if it is not found.
-
 
65572
       */
-
 
65573
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
65574
        _Fields fields = findByThriftId(fieldId);
-
 
65575
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
65576
        return fields;
-
 
65577
      }
-
 
65578
 
-
 
65579
      /**
-
 
65580
       * Find the _Fields constant that matches name, or null if its not found.
-
 
65581
       */
-
 
65582
      public static _Fields findByName(String name) {
-
 
65583
        return byName.get(name);
-
 
65584
      }
-
 
65585
 
-
 
65586
      private final short _thriftId;
-
 
65587
      private final String _fieldName;
-
 
65588
 
-
 
65589
      _Fields(short thriftId, String fieldName) {
-
 
65590
        _thriftId = thriftId;
-
 
65591
        _fieldName = fieldName;
-
 
65592
      }
-
 
65593
 
-
 
65594
      public short getThriftFieldId() {
-
 
65595
        return _thriftId;
-
 
65596
      }
-
 
65597
 
-
 
65598
      public String getFieldName() {
-
 
65599
        return _fieldName;
-
 
65600
      }
-
 
65601
    }
-
 
65602
 
-
 
65603
    // isset id assignments
-
 
65604
    private static final int __USERID_ISSET_ID = 0;
-
 
65605
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
65606
 
-
 
65607
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
65608
    static {
-
 
65609
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
65610
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
65611
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
65612
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
65613
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCounterByUserId_args.class, metaDataMap);
-
 
65614
    }
-
 
65615
 
-
 
65616
    public getCounterByUserId_args() {
-
 
65617
    }
-
 
65618
 
-
 
65619
    public getCounterByUserId_args(
-
 
65620
      long userId)
-
 
65621
    {
-
 
65622
      this();
-
 
65623
      this.userId = userId;
-
 
65624
      setUserIdIsSet(true);
-
 
65625
    }
-
 
65626
 
-
 
65627
    /**
-
 
65628
     * Performs a deep copy on <i>other</i>.
-
 
65629
     */
-
 
65630
    public getCounterByUserId_args(getCounterByUserId_args other) {
-
 
65631
      __isset_bit_vector.clear();
-
 
65632
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
65633
      this.userId = other.userId;
-
 
65634
    }
-
 
65635
 
-
 
65636
    public getCounterByUserId_args deepCopy() {
-
 
65637
      return new getCounterByUserId_args(this);
-
 
65638
    }
-
 
65639
 
-
 
65640
    @Override
-
 
65641
    public void clear() {
-
 
65642
      setUserIdIsSet(false);
-
 
65643
      this.userId = 0;
-
 
65644
    }
-
 
65645
 
-
 
65646
    public long getUserId() {
-
 
65647
      return this.userId;
-
 
65648
    }
-
 
65649
 
-
 
65650
    public void setUserId(long userId) {
-
 
65651
      this.userId = userId;
-
 
65652
      setUserIdIsSet(true);
-
 
65653
    }
-
 
65654
 
-
 
65655
    public void unsetUserId() {
-
 
65656
      __isset_bit_vector.clear(__USERID_ISSET_ID);
-
 
65657
    }
-
 
65658
 
-
 
65659
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
-
 
65660
    public boolean isSetUserId() {
-
 
65661
      return __isset_bit_vector.get(__USERID_ISSET_ID);
-
 
65662
    }
-
 
65663
 
-
 
65664
    public void setUserIdIsSet(boolean value) {
-
 
65665
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
-
 
65666
    }
-
 
65667
 
-
 
65668
    public void setFieldValue(_Fields field, Object value) {
-
 
65669
      switch (field) {
-
 
65670
      case USER_ID:
-
 
65671
        if (value == null) {
-
 
65672
          unsetUserId();
-
 
65673
        } else {
-
 
65674
          setUserId((Long)value);
-
 
65675
        }
-
 
65676
        break;
-
 
65677
 
-
 
65678
      }
-
 
65679
    }
-
 
65680
 
-
 
65681
    public Object getFieldValue(_Fields field) {
-
 
65682
      switch (field) {
-
 
65683
      case USER_ID:
-
 
65684
        return Long.valueOf(getUserId());
-
 
65685
 
-
 
65686
      }
-
 
65687
      throw new IllegalStateException();
-
 
65688
    }
-
 
65689
 
-
 
65690
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
65691
    public boolean isSet(_Fields field) {
-
 
65692
      if (field == null) {
-
 
65693
        throw new IllegalArgumentException();
-
 
65694
      }
-
 
65695
 
-
 
65696
      switch (field) {
-
 
65697
      case USER_ID:
-
 
65698
        return isSetUserId();
-
 
65699
      }
-
 
65700
      throw new IllegalStateException();
-
 
65701
    }
-
 
65702
 
-
 
65703
    @Override
-
 
65704
    public boolean equals(Object that) {
-
 
65705
      if (that == null)
-
 
65706
        return false;
-
 
65707
      if (that instanceof getCounterByUserId_args)
-
 
65708
        return this.equals((getCounterByUserId_args)that);
-
 
65709
      return false;
-
 
65710
    }
-
 
65711
 
-
 
65712
    public boolean equals(getCounterByUserId_args that) {
-
 
65713
      if (that == null)
-
 
65714
        return false;
-
 
65715
 
-
 
65716
      boolean this_present_userId = true;
-
 
65717
      boolean that_present_userId = true;
-
 
65718
      if (this_present_userId || that_present_userId) {
-
 
65719
        if (!(this_present_userId && that_present_userId))
-
 
65720
          return false;
-
 
65721
        if (this.userId != that.userId)
-
 
65722
          return false;
-
 
65723
      }
-
 
65724
 
-
 
65725
      return true;
-
 
65726
    }
-
 
65727
 
-
 
65728
    @Override
-
 
65729
    public int hashCode() {
-
 
65730
      return 0;
-
 
65731
    }
-
 
65732
 
-
 
65733
    public int compareTo(getCounterByUserId_args other) {
-
 
65734
      if (!getClass().equals(other.getClass())) {
-
 
65735
        return getClass().getName().compareTo(other.getClass().getName());
-
 
65736
      }
-
 
65737
 
-
 
65738
      int lastComparison = 0;
-
 
65739
      getCounterByUserId_args typedOther = (getCounterByUserId_args)other;
-
 
65740
 
-
 
65741
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
-
 
65742
      if (lastComparison != 0) {
-
 
65743
        return lastComparison;
-
 
65744
      }
-
 
65745
      if (isSetUserId()) {
-
 
65746
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
-
 
65747
        if (lastComparison != 0) {
-
 
65748
          return lastComparison;
-
 
65749
        }
-
 
65750
      }
-
 
65751
      return 0;
-
 
65752
    }
-
 
65753
 
-
 
65754
    public _Fields fieldForId(int fieldId) {
-
 
65755
      return _Fields.findByThriftId(fieldId);
-
 
65756
    }
-
 
65757
 
-
 
65758
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
65759
      org.apache.thrift.protocol.TField field;
-
 
65760
      iprot.readStructBegin();
-
 
65761
      while (true)
-
 
65762
      {
-
 
65763
        field = iprot.readFieldBegin();
-
 
65764
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
65765
          break;
-
 
65766
        }
-
 
65767
        switch (field.id) {
-
 
65768
          case 1: // USER_ID
-
 
65769
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
65770
              this.userId = iprot.readI64();
-
 
65771
              setUserIdIsSet(true);
-
 
65772
            } else { 
-
 
65773
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
65774
            }
-
 
65775
            break;
-
 
65776
          default:
-
 
65777
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
65778
        }
-
 
65779
        iprot.readFieldEnd();
-
 
65780
      }
-
 
65781
      iprot.readStructEnd();
-
 
65782
      validate();
-
 
65783
    }
-
 
65784
 
-
 
65785
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
65786
      validate();
-
 
65787
 
-
 
65788
      oprot.writeStructBegin(STRUCT_DESC);
-
 
65789
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
-
 
65790
      oprot.writeI64(this.userId);
-
 
65791
      oprot.writeFieldEnd();
-
 
65792
      oprot.writeFieldStop();
-
 
65793
      oprot.writeStructEnd();
-
 
65794
    }
-
 
65795
 
-
 
65796
    @Override
-
 
65797
    public String toString() {
-
 
65798
      StringBuilder sb = new StringBuilder("getCounterByUserId_args(");
-
 
65799
      boolean first = true;
-
 
65800
 
-
 
65801
      sb.append("userId:");
-
 
65802
      sb.append(this.userId);
-
 
65803
      first = false;
-
 
65804
      sb.append(")");
-
 
65805
      return sb.toString();
-
 
65806
    }
-
 
65807
 
-
 
65808
    public void validate() throws org.apache.thrift.TException {
-
 
65809
      // check for required fields
-
 
65810
    }
-
 
65811
 
-
 
65812
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
65813
      try {
-
 
65814
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
65815
      } catch (org.apache.thrift.TException te) {
-
 
65816
        throw new java.io.IOException(te);
-
 
65817
      }
-
 
65818
    }
-
 
65819
 
-
 
65820
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
65821
      try {
-
 
65822
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
65823
        __isset_bit_vector = new BitSet(1);
-
 
65824
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
65825
      } catch (org.apache.thrift.TException te) {
-
 
65826
        throw new java.io.IOException(te);
-
 
65827
      }
-
 
65828
    }
-
 
65829
 
-
 
65830
  }
-
 
65831
 
-
 
65832
  public static class getCounterByUserId_result implements org.apache.thrift.TBase<getCounterByUserId_result, getCounterByUserId_result._Fields>, java.io.Serializable, Cloneable   {
-
 
65833
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCounterByUserId_result");
-
 
65834
 
-
 
65835
    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);
-
 
65836
 
-
 
65837
    private Counter success; // required
-
 
65838
 
-
 
65839
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
65840
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
65841
      SUCCESS((short)0, "success");
-
 
65842
 
-
 
65843
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
65844
 
-
 
65845
      static {
-
 
65846
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
65847
          byName.put(field.getFieldName(), field);
-
 
65848
        }
-
 
65849
      }
-
 
65850
 
-
 
65851
      /**
-
 
65852
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
65853
       */
-
 
65854
      public static _Fields findByThriftId(int fieldId) {
-
 
65855
        switch(fieldId) {
-
 
65856
          case 0: // SUCCESS
-
 
65857
            return SUCCESS;
-
 
65858
          default:
-
 
65859
            return null;
-
 
65860
        }
-
 
65861
      }
-
 
65862
 
-
 
65863
      /**
-
 
65864
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
65865
       * if it is not found.
-
 
65866
       */
-
 
65867
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
65868
        _Fields fields = findByThriftId(fieldId);
-
 
65869
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
65870
        return fields;
-
 
65871
      }
-
 
65872
 
-
 
65873
      /**
-
 
65874
       * Find the _Fields constant that matches name, or null if its not found.
-
 
65875
       */
-
 
65876
      public static _Fields findByName(String name) {
-
 
65877
        return byName.get(name);
-
 
65878
      }
-
 
65879
 
-
 
65880
      private final short _thriftId;
-
 
65881
      private final String _fieldName;
-
 
65882
 
-
 
65883
      _Fields(short thriftId, String fieldName) {
-
 
65884
        _thriftId = thriftId;
-
 
65885
        _fieldName = fieldName;
-
 
65886
      }
-
 
65887
 
-
 
65888
      public short getThriftFieldId() {
-
 
65889
        return _thriftId;
-
 
65890
      }
-
 
65891
 
-
 
65892
      public String getFieldName() {
-
 
65893
        return _fieldName;
-
 
65894
      }
-
 
65895
    }
-
 
65896
 
-
 
65897
    // isset id assignments
-
 
65898
 
-
 
65899
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
65900
    static {
-
 
65901
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
65902
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
65903
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Counter.class)));
-
 
65904
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
65905
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCounterByUserId_result.class, metaDataMap);
-
 
65906
    }
-
 
65907
 
-
 
65908
    public getCounterByUserId_result() {
-
 
65909
    }
-
 
65910
 
-
 
65911
    public getCounterByUserId_result(
-
 
65912
      Counter success)
-
 
65913
    {
-
 
65914
      this();
-
 
65915
      this.success = success;
-
 
65916
    }
-
 
65917
 
-
 
65918
    /**
-
 
65919
     * Performs a deep copy on <i>other</i>.
-
 
65920
     */
-
 
65921
    public getCounterByUserId_result(getCounterByUserId_result other) {
-
 
65922
      if (other.isSetSuccess()) {
-
 
65923
        this.success = new Counter(other.success);
-
 
65924
      }
-
 
65925
    }
-
 
65926
 
-
 
65927
    public getCounterByUserId_result deepCopy() {
-
 
65928
      return new getCounterByUserId_result(this);
-
 
65929
    }
-
 
65930
 
-
 
65931
    @Override
-
 
65932
    public void clear() {
-
 
65933
      this.success = null;
-
 
65934
    }
-
 
65935
 
-
 
65936
    public Counter getSuccess() {
-
 
65937
      return this.success;
-
 
65938
    }
-
 
65939
 
-
 
65940
    public void setSuccess(Counter success) {
-
 
65941
      this.success = success;
-
 
65942
    }
-
 
65943
 
-
 
65944
    public void unsetSuccess() {
-
 
65945
      this.success = null;
-
 
65946
    }
-
 
65947
 
-
 
65948
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
65949
    public boolean isSetSuccess() {
-
 
65950
      return this.success != null;
-
 
65951
    }
-
 
65952
 
-
 
65953
    public void setSuccessIsSet(boolean value) {
-
 
65954
      if (!value) {
-
 
65955
        this.success = null;
-
 
65956
      }
-
 
65957
    }
-
 
65958
 
-
 
65959
    public void setFieldValue(_Fields field, Object value) {
-
 
65960
      switch (field) {
-
 
65961
      case SUCCESS:
-
 
65962
        if (value == null) {
-
 
65963
          unsetSuccess();
-
 
65964
        } else {
-
 
65965
          setSuccess((Counter)value);
-
 
65966
        }
-
 
65967
        break;
-
 
65968
 
-
 
65969
      }
-
 
65970
    }
-
 
65971
 
-
 
65972
    public Object getFieldValue(_Fields field) {
-
 
65973
      switch (field) {
-
 
65974
      case SUCCESS:
-
 
65975
        return getSuccess();
-
 
65976
 
-
 
65977
      }
-
 
65978
      throw new IllegalStateException();
-
 
65979
    }
-
 
65980
 
-
 
65981
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
65982
    public boolean isSet(_Fields field) {
-
 
65983
      if (field == null) {
-
 
65984
        throw new IllegalArgumentException();
-
 
65985
      }
-
 
65986
 
-
 
65987
      switch (field) {
-
 
65988
      case SUCCESS:
-
 
65989
        return isSetSuccess();
-
 
65990
      }
-
 
65991
      throw new IllegalStateException();
-
 
65992
    }
-
 
65993
 
-
 
65994
    @Override
-
 
65995
    public boolean equals(Object that) {
-
 
65996
      if (that == null)
-
 
65997
        return false;
-
 
65998
      if (that instanceof getCounterByUserId_result)
-
 
65999
        return this.equals((getCounterByUserId_result)that);
-
 
66000
      return false;
-
 
66001
    }
-
 
66002
 
-
 
66003
    public boolean equals(getCounterByUserId_result that) {
-
 
66004
      if (that == null)
-
 
66005
        return false;
-
 
66006
 
-
 
66007
      boolean this_present_success = true && this.isSetSuccess();
-
 
66008
      boolean that_present_success = true && that.isSetSuccess();
-
 
66009
      if (this_present_success || that_present_success) {
-
 
66010
        if (!(this_present_success && that_present_success))
-
 
66011
          return false;
-
 
66012
        if (!this.success.equals(that.success))
-
 
66013
          return false;
-
 
66014
      }
-
 
66015
 
-
 
66016
      return true;
-
 
66017
    }
-
 
66018
 
-
 
66019
    @Override
-
 
66020
    public int hashCode() {
-
 
66021
      return 0;
-
 
66022
    }
-
 
66023
 
-
 
66024
    public int compareTo(getCounterByUserId_result other) {
-
 
66025
      if (!getClass().equals(other.getClass())) {
-
 
66026
        return getClass().getName().compareTo(other.getClass().getName());
-
 
66027
      }
-
 
66028
 
-
 
66029
      int lastComparison = 0;
-
 
66030
      getCounterByUserId_result typedOther = (getCounterByUserId_result)other;
-
 
66031
 
-
 
66032
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
66033
      if (lastComparison != 0) {
-
 
66034
        return lastComparison;
-
 
66035
      }
-
 
66036
      if (isSetSuccess()) {
-
 
66037
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
66038
        if (lastComparison != 0) {
-
 
66039
          return lastComparison;
-
 
66040
        }
-
 
66041
      }
-
 
66042
      return 0;
-
 
66043
    }
-
 
66044
 
-
 
66045
    public _Fields fieldForId(int fieldId) {
-
 
66046
      return _Fields.findByThriftId(fieldId);
-
 
66047
    }
-
 
66048
 
-
 
66049
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
66050
      org.apache.thrift.protocol.TField field;
-
 
66051
      iprot.readStructBegin();
-
 
66052
      while (true)
-
 
66053
      {
-
 
66054
        field = iprot.readFieldBegin();
-
 
66055
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
66056
          break;
-
 
66057
        }
-
 
66058
        switch (field.id) {
-
 
66059
          case 0: // SUCCESS
-
 
66060
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
66061
              this.success = new Counter();
-
 
66062
              this.success.read(iprot);
-
 
66063
            } else { 
-
 
66064
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
66065
            }
-
 
66066
            break;
-
 
66067
          default:
-
 
66068
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
66069
        }
-
 
66070
        iprot.readFieldEnd();
-
 
66071
      }
-
 
66072
      iprot.readStructEnd();
-
 
66073
      validate();
-
 
66074
    }
-
 
66075
 
-
 
66076
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
66077
      oprot.writeStructBegin(STRUCT_DESC);
-
 
66078
 
-
 
66079
      if (this.isSetSuccess()) {
-
 
66080
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
66081
        this.success.write(oprot);
-
 
66082
        oprot.writeFieldEnd();
-
 
66083
      }
-
 
66084
      oprot.writeFieldStop();
-
 
66085
      oprot.writeStructEnd();
-
 
66086
    }
-
 
66087
 
-
 
66088
    @Override
-
 
66089
    public String toString() {
-
 
66090
      StringBuilder sb = new StringBuilder("getCounterByUserId_result(");
-
 
66091
      boolean first = true;
-
 
66092
 
-
 
66093
      sb.append("success:");
-
 
66094
      if (this.success == null) {
-
 
66095
        sb.append("null");
65432
      } else {
66096
      } else {
65433
        sb.append(this.success);
66097
        sb.append(this.success);
65434
      }
66098
      }
65435
      first = false;
66099
      first = false;
65436
      sb.append(")");
66100
      sb.append(")");