Subversion Repositories SmartDukaan

Rev

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

Rev 2981 Rev 3028
Line 39... Line 39...
39
 
39
 
40
    public User getUserById(long userId) throws UserContextException, TException;
40
    public User getUserById(long userId) throws UserContextException, TException;
41
 
41
 
42
    public User getUserByEmail(String email) throws UserContextException, TException;
42
    public User getUserByEmail(String email) throws UserContextException, TException;
43
 
43
 
-
 
44
    public User getUserByMobileNumber(long mobileNumber) throws UserContextException, TException;
-
 
45
 
44
    public User createUser(User user) throws UserContextException, TException;
46
    public User createUser(User user) throws UserContextException, TException;
45
 
47
 
46
    public User updateUser(User user) throws UserContextException, TException;
48
    public User updateUser(User user) throws UserContextException, TException;
47
 
49
 
48
    public boolean deleteUser(long userId) throws UserContextException, TException;
50
    public boolean deleteUser(long userId) throws UserContextException, TException;
Line 411... Line 413...
411
        throw result.ucex;
413
        throw result.ucex;
412
      }
414
      }
413
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserByEmail failed: unknown result");
415
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserByEmail failed: unknown result");
414
    }
416
    }
415
 
417
 
-
 
418
    public User getUserByMobileNumber(long mobileNumber) throws UserContextException, TException
-
 
419
    {
-
 
420
      send_getUserByMobileNumber(mobileNumber);
-
 
421
      return recv_getUserByMobileNumber();
-
 
422
    }
-
 
423
 
-
 
424
    public void send_getUserByMobileNumber(long mobileNumber) throws TException
-
 
425
    {
-
 
426
      oprot_.writeMessageBegin(new TMessage("getUserByMobileNumber", TMessageType.CALL, seqid_));
-
 
427
      getUserByMobileNumber_args args = new getUserByMobileNumber_args();
-
 
428
      args.mobileNumber = mobileNumber;
-
 
429
      args.write(oprot_);
-
 
430
      oprot_.writeMessageEnd();
-
 
431
      oprot_.getTransport().flush();
-
 
432
    }
-
 
433
 
-
 
434
    public User recv_getUserByMobileNumber() throws UserContextException, TException
-
 
435
    {
-
 
436
      TMessage msg = iprot_.readMessageBegin();
-
 
437
      if (msg.type == TMessageType.EXCEPTION) {
-
 
438
        TApplicationException x = TApplicationException.read(iprot_);
-
 
439
        iprot_.readMessageEnd();
-
 
440
        throw x;
-
 
441
      }
-
 
442
      getUserByMobileNumber_result result = new getUserByMobileNumber_result();
-
 
443
      result.read(iprot_);
-
 
444
      iprot_.readMessageEnd();
-
 
445
      if (result.isSetSuccess()) {
-
 
446
        return result.success;
-
 
447
      }
-
 
448
      if (result.ucex != null) {
-
 
449
        throw result.ucex;
-
 
450
      }
-
 
451
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserByMobileNumber failed: unknown result");
-
 
452
    }
-
 
453
 
416
    public User createUser(User user) throws UserContextException, TException
454
    public User createUser(User user) throws UserContextException, TException
417
    {
455
    {
418
      send_createUser(user);
456
      send_createUser(user);
419
      return recv_createUser();
457
      return recv_createUser();
420
    }
458
    }
Line 2692... Line 2730...
2692
      iface_ = iface;
2730
      iface_ = iface;
2693
      processMap_.put("closeSession", new closeSession());
2731
      processMap_.put("closeSession", new closeSession());
2694
      processMap_.put("createAnonymousUser", new createAnonymousUser());
2732
      processMap_.put("createAnonymousUser", new createAnonymousUser());
2695
      processMap_.put("getUserById", new getUserById());
2733
      processMap_.put("getUserById", new getUserById());
2696
      processMap_.put("getUserByEmail", new getUserByEmail());
2734
      processMap_.put("getUserByEmail", new getUserByEmail());
-
 
2735
      processMap_.put("getUserByMobileNumber", new getUserByMobileNumber());
2697
      processMap_.put("createUser", new createUser());
