Subversion Repositories SmartDukaan

Rev

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

Rev 1598 Rev 1674
Line 172... Line 172...
172
     * 
172
     * 
173
     * @param userType
173
     * @param userType
174
     */
174
     */
175
    public long getUserCount(UserType userType) throws TException;
175
    public long getUserCount(UserType userType) throws TException;
176
 
176
 
-
 
177
    /**
-
 
178
     * Returns list of users of type userType. If userType is null, then returns all the users.
-
 
179
     * 
-
 
180
     * @param userType
-
 
181
     */
-
 
182
    public List<User> getAllUsers(UserType userType) throws TException;
-
 
183
 
177
  }
184
  }
178
 
185
 
179
  public static class Client implements Iface {
186
  public static class Client implements Iface {
180
    public Client(TProtocol prot)
187
    public Client(TProtocol prot)
181
    {
188
    {
Line 1914... Line 1921...
1914
        return result.success;
1921
        return result.success;
1915
      }
1922
      }
1916
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserCount failed: unknown result");
1923
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserCount failed: unknown result");
1917
    }
1924
    }
1918
 
1925
 
-
 
1926
    public List<User> getAllUsers(UserType userType) throws TException
-
 
1927
    {
-
 
1928
      send_getAllUsers(userType);
-
 
1929
      return recv_getAllUsers();
-
 
1930
    }
-
 
1931
 
-
 
1932
    public void send_getAllUsers(UserType userType) throws TException
-
 
1933
    {
-
 
1934
      oprot_.writeMessageBegin(new TMessage("getAllUsers", TMessageType.CALL, seqid_));
-
 
1935
      getAllUsers_args args = new getAllUsers_args();
-
 
1936
      args.userType = userType;
-
 
1937
      args.write(oprot_);
-
 
1938
      oprot_.writeMessageEnd();
-
 
1939
      oprot_.getTransport().flush();
-
 
1940
    }
-
 
1941
 
-
 
1942
    public List<User> recv_getAllUsers() throws TException
-
 
1943
    {
-
 
1944
      TMessage msg = iprot_.readMessageBegin();
-
 
1945
      if (msg.type == TMessageType.EXCEPTION) {
-
 
1946
        TApplicationException x = TApplicationException.read(iprot_);
-
 
1947
        iprot_.readMessageEnd();
-
 
1948
        throw x;
-
 
1949
      }
-
 
1950
      getAllUsers_result result = new getAllUsers_result();
-
 
1951
      result.read(iprot_);
-
 
1952
      iprot_.readMessageEnd();
-
 
1953
      if (result.isSetSuccess()) {
-
 
1954
        return result.success;
-
 
1955
      }
-
 
1956
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllUsers failed: unknown result");
-
 
1957
    }
-
 
1958
 
1919
  }
1959
  }
1920
  public static class Processor implements TProcessor {
1960
  public static class Processor implements TProcessor {
1921
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1961
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1922
    public Processor(Iface iface)
1962
    public Processor(Iface iface)
1923
    {
1963
    {
Line 1968... Line 2008...
1968
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
2008
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1969
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
2009
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1970
      processMap_.put("getBrowseHistory", new getBrowseHistory());
2010
      processMap_.put("getBrowseHistory", new getBrowseHistory());
1971
      processMap_.put("mergeBrowseHistory", new mergeBrowseHistory());
2011
      processMap_.put("mergeBrowseHistory", new mergeBrowseHistory());
1972
      processMap_.put("getUserCount", new getUserCount());
2012
      processMap_.put("getUserCount", new getUserCount());
-
 
2013
      processMap_.put("getAllUsers", new getAllUsers());
1973
    }
2014
    }
1974
 
2015
 
1975
    protected static interface ProcessFunction {
2016
    protected static interface ProcessFunction {
1976
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
2017
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1977
    }
2018
    }
Line 3296... Line 3337...
3296
        oprot.getTransport().flush();
3337
        oprot.getTransport().flush();
3297
      }
3338
      }
3298
 
3339
 
3299
    }
3340
    }
3300
 
3341
 
-
 
