Subversion Repositories SmartDukaan

Rev

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

Rev 1590 Rev 1598
Line 162... Line 162...
162
 
162
 
163
    public Widget getBrowseHistory(long userId) throws WidgetException, TException;
163
    public Widget getBrowseHistory(long userId) throws WidgetException, TException;
164
 
164
 
165
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException;
165
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException;
166
 
166
 
-
 
167
    /**
-
 
168
     * Returns number of registered users.
-
 
169
     * If userType = null, then it returns count of all users, including anonymous
-
 
170
     * If userType = UserType.ANONYMOUS, then it returns count of anonymous users only
-
 
171
     * If userType = UserType.USER, then it returns count of non-anonymous users only
-
 
172
     * 
-
 
173
     * @param userType
-
 
174
     */
-
 
175
    public long getUserCount(UserType userType) throws TException;
-
 
176
 
167
  }
177
  }
168
 
178
 
169
  public static class Client implements Iface {
179
  public static class Client implements Iface {
170
    public Client(TProtocol prot)
180
    public Client(TProtocol prot)
171
    {
181
    {
Line 1871... Line 1881...
1871
      result.read(iprot_);
1881
      result.read(iprot_);
1872
      iprot_.readMessageEnd();
1882
      iprot_.readMessageEnd();
1873
      return;
1883
      return;
1874
    }
1884
    }
1875
 
1885
 
-
 
1886
    public long getUserCount(UserType userType) throws TException
-
 
1887
    {
-
 
1888
      send_getUserCount(userType);
-
 
1889
      return recv_getUserCount();
-
 
1890
    }
-
 
1891
 
-
 
1892
    public void send_getUserCount(UserType userType) throws TException
-
 
1893
    {
-
 
1894
      oprot_.writeMessageBegin(new TMessage("getUserCount", TMessageType.CALL, seqid_));
-
 
1895
      getUserCount_args args = new getUserCount_args();
-
 
1896
      args.userType = userType;
-
 
1897
      args.write(oprot_);
-
 
1898
      oprot_.writeMessageEnd();
-
 
1899
      oprot_.getTransport().flush();
-
 
1900
    }
-
 
1901
 
-
 
1902
    public long recv_getUserCount() throws TException
-
 
1903
    {
-
 
1904
      TMessage msg = iprot_.readMessageBegin();
-
 
1905
      if (msg.type == TMessageType.EXCEPTION) {
-
 
1906
        TApplicationException x = TApplicationException.read(iprot_);
-
 
1907
        iprot_.readMessageEnd();
-
 
1908
        throw x;
-
 
1909
      }
-
 
1910
      getUserCount_result result = new getUserCount_result();
-
 
1911
      result.read(iprot_);
-
 
1912
      iprot_.readMessageEnd();
-
 
1913
      if (result.isSetSuccess()) {
-
 
1914
        return result.success;
-
 
1915
      }
-
 
1916
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserCount failed: unknown result");
-
 
1917
    }
-
 
1918
 
1876
  }
1919
  }
1877
  public static class Processor implements TProcessor {
1920
  public static class Processor implements TProcessor {
1878
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1921
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1879
    public Processor(Iface iface)
1922
    public Processor(Iface iface)
1880
    {
1923
    {
Line 1924... Line 1967...
1924
      processMap_.put("updateMyResearch", new updateMyResearch());
1967
      processMap_.put("updateMyResearch", new updateMyResearch());
1925
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1968
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1926
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1969
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1927
      processMap_.put("getBrowseHistory", new getBrowseHistory());
1970
      processMap_.put("getBrowseHistory", new getBrowseHistory());
1928
      processMap_.put("mergeBrowseHistory", new mergeBrowseHistory());
1971
      processMap_.put("mergeBrowseHistory", new mergeBrowseHistory());
-
 
1972
      processMap_.put("getUserCount", new getUserCount());
1929
    }
1973
    }
1930
 
1974
 
1931
    protected static interface ProcessFunction {
1975
    protected static interface ProcessFunction {
1932
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1976
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1933
    }
1977
    }
Line 3235... Line 3279...
3235
        oprot.getTransport().flush();
3279
        oprot.getTransport().flush();
3236
      }
3280
      }