2736
      processMap_.put("createUser", new createUser());
2698
      processMap_.put("updateUser", new updateUser());
2737
      processMap_.put("updateUser", new updateUser());
2699
      processMap_.put("deleteUser", new deleteUser());
2738
      processMap_.put("deleteUser", new deleteUser());
2700
      processMap_.put("getUserState", new getUserState());
2739
      processMap_.put("getUserState", new getUserState());
2701
      processMap_.put("authenticateUser", new authenticateUser());
2740
      processMap_.put("authenticateUser", new authenticateUser());
Line 2882... Line 2921...
2882
        oprot.getTransport().flush();
2921
        oprot.getTransport().flush();
2883
      }
2922
      }
2884
 
2923
 
2885
    }
2924
    }
2886
 
2925
 
-
 
2926
    private class getUserByMobileNumber implements ProcessFunction {
-
 
2927
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
2928
      {
-
 
2929
        getUserByMobileNumber_args args = new getUserByMobileNumber_args();
-
 
2930
        args.read(iprot);
-
 
2931
        iprot.readMessageEnd();
-
 
2932
        getUserByMobileNumber_result result = new getUserByMobileNumber_result();
-
 
2933
        try {
-
 
2934
          result.success = iface_.getUserByMobileNumber(args.mobileNumber);
-
 
2935
        } catch (UserContextException ucex) {
-
 
2936
          result.ucex = ucex;
-
 
2937
        } catch (Throwable th) {
-
 
2938
          LOGGER.error("Internal error processing getUserByMobileNumber", th);
-
 
2939
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserByMobileNumber");
-
 
2940
          oprot.writeMessageBegin(new TMessage("getUserByMobileNumber", TMessageType.EXCEPTION, seqid));
-
 
2941
          x.write(oprot);
-
 
2942
          oprot.writeMessageEnd();
-
 
2943
          oprot.getTransport().flush();
-
 
2944
          return;
-
 
2945
        }
-
 
2946
        oprot.writeMessageBegin(new TMessage("getUserByMobileNumber", TMessageType.REPLY, seqid));
-
 
2947
        result.write(oprot);
-
 
2948
        oprot.writeMessageEnd();
-
 
2949
        oprot.getTransport().flush();
-
 
2950
      }
-
 
2951
 
-
 
2952
    }
-
 
2953
 