3342
    private class getAllUsers implements ProcessFunction {
-
 
3343
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
3344
      {
-
 
3345
        getAllUsers_args args = new getAllUsers_args();
-
 
3346
        args.read(iprot);
-
 
3347
        iprot.readMessageEnd();
-
 
3348
        getAllUsers_result result = new getAllUsers_result();
-
 
3349
        result.success = iface_.getAllUsers(args.userType);
-
 
3350
        oprot.writeMessageBegin(new TMessage("getAllUsers", TMessageType.REPLY, seqid));
-
 
3351
        result.write(oprot);
-
 
3352
        oprot.writeMessageEnd();
-
 
3353
        oprot.getTransport().flush();
-
 
3354
      }
-
 
3355
 
-
 
3356
    }
-
 
3357
 
3301
  }
3358
  }
3302
 
3359
 
3303
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3360
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3304
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3361
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3305
 
3362
 
Line 35784... Line 35841...
35784
      first = false;
35841
      first = false;
35785
      sb.append(")");
35842
      sb.append(")");
35786
      return sb.toString();
35843
      return sb.toString();
35787
    }
35844
    }
35788
 
35845
 
-
 
35846
    public void validate() throws TException {
-
 
35847
      // check for required fields
-
 
35848
    }
-
 
35849
 
-
 
35850
  }
-
 
35851
 
-
 
35852
  public static class getAllUsers_args implements TBase<getAllUsers_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllUsers_args>   {
-
 
35853
    private static final TStruct STRUCT_DESC = new TStruct("getAllUsers_args");
-
 
35854
 
-
 
35855
    private static final TField USER_TYPE_FIELD_DESC = new TField("userType", TType.I32, (short)1);
-
 
35856
 
-
 
35857
    private UserType userType;
-
 
35858
 
-
 
35859
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
35860
    public enum _Fields implements TFieldIdEnum {
-
 
35861
      /**
-
 
35862
       * 
-
 
35863
       * @see UserType
-
 
35864
       */
-
 
35865
      USER_TYPE((short)1, "userType");
-
 
35866
 
-
 
35867
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
35868
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
35869
 
-
 
35870
      static {
-
 
35871
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
35872
          byId.put((int)field._thriftId, field);
-
 
35873
          byName.put(field.getFieldName(), field);
-
 
35874
        }
-
 
35875
      }
-
 
35876
 
-
 
35877
      /**
-
 
35878
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
35879
       */
-
 
35880
      public static _Fields findByThriftId(int fieldId) {
-
 
35881
        return byId.get(fieldId);
-
 
35882
      }
-
 
35883
 
-
 
35884
      /**
-
 
35885
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
35886
       * if it is not found.
-
 
35887
       */
-
 
35888
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
35889
        _Fields fields = findByThriftId(fieldId);
-
 
35890
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
35891
        return fields;
-
 
35892
      }
-
 
35893
 
-
 
35894
      /**
-
 
35895
       * Find the _Fields constant that matches name, or null if its not found.
-
 
35896
       */
-
 
35897
      public static _Fields findByName(String name) {
-
 
35898
        return byName.get(name);
-
 
35899
      }
-
 
35900
 
-
 
35901
      private final short _thriftId;
-
 
35902
      private final String _fieldName;
-
 
35903
 
-
 
35904
      _Fields(short thriftId, String fieldName) {
-
 
35905
        _thriftId = thriftId;
-
 
35906
        _fieldName = fieldName;
-
 
35907
      }
-
 
35908
 
-
 
35909
      public short getThriftFieldId() {
-
 
35910
        return _thriftId;
-
 
35911
      }
-
 
35912
 
-
 
35913
      public String getFieldName() {
-
 
35914
        return _fieldName;
-
 
35915
      }
-
 
35916
    }
-
 
35917
 
-
 
35918
    // isset id assignments
-
 
35919
 
-
 
35920
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
35921
      put(_Fields.USER_TYPE, new FieldMetaData("userType", TFieldRequirementType.DEFAULT, 
-
 
35922
          new EnumMetaData(TType.ENUM, UserType.class)));
-
 
35923
    }});
-
 
35924
 
-
 
35925
    static {
-
 
35926
      FieldMetaData.addStructMetaDataMap(getAllUsers_args.class, metaDataMap);
-
 
35927
    }
-
 
35928
 
-
 