3237
 
3281
 
3238
    }
3282
    }
3239
 
3283
 
-
 
3284
    private class getUserCount implements ProcessFunction {
-
 
3285
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
3286
      {
-
 
3287
        getUserCount_args args = new getUserCount_args();
-
 
3288
        args.read(iprot);
-
 
3289
        iprot.readMessageEnd();
-
 
3290
        getUserCount_result result = new getUserCount_result();
-
 
3291
        result.success = iface_.getUserCount(args.userType);
-
 
3292
        result.setSuccessIsSet(true);
-
 
3293
        oprot.writeMessageBegin(new TMessage("getUserCount", TMessageType.REPLY, seqid));
-
 
3294
        result.write(oprot);
-
 
3295
        oprot.writeMessageEnd();
-
 
3296
        oprot.getTransport().flush();
-
 
3297
      }
-
 
3298
 
-
 
3299
    }
-
 
3300
 
3240
  }
3301
  }
3241
 
3302
 
3242
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3303
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3243
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3304
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3244
 
3305
 
Line 35144... Line 35205...
35144
      sb.append(")");
35205
      sb.append(")");
35145
      return sb.toString();
35206
      return sb.toString();
35146
    }
35207
    }
35147
 
35208
 
35148
    public void validate() throws TException {
35209
    public void validate() throws TException {
-
 
35210
      // check for required fields
-
 
35211
    }
-
 
35212
 
-
 
35213
  }
-
 
35214
 
-
 
35215
  public static class getUserCount_args implements TBase<getUserCount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserCount_args>   {
-
 
35216
    private static final TStruct STRUCT_DESC = new TStruct("getUserCount_args");
-
 
35217
 
-
 
35218
    private static final TField USER_TYPE_FIELD_DESC = new TField("userType", TType.I32, (short)1);
-
 
35219
 
-
 
35220
    private UserType userType;
-
 
35221
 
-
 
35222
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
35223
    public enum _Fields implements TFieldIdEnum {
-
 
35224
      /**
-
 
35225
       * 
-
 
35226
       * @see UserType
-
 
35227
       */
-
 
35228
      USER_TYPE((short)1, "userType");
-
 
35229
 
-
 
35230
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
35231
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
35232
 
-
 
35233
      static {
-
 
35234
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
35235
          byId.put((int)field._thriftId, field);
-
 
35236
          byName.put(field.getFieldName(), field);
-
 
35237
        }
-
 
35238
      }
-
 
35239
 
-
 
35240
      /**
-
 
35241
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
35242
       */
-
 
35243
      public static _Fields findByThriftId(int fieldId) {
-
 
35244
        return byId.get(fieldId);
-
 
35245
      }
-
 
35246
 
-
 
35247
      /**
-
 
35248
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
35249
       * if it is not found.
-
 
35250
       */
-
 
35251
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
35252
        _Fields fields = findByThriftId(fieldId);
-
 
35253
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
35254
        return fields;
-
 
35255
      }
-
 
35256
 
-
 
35257
      /**
-
 
35258
       * Find the _Fields constant that matches name, or null if its not found.
-
 
35259
       */
-
 
35260
      public static _Fields findByName(String name) {
-
 
35261
        return byName.get(name);
-
 
35262
      }
-
 
35263
 
-
 
35264
      private final short _thriftId;
-
 
35265
      private final String _fieldName;
-
 
35266
 
-
 
35267
      _Fields(short thriftId, String fieldName) {
-
 
35268
        _thriftId = thriftId;
-
 
35269
        _fieldName = fieldName;
-
 
35270
      }
-
 
35271
 
-
 
35272
      public short getThriftFieldId() {
-
 
35273
        return _thriftId;
-
 
35274
      }