2887
    private class createUser implements ProcessFunction {
2954
    private class createUser implements ProcessFunction {
2888
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2955
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2889
      {
2956
      {
2890
        createUser_args args = new createUser_args();
2957
        createUser_args args = new createUser_args();
2891
        args.read(iprot);
2958
        args.read(iprot);
Line 6888... Line 6955...
6888
      boolean first = true;
6955
      boolean first = true;
6889
 
6956
 
6890
      sb.append("success:");
6957
      sb.append("success:");
6891
      if (this.success == null) {
6958
      if (this.success == null) {
6892
        sb.append("null");
6959
        sb.append("null");
-
 
6960
      } else {
-
 
6961
        sb.append(this.success);
-
 
6962
      }
-
 
6963
      first = false;
-
 
6964
      if (!first) sb.append(", ");
-
 
6965
      sb.append("ucex:");
-
 
6966
      if (this.ucex == null) {
-
 
6967
        sb.append("null");
-
 
6968
      } else {
-
 
6969
        sb.append(this.ucex);
-
 
6970
      }
-
 
6971
      first = false;
-
 
6972
      sb.append(")");
-
 
6973
      return sb.toString();
-
 
6974
    }
-
 
6975
 
-
 
6976
    public void validate() throws TException {
-
 
6977
      // check for required fields
-
 
6978
    }
-
 
6979
 
-
 
6980
  }
-
 
6981
 
-
 
6982
  public static class getUserByMobileNumber_args implements TBase<getUserByMobileNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserByMobileNumber_args>   {
-
 
6983
    private static final TStruct STRUCT_DESC = new TStruct("getUserByMobileNumber_args");
-
 
6984
 
-
 
6985
    private static final TField MOBILE_NUMBER_FIELD_DESC = new TField("mobileNumber", TType.I64, (short)1);
-
 
6986
 
-
 
6987
    private long mobileNumber;
-
 
6988
 
-
 
6989
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
6990
    public enum _Fields implements TFieldIdEnum {
-
 
6991
      MOBILE_NUMBER((short)1, "mobileNumber");
-
 
6992
 
-
 
6993
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
6994
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
6995
 
-
 
6996
      static {
-
 
6997
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
6998
          byId.put((int)field._thriftId, field);
-
 
6999
          byName.put(field.getFieldName(), field);
-
 
7000
        }
-
 
7001
      }
-
 
7002
 
-
 
7003
      /**
-
 
7004
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
7005
       */
-
 
7006
      public static _Fields findByThriftId(int fieldId) {
-
 
7007
        return byId.get(fieldId);
-
 
7008
      }
-
 
7009
 
-
 
7010
      /**
-
 
7011
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
7012
       * if it is not found.
-
 
7013
       */
-
 
7014
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
7015
        _Fields fields = findByThriftId(fieldId);
-
 
7016
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
7017
        return fields;
-
 
7018
      }
-
 
7019
 
-
 
7020
      /**
-
 
7021
       * Find the _Fields constant that matches name, or null if its not found.
-
 
7022
       */
-
 
7023
      public static _Fields findByName(String name) {
-
 
7024
        return byName.get(name);
-
 
7025
      }
-
 
7026
 
-
 
7027
      private final short _thriftId;
-
 
7028
      private final String _fieldName;
-
 
7029
 
-
 
7030
      _Fields(short thriftId, String fieldName) {
-
 
7031
        _thriftId = thriftId;
-
 
7032
        _fieldName = fieldName;
-
 
7033
      }
-
 
7034
 
-
 
7035
      public short getThriftFieldId() {
-
 
7036
        return _thriftId;
-
 
7037
      }
-
 
7038
 
-
 
7039
      public String getFieldName() {
-
 
7040
        return _fieldName;
-
 
7041
      }
-
 
7042
    }
-
 
7043
 
-
 
7044
    // isset id assignments
-
 
7045
    private static final int __MOBILENUMBER_ISSET_ID = 0;
-
 
7046
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
7047
 
-
 
7048
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
7049
      put(_Fields.MOBILE_NUMBER, new FieldMetaData("mobileNumber", TFieldRequirementType.DEFAULT, 
-
 
7050
          new FieldValueMetaData(TType.I64)));
-
 
7051
    }});
-
 
7052
 
-
 
7053
    static {
-
 
7054
      FieldMetaData.addStructMetaDataMap(getUserByMobileNumber_args.class, metaDataMap);
-
 
7055
    }
-
 
7056
 
-
 
7057
    public getUserByMobileNumber_args() {
-
 
7058
    }
-
 
7059
 
-
 
7060
    public getUserByMobileNumber_args(
-
 
7061
      long mobileNumber)
-
 
7062
    {
-
 
7063
      this();
-
 
7064
      this.mobileNumber = mobileNumber;
-
 
7065
      setMobileNumberIsSet(true);
-
 
7066
    }
-
 
7067
 
-
 
7068
    /**
-
 
7069
     * Performs a deep copy on <i>other</i>.
-
 
7070
     */
-
 
7071
    public getUserByMobileNumber_args(getUserByMobileNumber_args other) {
-
 
7072
      __isset_bit_vector.clear();
-
 
7073
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
7074
      this.mobileNumber = other.mobileNumber;
-
 
7075
    }
-
 
7076
 
-
 
7077
    public getUserByMobileNumber_args deepCopy() {
-
 
7078
      return new getUserByMobileNumber_args(this);
-
 
7079
    }
-
 
7080
 
-
 
7081
    @Deprecated
-
 
7082
    public getUserByMobileNumber_args clone() {
-
 
7083
      return new getUserByMobileNumber_args(this);
-
 
7084
    }
-
 
7085
 
-
 
7086
    public long getMobileNumber() {
-
 
7087
      return this.mobileNumber;
-
 
7088
    }
-
 
7089
 
-
 
7090
    public getUserByMobileNumber_args setMobileNumber(long mobileNumber) {
-
 
7091
      this.mobileNumber = mobileNumber;
-
 
7092
      setMobileNumberIsSet(true);
-
 
7093
      return this;
-
 
7094
    }