35929
    public getAllUsers_args() {
-
 
35930
    }
-
 
35931
 
-
 
35932
    public getAllUsers_args(
-
 
35933
      UserType userType)
-
 
35934
    {
-
 
35935
      this();
-
 
35936
      this.userType = userType;
-
 
35937
    }
-
 
35938
 
-
 
35939
    /**
-
 
35940
     * Performs a deep copy on <i>other</i>.
-
 
35941
     */
-
 
35942
    public getAllUsers_args(getAllUsers_args other) {
-
 
35943
      if (other.isSetUserType()) {
-
 
35944
        this.userType = other.userType;
-
 
35945
      }
-
 
35946
    }
-
 
35947
 
-
 
35948
    public getAllUsers_args deepCopy() {
-
 
35949
      return new getAllUsers_args(this);
-
 
35950
    }
-
 
35951
 
-
 
35952
    @Deprecated
-
 
35953
    public getAllUsers_args clone() {
-
 
35954
      return new getAllUsers_args(this);
-
 
35955
    }
-
 
35956
 
-
 
35957
    /**
-
 
35958
     * 
-
 
35959
     * @see UserType
-
 
35960
     */
-
 
35961
    public UserType getUserType() {
-
 
35962
      return this.userType;
-
 
35963
    }
-
 
35964
 
-
 
35965
    /**
-
 
35966
     * 
-
 
35967
     * @see UserType
-
 
35968
     */
-
 
35969
    public getAllUsers_args setUserType(UserType userType) {
-
 
35970
      this.userType = userType;
-
 
35971
      return this;
-
 
35972
    }
-
 
35973
 
-
 
35974
    public void unsetUserType() {
-
 
35975
      this.userType = null;
-
 
35976
    }
-
 
35977
 
-
 
35978
    /** Returns true if field userType is set (has been asigned a value) and false otherwise */
-
 
35979
    public boolean isSetUserType() {
-
 
35980
      return this.userType != null;
-
 
35981
    }
-
 
35982
 
-
 
35983
    public void setUserTypeIsSet(boolean value) {
-
 
35984
      if (!value) {
-
 
35985
        this.userType = null;
-
 
35986
      }
-
 
35987
    }
-
 
35988
 
-
 
35989
    public void setFieldValue(_Fields field, Object value) {
-
 
35990
      switch (field) {
-
 
35991
      case USER_TYPE:
-
 
35992
        if (value == null) {
-
 
35993
          unsetUserType();
-
 
35994
        } else {
-
 
35995
          setUserType((UserType)value);
-
 
35996
        }
-
 
35997
        break;
-
 
35998
 
-
 
35999
      }
-
 
36000
    }
-
 
36001
 
-
 
36002
    public void setFieldValue(int fieldID, Object value) {
-
 
36003
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
36004
    }
-
 
36005
 
-
 
36006
    public Object getFieldValue(_Fields field) {
-
 
36007
      switch (field) {
-
 
36008
      case USER_TYPE:
-
 
36009
        return getUserType();
-
 
36010
 
-
 
36011
      }
-
 
36012
      throw new IllegalStateException();
-
 
36013
    }
-
 
36014
 
-
 
36015
    public Object getFieldValue(int fieldId) {
-
 
36016
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
36017
    }
-
 
36018
 
-
 
36019
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
36020
    public boolean isSet(_Fields field) {
-
 
36021
      switch (field) {
-
 
36022
      case USER_TYPE:
-
 
36023
        return isSetUserType();
-
 
36024
      }
-
 
36025
      throw new IllegalStateException();
-
 
36026
    }
-
 
36027
 
-
 
36028
    public boolean isSet(int fieldID) {
-
 
36029
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
36030
    }
-
 
36031
 
-
 
36032
    @Override
-
 
36033
    public boolean equals(Object that) {
-
 
36034
      if (that == null)
-
 
36035
        return false;
-
 
36036
      if (that instanceof getAllUsers_args)
-
 
36037
        return this.equals((getAllUsers_args)that);
-
 
36038
      return false;
-
 
36039
    }
-
 
36040
 
-
 