-
 
35275
 
-
 
35276
      public String getFieldName() {
-
 
35277
        return _fieldName;
-
 
35278
      }
-
 
35279
    }
-
 
35280
 
-
 
35281
    // isset id assignments
-
 
35282
 
-
 
35283
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
35284
      put(_Fields.USER_TYPE, new FieldMetaData("userType", TFieldRequirementType.DEFAULT, 
-
 
35285
          new EnumMetaData(TType.ENUM, UserType.class)));
-
 
35286
    }});
-
 
35287
 
-
 
35288
    static {
-
 
35289
      FieldMetaData.addStructMetaDataMap(getUserCount_args.class, metaDataMap);
-
 
35290
    }
-
 
35291
 
-
 
35292
    public getUserCount_args() {
-
 
35293
    }
-
 
35294
 
-
 
35295
    public getUserCount_args(
-
 
35296
      UserType userType)
-
 
35297
    {
-
 
35298
      this();
-
 
35299
      this.userType = userType;
-
 
35300
    }
-
 
35301
 
-
 
35302
    /**
-
 
35303
     * Performs a deep copy on <i>other</i>.
-
 
35304
     */
-
 
35305
    public getUserCount_args(getUserCount_args other) {
-
 
35306
      if (other.isSetUserType()) {
-
 
35307
        this.userType = other.userType;
-
 
35308
      }
-
 
35309
    }
-
 
35310
 
-
 
35311
    public getUserCount_args deepCopy() {
-
 
35312
      return new getUserCount_args(this);
-
 
35313
    }
-
 
35314
 
-
 
35315
    @Deprecated
-
 
35316
    public getUserCount_args clone() {
-
 
35317
      return new getUserCount_args(this);
-
 
35318
    }
-
 
35319
 
-
 
35320
    /**
-
 
35321
     * 
-
 
35322
     * @see UserType
-
 
35323
     */
-
 
35324
    public UserType getUserType() {
-
 
35325
      return this.userType;
-
 
35326
    }
-
 
35327
 
-
 
35328
    /**
-
 
35329
     * 
-
 
35330
     * @see UserType
-
 
35331
     */
-
 
35332
    public getUserCount_args setUserType(UserType userType) {
-
 
35333
      this.userType = userType;
-
 
35334
      return this;
-
 
35335
    }
-
 
35336
 
-
 
35337
    public void unsetUserType() {
-
 
35338
      this.userType = null;
-
 
35339
    }
-
 
35340
 
-
 
35341
    /** Returns true if field userType is set (has been asigned a value) and false otherwise */
-
 
35342
    public boolean isSetUserType() {
-
 
35343
      return this.userType != null;
-
 
35344
    }
-
 
35345
 
-
 
35346
    public void setUserTypeIsSet(boolean value) {
-
 
35347
      if (!value) {
-
 
35348
        this.userType = null;
-
 
35349
      }
-
 
35350
    }
-
 
35351
 
-
 
35352
    public void setFieldValue(_Fields field, Object value) {
-
 
35353
      switch (field) {
-
 
35354
      case USER_TYPE:
-
 
35355
        if (value == null) {
-
 
35356
          unsetUserType();
-
 
35357
        } else {
-
 
35358
          setUserType((UserType)value);
-
 
35359
        }
-
 
35360
        break;
-
 
35361
 
-
 
35362
      }
-
 
35363
    }
-
 
35364
 
-
 
35365
    public void setFieldValue(int fieldID, Object value) {
-
 
35366
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
35367
    }
-
 
35368
 
-
 
35369
    public Object getFieldValue(_Fields field) {
-
 
35370
      switch (field) {
-
 
35371
      case USER_TYPE:
-
 
35372
        return getUserType();
-
 
35373
 
-
 
35374
      }
-
 
35375
      throw new IllegalStateException();
-
 
35376
    }
-
 
35377
 
-
 
35378
    public Object getFieldValue(int fieldId) {
-
 
35379
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
35380
    }