-
 
7095
 
-
 
7096
    public void unsetMobileNumber() {
-
 
7097
      __isset_bit_vector.clear(__MOBILENUMBER_ISSET_ID);
-
 
7098
    }
-
 
7099
 
-
 
7100
    /** Returns true if field mobileNumber is set (has been asigned a value) and false otherwise */
-
 
7101
    public boolean isSetMobileNumber() {
-
 
7102
      return __isset_bit_vector.get(__MOBILENUMBER_ISSET_ID);
-
 
7103
    }
-
 
7104
 
-
 
7105
    public void setMobileNumberIsSet(boolean value) {
-
 
7106
      __isset_bit_vector.set(__MOBILENUMBER_ISSET_ID, value);
-
 
7107
    }
-
 
7108
 
-
 
7109
    public void setFieldValue(_Fields field, Object value) {
-
 
7110
      switch (field) {
-
 
7111
      case MOBILE_NUMBER:
-
 
7112
        if (value == null) {
-
 
7113
          unsetMobileNumber();
-
 
7114
        } else {
-
 
7115
          setMobileNumber((Long)value);
-
 
7116
        }
-
 
7117
        break;
-
 
7118
 
-
 
7119
      }
-
 
7120
    }
-
 
7121
 
-
 
7122
    public void setFieldValue(int fieldID, Object value) {
-
 
7123
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
7124
    }
-
 
7125
 
-
 
7126
    public Object getFieldValue(_Fields field) {
-
 
7127
      switch (field) {
-
 
7128
      case MOBILE_NUMBER:
-
 
7129
        return new Long(getMobileNumber());
-
 
7130
 
-
 
7131
      }
-
 
7132
      throw new IllegalStateException();
-
 
7133
    }
-
 
7134
 
-
 
7135
    public Object getFieldValue(int fieldId) {
-
 
7136
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
7137
    }
-
 
7138
 
-
 
7139
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
7140
    public boolean isSet(_Fields field) {
-
 
7141
      switch (field) {
-
 
7142
      case MOBILE_NUMBER:
-
 
7143
        return isSetMobileNumber();
-
 
7144
      }
-
 
7145
      throw new IllegalStateException();
-
 
7146
    }
-
 
7147
 
-
 
7148
    public boolean isSet(int fieldID) {
-
 
7149
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
7150
    }
-
 
7151
 
-
 
7152
    @Override
-
 
7153
    public boolean equals(Object that) {
-
 
7154
      if (that == null)
-
 
7155
        return false;
-
 
7156
      if (that instanceof getUserByMobileNumber_args)
-
 
7157
        return this.equals((getUserByMobileNumber_args)that);
-
 
7158
      return false;
-
 
7159
    }
-
 
7160
 
-
 
7161
    public boolean equals(getUserByMobileNumber_args that) {
-
 
7162
      if (that == null)
-
 
7163
        return false;
-
 
7164
 
-
 
7165
      boolean this_present_mobileNumber = true;
-
 
7166
      boolean that_present_mobileNumber = true;
-
 
7167
      if (this_present_mobileNumber || that_present_mobileNumber) {
-
 
7168
        if (!(this_present_mobileNumber && that_present_mobileNumber))
-
 
7169
          return false;
-
 
7170
        if (this.mobileNumber != that.mobileNumber)
-
 
7171
          return false;
-
 
7172
      }
-
 
7173
 
-
 
7174
      return true;
-
 
7175
    }
-
 
7176
 
-
 
7177
    @Override
-
 
7178
    public int hashCode() {
-
 
7179
      return 0;
-
 
7180
    }
-
 
7181
 
-
 