36041
    public boolean equals(getAllUsers_args that) {
-
 
36042
      if (that == null)
-
 
36043
        return false;
-
 
36044
 
-
 
36045
      boolean this_present_userType = true && this.isSetUserType();
-
 
36046
      boolean that_present_userType = true && that.isSetUserType();
-
 
36047
      if (this_present_userType || that_present_userType) {
-
 
36048
        if (!(this_present_userType && that_present_userType))
-
 
36049
          return false;
-
 
36050
        if (!this.userType.equals(that.userType))
-
 
36051
          return false;
-
 
36052
      }
-
 
36053
 
-
 
36054
      return true;
-
 
36055
    }
-
 
36056
 
-
 
36057
    @Override
-
 
36058
    public int hashCode() {
-
 
36059
      return 0;
-
 
36060
    }
-
 
36061
 
-
 
36062
    public int compareTo(getAllUsers_args other) {
-
 
36063
      if (!getClass().equals(other.getClass())) {
-
 
36064
        return getClass().getName().compareTo(other.getClass().getName());
-
 
36065
      }
-
 
36066
 
-
 
36067
      int lastComparison = 0;
-
 
36068
      getAllUsers_args typedOther = (getAllUsers_args)other;
-
 
36069
 
-
 
36070
      lastComparison = Boolean.valueOf(isSetUserType()).compareTo(isSetUserType());
-
 
36071
      if (lastComparison != 0) {
-
 
36072
        return lastComparison;
-
 
36073
      }
-
 
36074
      lastComparison = TBaseHelper.compareTo(userType, typedOther.userType);
-
 
36075
      if (lastComparison != 0) {
-
 
36076
        return lastComparison;
-
 
36077
      }
-
 
36078
      return 0;
-
 
36079
    }
-
 
36080
 
-
 
36081
    public void read(TProtocol iprot) throws TException {
-
 
36082
      TField field;
-
 
36083
      iprot.readStructBegin();
-
 
36084
      while (true)
-
 
36085
      {
-
 
36086
        field = iprot.readFieldBegin();
-
 
36087
        if (field.type == TType.STOP) { 
-
 
36088
          break;
-
 
36089
        }
-
 
36090
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
36091
        if (fieldId == null) {
-
 
36092
          TProtocolUtil.skip(iprot, field.type);
-
 
36093
        } else {
-
 
36094
          switch (fieldId) {
-
 
36095
            case USER_TYPE:
-
 
36096
              if (field.type == TType.I32) {
-
 
36097
                this.userType = UserType.findByValue(iprot.readI32());
-
 
36098
              } else { 
-
 
36099
                TProtocolUtil.skip(iprot, field.type);
-
 
36100
              }
-
 
36101
              break;
-
 
36102
          }
-
 
36103
          iprot.readFieldEnd();
-
 
36104
        }
-
 
36105
      }
-
 
36106
      iprot.readStructEnd();
-
 
36107
      validate();
-
 
36108
    }
-
 
36109
 
-
 
36110
    public void write(TProtocol oprot) throws TException {
-
 
36111
      validate();
-
 
36112
 
-
 
36113
      oprot.writeStructBegin(STRUCT_DESC);
-
 
36114
      if (this.userType != null) {
-
 
36115
        oprot.writeFieldBegin(USER_TYPE_FIELD_DESC);
-
 
36116
        oprot.writeI32(this.userType.getValue());
-
 
36117
        oprot.writeFieldEnd();
-
 
36118
      }
-
 
36119
      oprot.writeFieldStop();
-
 
36120
      oprot.writeStructEnd();
-
 
36121
    }
-
 
36122
 
-
 
36123
    @Override
-
 
36124
    public String toString() {
-
 
36125
      StringBuilder sb = new StringBuilder("getAllUsers_args(");
-
 
36126
      boolean first = true;
-
 
36127
 
-
 
36128
      sb.append("userType:");
-
 
36129
      if (this.userType == null) {
-
 
36130
        sb.append("null");
-
 
36131
      } else {
-
 
36132
        String userType_name = userType.name();
-
 
36133
        if (userType_name != null) {
-
 
36134
          sb.append(userType_name);
-
 
36135
          sb.append(" (");
-
 
36136
        }
-
 
36137
        sb.append(this.userType);
-
 
36138
        if (userType_name != null) {
-
 
36139
          sb.append(")");
-
 
36140
        }
-
 
36141
      }
-
 
36142
      first = false;
-
 
36143
      sb.append(")");
-
 
36144
      return sb.toString();
-
 
36145
    }