-
 
35381
 
-
 
35382
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
35383
    public boolean isSet(_Fields field) {
-
 
35384
      switch (field) {
-
 
35385
      case USER_TYPE:
-
 
35386
        return isSetUserType();
-
 
35387
      }
-
 
35388
      throw new IllegalStateException();
-
 
35389
    }
-
 
35390
 
-
 
35391
    public boolean isSet(int fieldID) {
-
 
35392
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
35393
    }
-
 
35394
 
-
 
35395
    @Override
-
 
35396
    public boolean equals(Object that) {
-
 
35397
      if (that == null)
-
 
35398
        return false;
-
 
35399
      if (that instanceof getUserCount_args)
-
 
35400
        return this.equals((getUserCount_args)that);
-
 
35401
      return false;
-
 
35402
    }
-
 
35403
 
-
 
35404
    public boolean equals(getUserCount_args that) {
-
 
35405
      if (that == null)
-
 
35406
        return false;
-
 
35407
 
-
 
35408
      boolean this_present_userType = true && this.isSetUserType();
-
 
35409
      boolean that_present_userType = true && that.isSetUserType();
-
 
35410
      if (this_present_userType || that_present_userType) {
-
 
35411
        if (!(this_present_userType && that_present_userType))
-
 
35412
          return false;
-
 
35413
        if (!this.userType.equals(that.userType))
-
 
35414
          return false;
-
 
35415
      }
-
 
35416
 
-
 
35417
      return true;
-
 
35418
    }
-
 
35419
 
-
 
35420
    @Override
-
 
35421
    public int hashCode() {
-
 
35422
      return 0;
-
 
35423
    }
-
 
35424
 
-
 
35425
    public int compareTo(getUserCount_args other) {
-
 
35426
      if (!getClass().equals(other.getClass())) {
-
 
35427
        return getClass().getName().compareTo(other.getClass().getName());
-
 
35428
      }
-
 
35429
 
-
 
35430
      int lastComparison = 0;
-
 
35431
      getUserCount_args typedOther = (getUserCount_args)other;
-
 
35432
 
-
 
35433
      lastComparison = Boolean.valueOf(isSetUserType()).compareTo(isSetUserType());
-
 
35434
      if (lastComparison != 0) {
-
 
35435
        return lastComparison;
-
 
35436
      }
-
 
35437
      lastComparison = TBaseHelper.compareTo(userType, typedOther.userType);
-
 
35438
      if (lastComparison != 0) {
-
 
35439
        return lastComparison;
-
 
35440
      }
-
 
35441
      return 0;
-
 
35442
    }
-
 
35443
 
-
 
35444
    public void read(TProtocol iprot) throws TException {
-
 
35445
      TField field;
-
 
35446
      iprot.readStructBegin();
-
 
35447
      while (true)
-
 
35448
      {
-
 
35449
        field = iprot.readFieldBegin();
-
 
35450
        if (field.type == TType.STOP) { 
-
 
35451
          break;
-
 
35452
        }
-
 
35453
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
35454
        if (fieldId == null) {
-
 
35455
          TProtocolUtil.skip(iprot, field.type);
-
 
35456
        } else {
-
 
35457
          switch (fieldId) {
-
 
35458
            case USER_TYPE:
-
 
35459
              if (field.type == TType.I32) {
-
 
35460
                this.userType = UserType.findByValue(iprot.readI32());
-
 
35461
              } else { 
-
 
35462
                TProtocolUtil.skip(iprot, field.type);
-
 
35463
              }
-
 
35464
              break;
-
 
35465
          }
-
 
35466
          iprot.readFieldEnd();
-
 
35467
        }
-
 
35468
      }
-
 
35469
      iprot.readStructEnd();
-
 
35470
      validate();
-
 
35471
    }
-
 
35472
 
-
 