7182
    public int compareTo(getUserByMobileNumber_args other) {
-
 
7183
      if (!getClass().equals(other.getClass())) {
-
 
7184
        return getClass().getName().compareTo(other.getClass().getName());
-
 
7185
      }
-
 
7186
 
-
 
7187
      int lastComparison = 0;
-
 
7188
      getUserByMobileNumber_args typedOther = (getUserByMobileNumber_args)other;
-
 
7189
 
-
 
7190
      lastComparison = Boolean.valueOf(isSetMobileNumber()).compareTo(isSetMobileNumber());
-
 
7191
      if (lastComparison != 0) {
-
 
7192
        return lastComparison;
-
 
7193
      }
-
 
7194
      lastComparison = TBaseHelper.compareTo(mobileNumber, typedOther.mobileNumber);
-
 
7195
      if (lastComparison != 0) {
-
 
7196
        return lastComparison;
-
 
7197
      }
-
 
7198
      return 0;
-
 
7199
    }
-
 
7200
 
-
 
7201
    public void read(TProtocol iprot) throws TException {
-
 
7202
      TField field;
-
 
7203
      iprot.readStructBegin();
-
 
7204
      while (true)
-
 
7205
      {
-
 
7206
        field = iprot.readFieldBegin();
-
 
7207
        if (field.type == TType.STOP) { 
-
 
7208
          break;
-
 
7209
        }
-
 
7210
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
7211
        if (fieldId == null) {
-
 
7212
          TProtocolUtil.skip(iprot, field.type);
-
 
7213
        } else {
-
 
7214
          switch (fieldId) {
-
 
7215
            case MOBILE_NUMBER:
-
 
7216
              if (field.type == TType.I64) {
-
 
7217
                this.mobileNumber = iprot.readI64();
-
 
7218
                setMobileNumberIsSet(true);
-
 
7219
              } else { 
-
 
7220
                TProtocolUtil.skip(iprot, field.type);
-
 
7221
              }
-
 
7222
              break;
-
 
7223
          }
-
 
7224
          iprot.readFieldEnd();
-
 
7225
        }
-
 
7226
      }
-
 
7227
      iprot.readStructEnd();
-
 
7228
      validate();
-
 
7229
    }
-
 
7230
 
-
 
7231
    public void write(TProtocol oprot) throws TException {
-
 
7232
      validate();
-
 
7233
 
-
 
7234
      oprot.writeStructBegin(STRUCT_DESC);
-
 
7235
      oprot.writeFieldBegin(MOBILE_NUMBER_FIELD_DESC);
-
 
7236
      oprot.writeI64(this.mobileNumber);
-
 
7237
      oprot.writeFieldEnd();
-
 
7238
      oprot.writeFieldStop();
-
 
7239
      oprot.writeStructEnd();
-
 
7240
    }
-
 
7241
 
-
 
7242
    @Override
-
 
7243
    public String toString() {
-
 
7244
      StringBuilder sb = new StringBuilder("getUserByMobileNumber_args(");
-
 
7245
      boolean first = true;
-
 
7246
 
-
 
7247
      sb.append("mobileNumber:");
-
 
7248
      sb.append(this.mobileNumber);
-
 
7249
      first = false;
-
 
7250
      sb.append(")");
-
 
7251
      return sb.toString();
-
 
7252
    }
-
 
7253
 
-
 
7254
    public void validate() throws TException {
-
 
7255
      // check for required fields
-
 
7256
    }
-
 
7257
 
-
 
7258
  }
-
 
7259
 
-
 
7260
  public static class getUserByMobileNumber_result implements TBase<getUserByMobileNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserByMobileNumber_result>   {
-
 
7261
    private static final TStruct STRUCT_DESC = new TStruct("getUserByMobileNumber_result");
-
 
7262
 
-
 
7263
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
-
 
7264
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
-
 
7265
 
-
 
7266
    private User success;
-
 
7267
    private UserContextException ucex;
-
 
7268
 
-
 
7269
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
7270
    public enum _Fields implements TFieldIdEnum {
-
 
7271
      SUCCESS((short)0, "success"),
-
 
7272
      UCEX((short)1, "ucex");
-
 
7273
 
-
 
7274
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
7275
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
7276
 
-
 
7277
      static {
-
 
7278
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
7279
          byId.put((int)field._thriftId, field);
-
 
7280
          byName.put(field.getFieldName(), field);
-
 
7281
        }
-
 
7282
      }
-
 
7283
 
-
 
7284
      /**
-
 
7285
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
7286
       */
-
 
7287
      public static _Fields findByThriftId(int fieldId) {
-
 
7288
        return byId.get(fieldId);
-
 
7289
      }
-
 
7290
 
-
 
7291
      /**
-
 
7292
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
7293
       * if it is not found.
-
 
7294
       */
-
 
7295
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
7296
        _Fields fields = findByThriftId(fieldId);
-
 
7297
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
7298
        return fields;
-
 
7299
      }