-
 
36146
 
-
 
36147
    public void validate() throws TException {
-
 
36148
      // check for required fields
-
 
36149
    }
-
 
36150
 
-
 
36151
  }
-
 
36152
 
-
 
36153
  public static class getAllUsers_result implements TBase<getAllUsers_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllUsers_result>   {
-
 
36154
    private static final TStruct STRUCT_DESC = new TStruct("getAllUsers_result");
-
 
36155
 
-
 
36156
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
-
 
36157
 
-
 
36158
    private List<User> success;
-
 
36159
 
-
 
36160
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
36161
    public enum _Fields implements TFieldIdEnum {
-
 
36162
      SUCCESS((short)0, "success");
-
 
36163
 
-
 
36164
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
36165
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
36166
 
-
 
36167
      static {
-
 
36168
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
36169
          byId.put((int)field._thriftId, field);
-
 
36170
          byName.put(field.getFieldName(), field);
-
 
36171
        }
-
 
36172
      }
-
 
36173
 
-
 
36174
      /**
-
 
36175
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
36176
       */
-
 
36177
      public static _Fields findByThriftId(int fieldId) {
-
 
36178
        return byId.get(fieldId);
-
 
36179
      }
-
 
36180
 
-
 
36181
      /**
-
 
36182
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
36183
       * if it is not found.
-
 
36184
       */
-
 
36185
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
36186
        _Fields fields = findByThriftId(fieldId);
-
 
36187
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
36188
        return fields;
-
 
36189
      }
-
 
36190
 
-
 
36191
      /**
-
 
36192
       * Find the _Fields constant that matches name, or null if its not found.
-
 
36193
       */
-
 
36194
      public static _Fields findByName(String name) {
-
 
36195
        return byName.get(name);
-
 
36196
      }
-
 
36197
 
-
 
36198
      private final short _thriftId;
-
 
36199
      private final String _fieldName;
-
 
36200
 
-
 
36201
      _Fields(short thriftId, String fieldName) {
-
 
36202
        _thriftId = thriftId;
-
 
36203
        _fieldName = fieldName;
-
 
36204
      }
-
 
36205
 
-
 
36206
      public short getThriftFieldId() {
-
 
36207
        return _thriftId;
-
 
36208
      }
-
 
36209
 
-
 
36210
      public String getFieldName() {
-
 
36211
        return _fieldName;
-
 
36212
      }
-
 
36213
    }
-
 
36214
 
-
 
36215
    // isset id assignments
-
 
36216
 
-
 
36217
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
36218
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
36219
          new ListMetaData(TType.LIST, 
-
 
36220
              new StructMetaData(TType.STRUCT, User.class))));
-
 
36221
    }});
-
 
36222
 
-
 
36223
    static {
-
 
36224
      FieldMetaData.addStructMetaDataMap(getAllUsers_result.class, metaDataMap);
-
 
36225
    }
-
 
36226
 
-
 
36227
    public getAllUsers_result() {
-
 
36228
    }
-
 
36229
 
-
 
36230
    public getAllUsers_result(
-
 
36231
      List<User> success)
-
 
36232
    {
-
 
36233
      this();
-
 
36234
      this.success = success;
-
 
36235
    }
-
 
36236
 
-
 
36237
    /**
-
 
36238
     * Performs a deep copy on <i>other</i>.
-
 
36239
     */
-
 
36240
    public getAllUsers_result(getAllUsers_result other) {
-
 
36241
      if (other.isSetSuccess()) {
-
 
36242
        List<User> __this__success = new ArrayList<User>();
-
 
36243
        for (User other_element : other.success) {
-
 
36244
          __this__success.add(new User(other_element));
-
 
36245
        }
-
 
36246
        this.success = __this__success;
-
 
36247
      }
-
 
36248
    }
-
 
36249
 
-
 
36250
    public getAllUsers_result deepCopy() {
-
 
36251
      return new getAllUsers_result(this);
-
 
36252
    }
-
 
36253
 
-
 