35473
    public void write(TProtocol oprot) throws TException {
-
 
35474
      validate();
-
 
35475
 
-
 
35476
      oprot.writeStructBegin(STRUCT_DESC);
-
 
35477
      if (this.userType != null) {
-
 
35478
        oprot.writeFieldBegin(USER_TYPE_FIELD_DESC);
-
 
35479
        oprot.writeI32(this.userType.getValue());
-
 
35480
        oprot.writeFieldEnd();
-
 
35481
      }
-
 
35482
      oprot.writeFieldStop();
-
 
35483
      oprot.writeStructEnd();
-
 
35484
    }
-
 
35485
 
-
 
35486
    @Override
-
 
35487
    public String toString() {
-
 
35488
      StringBuilder sb = new StringBuilder("getUserCount_args(");
-
 
35489
      boolean first = true;
-
 
35490
 
-
 
35491
      sb.append("userType:");
-
 
35492
      if (this.userType == null) {
-
 
35493
        sb.append("null");
-
 
35494
      } else {
-
 
35495
        String userType_name = userType.name();
-
 
35496
        if (userType_name != null) {
-
 
35497
          sb.append(userType_name);
-
 
35498
          sb.append(" (");
-
 
35499
        }
-
 
35500
        sb.append(this.userType);
-
 
35501
        if (userType_name != null) {
-
 
35502
          sb.append(")");
-
 
35503
        }
-
 
35504
      }
-
 
35505
      first = false;
-
 
35506
      sb.append(")");
-
 
35507
      return sb.toString();
-
 
35508
    }
-
 
35509
 
-
 
35510
    public void validate() throws TException {
-
 
35511
      // check for required fields
-
 
35512
    }
-
 
35513
 
-
 
35514
  }
-
 
35515
 
-
 
35516
  public static class getUserCount_result implements TBase<getUserCount_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserCount_result>   {
-
 
35517
    private static final TStruct STRUCT_DESC = new TStruct("getUserCount_result");
-
 
35518
 
-
 
35519
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
-
 
35520
 
-
 
35521
    private long success;
-
 
35522
 
-
 
35523
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
35524
    public enum _Fields implements TFieldIdEnum {
-
 
35525
      SUCCESS((short)0, "success");
-
 
35526
 
-
 
35527
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
35528
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
35529
 
-
 
35530
      static {
-
 
35531
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
35532
          byId.put((int)field._thriftId, field);
-
 
35533
          byName.put(field.getFieldName(), field);
-
 
35534
        }
-
 
35535
      }
-
 
35536
 
-
 
35537
      /**
-
 
35538
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
35539
       */
-
 
35540
      public static _Fields findByThriftId(int fieldId) {
-
 
35541
        return byId.get(fieldId);
-
 
35542
      }
-
 
35543
 
-
 
35544
      /**
-
 
35545
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
35546
       * if it is not found.
-
 
35547
       */
-
 
35548
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
35549
        _Fields fields = findByThriftId(fieldId);
-
 
35550
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
35551
        return fields;
-
 
35552
      }
-
 
35553
 
-
 
35554
      /**
-
 
35555
       * Find the _Fields constant that matches name, or null if its not found.
-
 
35556
       */
-
 
35557
      public static _Fields findByName(String name) {
-
 
35558
        return byName.get(name);
-
 
35559
      }
-
 
35560
 
-
 
35561
      private final short _thriftId;
-
 
35562
      private final String _fieldName;
-
 
35563
 
-
 
35564
      _Fields(short thriftId, String fieldName) {
-
 
35565
        _thriftId = thriftId;
-
 
35566
        _fieldName = fieldName;
-
 
35567
      }
-
 
35568
 
-
 
35569
      public short getThriftFieldId() {
-
 
35570
        return _thriftId;
-
 
35571
      }
-
 
35572
 
-
 
35573
      public String getFieldName() {
-
 
35574
        return _fieldName;
-
 
35575
      }
-
 
35576
    }
-
 
35577
 
-
 
35578
    // isset id assignments
-
 
35579
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
35580
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
35581
 
-
 