-
 
7300
 
-
 
7301
      /**
-
 
7302
       * Find the _Fields constant that matches name, or null if its not found.
-
 
7303
       */
-
 
7304
      public static _Fields findByName(String name) {
-
 
7305
        return byName.get(name);
-
 
7306
      }
-
 
7307
 
-
 
7308
      private final short _thriftId;
-
 
7309
      private final String _fieldName;
-
 
7310
 
-
 
7311
      _Fields(short thriftId, String fieldName) {
-
 
7312
        _thriftId = thriftId;
-
 
7313
        _fieldName = fieldName;
-
 
7314
      }
-
 
7315
 
-
 
7316
      public short getThriftFieldId() {
-
 
7317
        return _thriftId;
-
 
7318
      }
-
 
7319
 
-
 
7320
      public String getFieldName() {
-
 
7321
        return _fieldName;
-
 
7322
      }
-
 
7323
    }
-
 
7324
 
-
 
7325
    // isset id assignments
-
 
7326
 
-
 
7327
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
7328
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
7329
          new StructMetaData(TType.STRUCT, User.class)));
-
 
7330
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
-
 
7331
          new FieldValueMetaData(TType.STRUCT)));
-
 
7332
    }});
-
 
7333
 
-
 
7334
    static {
-
 
7335
      FieldMetaData.addStructMetaDataMap(getUserByMobileNumber_result.class, metaDataMap);
-
 
7336
    }
-
 
7337
 
-
 
7338
    public getUserByMobileNumber_result() {
-
 
7339
    }
-
 
7340
 
-
 
7341
    public getUserByMobileNumber_result(
-
 
7342
      User success,
-
 
7343
      UserContextException ucex)
-
 
7344
    {
-
 
7345
      this();
-
 
7346
      this.success = success;
-
 
7347
      this.ucex = ucex;
-
 
7348
    }
-
 
7349
 
-
 
7350
    /**
-
 
7351
     * Performs a deep copy on <i>other</i>.
-
 
7352
     */
-
 
7353
    public getUserByMobileNumber_result(getUserByMobileNumber_result other) {
-
 
7354
      if (other.isSetSuccess()) {
-
 
7355
        this.success = new User(other.success);
-
 
7356
      }
-
 
7357
      if (other.isSetUcex()) {
-
 
7358
        this.ucex = new UserContextException(other.ucex);
-
 
7359
      }
-
 
7360
    }
-
 
7361
 
-
 
7362
    public getUserByMobileNumber_result deepCopy() {
-
 
7363
      return new getUserByMobileNumber_result(this);
-
 
7364
    }
-
 
7365
 
-
 
7366
    @Deprecated
-
 
7367
    public getUserByMobileNumber_result clone() {
-
 
7368
      return new getUserByMobileNumber_result(this);
-
 
7369
    }
-
 
7370
 
-
 
7371
    public User getSuccess() {
-
 
7372
      return this.success;
-
 
7373
    }
-
 
7374
 
-
 
7375
    public getUserByMobileNumber_result setSuccess(User success) {
-
 
7376
      this.success = success;
-
 
7377
      return this;
-
 
7378
    }
-
 
7379
 
-
 
7380
    public void unsetSuccess() {
-
 
7381
      this.success = null;
-
 
7382
    }
-
 
7383
 
-
 
7384
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
7385
    public boolean isSetSuccess() {
-
 
7386
      return this.success != null;
-
 
7387
    }
-
 
7388
 
-
 
7389
    public void setSuccessIsSet(boolean value) {
-
 
7390
      if (!value) {
-
 
7391
        this.success = null;
-
 
7392
      }
-
 
7393
    }
-
 
7394
 
-
 
7395
    public UserContextException getUcex() {
-
 
7396
      return this.ucex;
-
 
7397
    }
-
 
7398
 
-
 