36254
    @Deprecated
-
 
36255
    public getAllUsers_result clone() {
-
 
36256
      return new getAllUsers_result(this);
-
 
36257
    }
-
 
36258
 
-
 
36259
    public int getSuccessSize() {
-
 
36260
      return (this.success == null) ? 0 : this.success.size();
-
 
36261
    }
-
 
36262
 
-
 
36263
    public java.util.Iterator<User> getSuccessIterator() {
-
 
36264
      return (this.success == null) ? null : this.success.iterator();
-
 
36265
    }
-
 
36266
 
-
 
36267
    public void addToSuccess(User elem) {
-
 
36268
      if (this.success == null) {
-
 
36269
        this.success = new ArrayList<User>();
-
 
36270
      }
-
 
36271
      this.success.add(elem);
-
 
36272
    }
-
 
36273
 
-
 
36274
    public List<User> getSuccess() {
-
 
36275
      return this.success;
-
 
36276
    }
-
 
36277
 
-
 
36278
    public getAllUsers_result setSuccess(List<User> success) {
-
 
36279
      this.success = success;
-
 
36280
      return this;
-
 
36281
    }
-
 
36282
 
-
 
36283
    public void unsetSuccess() {
-
 
36284
      this.success = null;
-
 
36285
    }
-
 
36286
 
-
 
36287
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
36288
    public boolean isSetSuccess() {
-
 
36289
      return this.success != null;
-
 
36290
    }
-
 
36291
 
-
 
36292
    public void setSuccessIsSet(boolean value) {
-
 
36293
      if (!value) {
-
 
36294
        this.success = null;
-
 
36295
      }
-
 
36296
    }
-
 
36297
 
-
 
36298
    public void setFieldValue(_Fields field, Object value) {
-
 
36299
      switch (field) {
-
 
36300
      case SUCCESS:
-
 
36301
        if (value == null) {
-
 
36302
          unsetSuccess();
-
 
36303
        } else {
-
 
36304
          setSuccess((List<User>)value);
-
 
36305
        }
-
 
36306
        break;
-
 
36307
 
-
 
36308
      }
-
 
36309
    }
-
 
36310
 
-
 
36311
    public void setFieldValue(int fieldID, Object value) {
-
 
36312
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
36313
    }
-
 
36314
 
-
 
36315
    public Object getFieldValue(_Fields field) {
-
 
36316
      switch (field) {
-
 
36317
      case SUCCESS:
-
 
36318
        return getSuccess();
-
 
36319
 
-
 
36320
      }
-
 
36321
      throw new IllegalStateException();
-
 
36322
    }
-
 
36323
 
-
 
36324
    public Object getFieldValue(int fieldId) {
-
 
36325
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
36326
    }
-
 
36327
 
-
 
36328
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
36329
    public boolean isSet(_Fields field) {
-
 
36330
      switch (field) {
-
 
36331
      case SUCCESS:
-
 
36332
        return isSetSuccess();
-
 
36333
      }
-
 
36334
      throw new IllegalStateException();
-
 
36335
    }
-
 
36336
 
-
 
36337
    public boolean isSet(int fieldID) {
-
 
36338
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
36339
    }
-
 
36340
 
-
 
36341
    @Override
-
 
36342
    public boolean equals(Object that) {
-
 
36343
      if (that == null)
-
 
36344
        return false;
-
 
36345
      if (that instanceof getAllUsers_result)
-
 
36346
        return this.equals((getAllUsers_result)that);
-
 
36347
      return false;
-
 
36348
    }
-
 
36349
 
-
 
36350
    public boolean equals(getAllUsers_result that) {
-
 
36351
      if (that == null)
-
 
36352
        return false;
-
 
36353
 
-
 
36354
      boolean this_present_success = true && this.isSetSuccess();
-
 
36355
      boolean that_present_success = true && that.isSetSuccess();
-
 
36356
      if (this_present_success || that_present_success) {
-
 
36357
        if (!(this_present_success && that_present_success))
-
 
36358
          return false;
-
 
36359
        if (!this.success.equals(that.success))
-
 
36360
          return false;
-
 
36361
      }
-
 
36362
 
-
 
36363
      return true;
-
 
36364
    }
-
 