35582
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
35583
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
35584
          new FieldValueMetaData(TType.I64)));
-
 
35585
    }});
-
 
35586
 
-
 
35587
    static {
-
 
35588
      FieldMetaData.addStructMetaDataMap(getUserCount_result.class, metaDataMap);
-
 
35589
    }
-
 
35590
 
-
 
35591
    public getUserCount_result() {
-
 
35592
    }
-
 
35593
 
-
 
35594
    public getUserCount_result(
-
 
35595
      long success)
-
 
35596
    {
-
 
35597
      this();
-
 
35598
      this.success = success;
-
 
35599
      setSuccessIsSet(true);
-
 
35600
    }
-
 
35601
 
-
 
35602
    /**
-
 
35603
     * Performs a deep copy on <i>other</i>.
-
 
35604
     */
-
 
35605
    public getUserCount_result(getUserCount_result other) {
-
 
35606
      __isset_bit_vector.clear();
-
 
35607
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
35608
      this.success = other.success;
-
 
35609
    }
-
 
35610
 
-
 
35611
    public getUserCount_result deepCopy() {
-
 
35612
      return new getUserCount_result(this);
-
 
35613
    }
-
 
35614
 
-
 
35615
    @Deprecated
-
 
35616
    public getUserCount_result clone() {
-
 
35617
      return new getUserCount_result(this);
-
 
35618
    }
-
 
35619
 
-
 
35620
    public long getSuccess() {
-
 
35621
      return this.success;
-
 
35622
    }
-
 
35623
 
-
 
35624
    public getUserCount_result setSuccess(long success) {
-
 
35625
      this.success = success;
-
 
35626
      setSuccessIsSet(true);
-
 
35627
      return this;
-
 
35628
    }
-
 
35629
 
-
 
35630
    public void unsetSuccess() {
-
 
35631
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
35632
    }
-
 
35633
 
-
 
35634
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
35635
    public boolean isSetSuccess() {
-
 
35636
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
35637
    }
-
 
35638
 
-
 
35639
    public void setSuccessIsSet(boolean value) {
-
 
35640
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
35641
    }
-
 
35642
 
-
 
35643
    public void setFieldValue(_Fields field, Object value) {
-
 
35644
      switch (field) {
-
 
35645
      case SUCCESS:
-
 
35646
        if (value == null) {
-
 
35647
          unsetSuccess();
-
 
35648
        } else {
-
 
35649
          setSuccess((Long)value);
-
 
35650
        }
-
 
35651
        break;
-
 
35652
 
-
 
35653
      }
-
 
35654
    }
-
 
35655
 
-
 
35656
    public void setFieldValue(int fieldID, Object value) {
-
 
35657
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
35658
    }
-
 
35659
 
-
 
35660
    public Object getFieldValue(_Fields field) {
-
 
35661
      switch (field) {
-
 
35662
      case SUCCESS:
-
 
35663
        return new Long(getSuccess());
-
 
35664
 
-
 
35665
      }
-
 
35666
      throw new IllegalStateException();
-
 
35667
    }
-
 
35668
 
-
 
35669
    public Object getFieldValue(int fieldId) {
-
 
35670
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
35671
    }
-
 
35672
 
-
 
35673
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
35674
    public boolean isSet(_Fields field) {
-
 
35675
      switch (field) {
-
 
35676
      case SUCCESS:
-
 
35677
        return isSetSuccess();
-
 
35678
      }
-
 
35679
      throw new IllegalStateException();
-
 
35680
    }
-
 
35681
 
-
 
35682
    public boolean isSet(int fieldID) {
-
 
35683
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
35684
    }
-
 
35685
 
-
 
35686
    @Override
-
 
35687
    public boolean equals(Object that) {
-
 
35688
      if (that == null)
-
 
35689
        return false;
-
 
35690
      if (that instanceof getUserCount_result)
-
 
35691
        return this.equals((getUserCount_result)that);
-
 
35692
      return false;
-
 
35693
    }
-
 