7399
    public getUserByMobileNumber_result setUcex(UserContextException ucex) {
-
 
7400
      this.ucex = ucex;
-
 
7401
      return this;
-
 
7402
    }
-
 
7403
 
-
 
7404
    public void unsetUcex() {
-
 
7405
      this.ucex = null;
-
 
7406
    }
-
 
7407
 
-
 
7408
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
-
 
7409
    public boolean isSetUcex() {
-
 
7410
      return this.ucex != null;
-
 
7411
    }
-
 
7412
 
-
 
7413
    public void setUcexIsSet(boolean value) {
-
 
7414
      if (!value) {
-
 
7415
        this.ucex = null;
-
 
7416
      }
-
 
7417
    }
-
 
7418
 
-
 
7419
    public void setFieldValue(_Fields field, Object value) {
-
 
7420
      switch (field) {
-
 
7421
      case SUCCESS:
-
 
7422
        if (value == null) {
-
 
7423
          unsetSuccess();
-
 
7424
        } else {
-
 
7425
          setSuccess((User)value);
-
 
7426
        }
-
 
7427
        break;
-
 
7428
 
-
 
7429
      case UCEX:
-
 
7430
        if (value == null) {
-
 
7431
          unsetUcex();
-
 
7432
        } else {
-
 
7433
          setUcex((UserContextException)value);
-
 
7434
        }
-
 
7435
        break;
-
 
7436
 
-
 
7437
      }
-
 
7438
    }
-
 
7439
 
-
 
7440
    public void setFieldValue(int fieldID, Object value) {
-
 
7441
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
7442
    }
-
 
7443
 
-
 
7444
    public Object getFieldValue(_Fields field) {
-
 
7445
      switch (field) {
-
 
7446
      case SUCCESS:
-
 
7447
        return getSuccess();
-
 
7448
 
-
 
7449
      case UCEX:
-
 
7450
        return getUcex();
-
 
7451
 
-
 
7452
      }
-
 
7453
      throw new IllegalStateException();
-
 
7454
    }
-
 
7455
 
-
 
7456
    public Object getFieldValue(int fieldId) {
-
 
7457
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
7458
    }
-
 
7459
 
-
 
7460
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
7461
    public boolean isSet(_Fields field) {
-
 
7462
      switch (field) {
-
 
7463
      case SUCCESS:
-
 
7464
        return isSetSuccess();
-
 
7465
      case UCEX:
-
 
7466
        return isSetUcex();
-
 
7467
      }
-
 
7468
      throw new IllegalStateException();
-
 
7469
    }
-
 
7470
 
-
 
7471
    public boolean isSet(int fieldID) {
-
 
7472
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
7473
    }
-
 
7474
 
-
 
7475
    @Override
-
 
7476
    public boolean equals(Object that) {
-
 
7477
      if (that == null)
-
 
7478
        return false;
-
 
7479
      if (that instanceof getUserByMobileNumber_result)
-
 
7480
        return this.equals((getUserByMobileNumber_result)that);
-
 
7481
      return false;
-
 
7482
    }
-
 
7483
 
-
 
7484
    public boolean equals(getUserByMobileNumber_result that) {
-
 
7485
      if (that == null)
-
 
7486
        return false;
-
 
7487
 
-
 
7488
      boolean this_present_success = true && this.isSetSuccess();
-
 
7489
      boolean that_present_success = true && that.isSetSuccess();
-
 
7490
      if (this_present_success || that_present_success) {
-
 
7491
        if (!(this_present_success && that_present_success))
-
 
7492
          return false;
-
 
7493
        if (!this.success.equals(that.success))
-
 
7494
          return false;
-
 
7495
      }
-
 
7496
 
-
 
7497
      boolean this_present_ucex = true && this.isSetUcex();
-
 
7498
      boolean that_present_ucex = true && that.isSetUcex();
-
 
7499
      if (this_present_ucex || that_present_ucex) {
-
 
7500
        if (!(this_present_ucex && that_present_ucex))
-
 
7501
          return false;
-
 
7502
        if (!this.ucex.equals(that.ucex))
-
 
7503
          return false;
-
 
7504
      }
-
 
7505
 
-
 
7506
      return true;
-
 
7507
    }