36365
 
-
 
36366
    @Override
-
 
36367
    public int hashCode() {
-
 
36368
      return 0;
-
 
36369
    }
-
 
36370
 
-
 
36371
    public int compareTo(getAllUsers_result other) {
-
 
36372
      if (!getClass().equals(other.getClass())) {
-
 
36373
        return getClass().getName().compareTo(other.getClass().getName());
-
 
36374
      }
-
 
36375
 
-
 
36376
      int lastComparison = 0;
-
 
36377
      getAllUsers_result typedOther = (getAllUsers_result)other;
-
 
36378
 
-
 
36379
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
36380
      if (lastComparison != 0) {
-
 
36381
        return lastComparison;
-
 
36382
      }
-
 
36383
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
36384
      if (lastComparison != 0) {
-
 
36385
        return lastComparison;
-
 
36386
      }
-
 
36387
      return 0;
-
 
36388
    }
-
 
36389
 
-
 
36390
    public void read(TProtocol iprot) throws TException {
-
 
36391
      TField field;
-
 
36392
      iprot.readStructBegin();
-
 
36393
      while (true)
-
 
36394
      {
-
 
36395
        field = iprot.readFieldBegin();
-
 
36396
        if (field.type == TType.STOP) { 
-
 
36397
          break;
-
 
36398
        }
-
 
36399
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
36400
        if (fieldId == null) {
-
 
36401
          TProtocolUtil.skip(iprot, field.type);
-
 
36402
        } else {
-
 
36403
          switch (fieldId) {
-
 
36404
            case SUCCESS:
-
 
36405
              if (field.type == TType.LIST) {
-
 
36406
                {
-
 
36407
                  TList _list45 = iprot.readListBegin();
-
 
36408
                  this.success = new ArrayList<User>(_list45.size);
-
 
36409
                  for (int _i46 = 0; _i46 < _list45.size; ++_i46)
-
 
36410
                  {
-
 
36411
                    User _elem47;
-
 
36412
                    _elem47 = new User();
-
 
36413
                    _elem47.read(iprot);
-
 
36414
                    this.success.add(_elem47);
-
 
36415
                  }
-
 
36416
                  iprot.readListEnd();
-
 
36417
                }
-
 
36418
              } else { 
-
 
36419
                TProtocolUtil.skip(iprot, field.type);
-
 
36420
              }
-
 
36421
              break;
-
 
36422
          }
-
 
36423
          iprot.readFieldEnd();
-
 
36424
        }
-
 
36425
      }
-
 
36426
      iprot.readStructEnd();
-
 
36427
      validate();
-
 
36428
    }
-
 
36429
 
-
 
36430
    public void write(TProtocol oprot) throws TException {
-
 
36431
      oprot.writeStructBegin(STRUCT_DESC);
-
 
36432
 
-
 
36433
      if (this.isSetSuccess()) {
-
 
36434
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
36435
        {
-
 
36436
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
-
 
36437
          for (User _iter48 : this.success)
-
 
36438
          {
-
 
36439
            _iter48.write(oprot);
-
 
36440
          }
-
 
36441
          oprot.writeListEnd();
-
 
36442
        }
-
 
36443
        oprot.writeFieldEnd();
-
 
36444
      }
-
 
36445
      oprot.writeFieldStop();
-
 
36446
      oprot.writeStructEnd();
-
 
36447
    }
-
 
36448
 
-
 
36449
    @Override
-
 
36450
    public String toString() {
-
 
36451
      StringBuilder sb = new StringBuilder("getAllUsers_result(");
-
 
36452
      boolean first = true;
-
 
36453
 
-
 
36454
      sb.append("success:");
-
 
36455
      if (this.success == null) {
-
 
36456
        sb.append("null");
-
 
36457
      } else {
-
 
36458
        sb.append(this.success);
-
 
36459
      }
-
 
36460
      first = false;
-
 
36461
      sb.append(")");
-
 
36462
      return sb.toString();
-
 
36463
    }
-
 
36464
 
35789
    public void validate() throws TException {
36465
    public void validate() throws TException {
35790
      // check for required fields
36466
      // check for required fields
35791
    }
36467
    }
35792
 
36468
 
35793
  }
36469
  }