35694
 
-
 
35695
    public boolean equals(getUserCount_result that) {
-
 
35696
      if (that == null)
-
 
35697
        return false;
-
 
35698
 
-
 
35699
      boolean this_present_success = true;
-
 
35700
      boolean that_present_success = true;
-
 
35701
      if (this_present_success || that_present_success) {
-
 
35702
        if (!(this_present_success && that_present_success))
-
 
35703
          return false;
-
 
35704
        if (this.success != that.success)
-
 
35705
          return false;
-
 
35706
      }
-
 
35707
 
-
 
35708
      return true;
-
 
35709
    }
-
 
35710
 
-
 
35711
    @Override
-
 
35712
    public int hashCode() {
-
 
35713
      return 0;
-
 
35714
    }
-
 
35715
 
-
 
35716
    public int compareTo(getUserCount_result other) {
-
 
35717
      if (!getClass().equals(other.getClass())) {
-
 
35718
        return getClass().getName().compareTo(other.getClass().getName());
-
 
35719
      }
-
 
35720
 
-
 
35721
      int lastComparison = 0;
-
 
35722
      getUserCount_result typedOther = (getUserCount_result)other;
-
 
35723
 
-
 
35724
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
35725
      if (lastComparison != 0) {
-
 
35726
        return lastComparison;
-
 
35727
      }
-
 
35728
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
35729
      if (lastComparison != 0) {
-
 
35730
        return lastComparison;
-
 
35731
      }
-
 
35732
      return 0;
-
 
35733
    }
-
 
35734
 
-
 
35735
    public void read(TProtocol iprot) throws TException {
-
 
35736
      TField field;
-
 
35737
      iprot.readStructBegin();
-
 
35738
      while (true)
-
 
35739
      {
-
 
35740
        field = iprot.readFieldBegin();
-
 
35741
        if (field.type == TType.STOP) { 
-
 
35742
          break;
-
 
35743
        }
-
 
35744
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
35745
        if (fieldId == null) {
-
 
35746
          TProtocolUtil.skip(iprot, field.type);
-
 
35747
        } else {
-
 
35748
          switch (fieldId) {
-
 
35749
            case SUCCESS:
-
 
35750
              if (field.type == TType.I64) {
-
 
35751
                this.success = iprot.readI64();
-
 
35752
                setSuccessIsSet(true);
-
 
35753
              } else { 
-
 
35754
                TProtocolUtil.skip(iprot, field.type);
-
 
35755
              }
-
 
35756
              break;
-
 
35757
          }
-
 
35758
          iprot.readFieldEnd();
-
 
35759
        }
-
 
35760
      }
-
 
35761
      iprot.readStructEnd();
-
 
35762
      validate();
-
 
35763
    }
-
 
35764
 
-
 
35765
    public void write(TProtocol oprot) throws TException {
-
 
35766
      oprot.writeStructBegin(STRUCT_DESC);
-
 
35767
 
-
 
35768
      if (this.isSetSuccess()) {
-
 
35769
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
35770
        oprot.writeI64(this.success);
-
 
35771
        oprot.writeFieldEnd();
-
 
35772
      }
-
 
35773
      oprot.writeFieldStop();
-
 
35774
      oprot.writeStructEnd();
-
 
35775
    }
-
 
35776
 
-
 
35777
    @Override
-
 
35778
    public String toString() {
-
 
35779
      StringBuilder sb = new StringBuilder("getUserCount_result(");
-
 
35780
      boolean first = true;
-
 
35781
 
-
 
35782
      sb.append("success:");
-
 
35783
      sb.append(this.success);
-
 
35784
      first = false;
-
 
35785
      sb.append(")");
-
 
35786
      return sb.toString();
-
 
35787
    }
-
 
35788
 
-
 
35789
    public void validate() throws TException {
35149
      // check for required fields
35790
      // check for required fields
35150
    }
35791
    }
35151
 
35792
 
35152
  }
35793
  }
35153
 
35794