-
 
7508
 
-
 
7509
    @Override
-
 
7510
    public int hashCode() {
-
 
7511
      return 0;
-
 
7512
    }
-
 
7513
 
-
 
7514
    public int compareTo(getUserByMobileNumber_result other) {
-
 
7515
      if (!getClass().equals(other.getClass())) {
-
 
7516
        return getClass().getName().compareTo(other.getClass().getName());
-
 
7517
      }
-
 
7518
 
-
 
7519
      int lastComparison = 0;
-
 
7520
      getUserByMobileNumber_result typedOther = (getUserByMobileNumber_result)other;
-
 
7521
 
-
 
7522
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
7523
      if (lastComparison != 0) {
-
 
7524
        return lastComparison;
-
 
7525
      }
-
 
7526
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
7527
      if (lastComparison != 0) {
-
 
7528
        return lastComparison;
-
 
7529
      }
-
 
7530
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
-
 
7531
      if (lastComparison != 0) {
-
 
7532
        return lastComparison;
-
 
7533
      }
-
 
7534
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
-
 
7535
      if (lastComparison != 0) {
-
 
7536
        return lastComparison;
-
 
7537
      }
-
 
7538
      return 0;
-
 
7539
    }
-
 
7540
 
-
 
7541
    public void read(TProtocol iprot) throws TException {
-
 
7542
      TField field;
-
 
7543
      iprot.readStructBegin();
-
 
7544
      while (true)
-
 
7545
      {
-
 
7546
        field = iprot.readFieldBegin();
-
 
7547
        if (field.type == TType.STOP) { 
-
 
7548
          break;
-
 
7549
        }
-
 
7550
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
7551
        if (fieldId == null) {
-
 
7552
          TProtocolUtil.skip(iprot, field.type);
-
 
7553
        } else {
-
 
7554
          switch (fieldId) {
-
 
7555
            case SUCCESS:
-
 
7556
              if (field.type == TType.STRUCT) {
-
 
7557
                this.success = new User();
-
 
7558
                this.success.read(iprot);
-
 
7559
              } else { 
-
 
7560
                TProtocolUtil.skip(iprot, field.type);
-
 
7561
              }
-
 
7562
              break;
-
 
7563
            case UCEX:
-
 
7564
              if (field.type == TType.STRUCT) {
-
 
7565
                this.ucex = new UserContextException();
-
 
7566
                this.ucex.read(iprot);
-
 
7567
              } else { 
-
 
7568
                TProtocolUtil.skip(iprot, field.type);
-
 
7569
              }
-
 
7570
              break;
-
 
7571
          }
-
 
7572
          iprot.readFieldEnd();
-
 
7573
        }
-
 
7574
      }
-
 
7575
      iprot.readStructEnd();
-
 
7576
      validate();
-
 
7577
    }
-
 
7578
 
-
 
7579
    public void write(TProtocol oprot) throws TException {
-
 
7580
      oprot.writeStructBegin(STRUCT_DESC);
-
 
7581
 
-
 
7582
      if (this.isSetSuccess()) {
-
 
7583
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
7584
        this.success.write(oprot);
-
 
7585
        oprot.writeFieldEnd();
-
 
7586
      } else if (this.isSetUcex()) {
-
 
7587
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
-
 
7588
        this.ucex.write(oprot);
-
 
7589
        oprot.writeFieldEnd();
-
 
7590
      }
-
 
7591
      oprot.writeFieldStop();
-
 
7592
      oprot.writeStructEnd();
-
 
7593
    }
-
 
7594
 
-
 
7595
    @Override
-
 
7596
    public String toString() {
-
 
7597
      StringBuilder sb = new StringBuilder("getUserByMobileNumber_result(");
-
 
7598
      boolean first = true;
-
 
7599
 
-
 
7600
      sb.append("success:");
-
 
7601
      if (this.success == null) {
-
 
7602
        sb.append("null");
6893
      } else {
7603
      } else {
6894
        sb.append(this.success);
7604
        sb.append(this.success);
6895
      }
7605
      }
6896
      first = false;
7606
      first = false;
6897
      if (!first) sb.append(", ");
7607
      if (!first) sb.append(", ");