Subversion Repositories SmartDukaan

Rev

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

Rev 1422 Rev 1611
Line 73... Line 73...
73
     * @param username
73
     * @param username
74
     * @param password
74
     * @param password
75
     */
75
     */
76
    public LogisticsUser authenticateLogisticsUser(String username, String password) throws HelperServiceException, TException;
76
    public LogisticsUser authenticateLogisticsUser(String username, String password) throws HelperServiceException, TException;
77
 
77
 
-
 
78
    /**
-
 
79
     * Returns the StatisticsUser struct associated with the given username and password if they match.
-
 
80
     * Throws an exception otherwise.
-
 
81
     * 
-
 
82
     * @param username
-
 
83
     * @param password
-
 
84
     */
-
 
85
    public StatisticsUser authenticateStatisticsUser(String username, String password) throws HelperServiceException, TException;
-
 
86
 
78
  }
87
  }
79
 
88
 
80
  public static class Client implements Iface {
89
  public static class Client implements Iface {
81
    public Client(TProtocol prot)
90
    public Client(TProtocol prot)
82
    {
91
    {
Line 630... Line 639...
630
        throw result.hse;
639
        throw result.hse;
631
      }
640
      }
632
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateLogisticsUser failed: unknown result");
641
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateLogisticsUser failed: unknown result");
633
    }
642
    }
634
 
643
 
-
 
644
    public StatisticsUser authenticateStatisticsUser(String username, String password) throws HelperServiceException, TException
-
 
645
    {
-
 
646
      send_authenticateStatisticsUser(username, password);
-
 
647
      return recv_authenticateStatisticsUser();
-
 
648
    }
-
 
649
 
-
 
650
    public void send_authenticateStatisticsUser(String username, String password) throws TException
-
 
651
    {
-
 
652
      oprot_.writeMessageBegin(new TMessage("authenticateStatisticsUser", TMessageType.CALL, seqid_));
-
 
653
      authenticateStatisticsUser_args args = new authenticateStatisticsUser_args();
-
 
654
      args.username = username;
-
 
655
      args.password = password;
-
 
656
      args.write(oprot_);
-
 
657
      oprot_.writeMessageEnd();
-
 
658
      oprot_.getTransport().flush();
-
 
659
    }
-
 
660
 
-
 
661
    public StatisticsUser recv_authenticateStatisticsUser() throws HelperServiceException, TException
-
 
662
    {
-
 
663
      TMessage msg = iprot_.readMessageBegin();
-
 
664
      if (msg.type == TMessageType.EXCEPTION) {
-
 
665
        TApplicationException x = TApplicationException.read(iprot_);
-
 
666
        iprot_.readMessageEnd();
-
 
667
        throw x;
-
 
668
      }
-
 
669
      authenticateStatisticsUser_result result = new authenticateStatisticsUser_result();
-
 
670
      result.read(iprot_);
-
 
671
      iprot_.readMessageEnd();
-
 
672
      if (result.isSetSuccess()) {
-
 
673
        return result.success;
-
 
674
      }
-
 
675
      if (result.hse != null) {
-
 
676
        throw result.hse;
-
 
677
      }
-
 
678
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateStatisticsUser failed: unknown result");
-
 
679
    }
-
 
680
 
635
  }
681
  }
636
  public static class Processor implements TProcessor {
682
  public static class Processor implements TProcessor {
637
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
683
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
638
    public Processor(Iface iface)
684
    public Processor(Iface iface)
639
    {
685
    {
Line 651... Line 697...
651
      processMap_.put("addUser", new addUser());
697
      processMap_.put("addUser", new addUser());
652
      processMap_.put("deleteUser", new deleteUser());
698
      processMap_.put("deleteUser", new deleteUser());
653
      processMap_.put("authenticateUser", new authenticateUser());
699
      processMap_.put("authenticateUser", new authenticateUser());
654
      processMap_.put("updatePassword", new updatePassword());
700
      processMap_.put("updatePassword", new updatePassword());
655
      processMap_.put("authenticateLogisticsUser", new authenticateLogisticsUser());
701
      processMap_.put("authenticateLogisticsUser", new authenticateLogisticsUser());
-
 
702
      processMap_.put("authenticateStatisticsUser", new authenticateStatisticsUser());
656
    }
703
    }
657
 
704
 
658
    protected static interface ProcessFunction {
705
    protected static interface ProcessFunction {
659
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
706
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
660
    }
707
    }
Line 1090... Line 1137...
1090
        oprot.getTransport().flush();
1137
        oprot.getTransport().flush();
1091
      }
1138
      }
1092
 
1139
 
1093
    }
1140
    }
1094
 
1141
 
-
 
1142
    private class authenticateStatisticsUser implements ProcessFunction {
-
 
1143
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
1144
      {
-
 
1145
        authenticateStatisticsUser_args args = new authenticateStatisticsUser_args();
-
 
1146
        args.read(iprot);
-
 
1147
        iprot.readMessageEnd();
-
 
1148
        authenticateStatisticsUser_result result = new authenticateStatisticsUser_result();
-
 
1149
        try {
-
 
1150
          result.success = iface_.authenticateStatisticsUser(args.username, args.password);
-
 
1151
        } catch (HelperServiceException hse) {
-
 
1152
          result.hse = hse;
-
 
1153
        } catch (Throwable th) {
-
 
1154
          LOGGER.error("Internal error processing authenticateStatisticsUser", th);
-
 
1155
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateStatisticsUser");
-
 
1156
          oprot.writeMessageBegin(new TMessage("authenticateStatisticsUser", TMessageType.EXCEPTION, seqid));
-
 
1157
          x.write(oprot);
-
 
1158
          oprot.writeMessageEnd();
-
 
1159
          oprot.getTransport().flush();
-
 
1160
          return;
-
 
1161
        }
-
 
1162
        oprot.writeMessageBegin(new TMessage("authenticateStatisticsUser", TMessageType.REPLY, seqid));
-
 
1163
        result.write(oprot);
-
 
1164
        oprot.writeMessageEnd();
-
 
1165
        oprot.getTransport().flush();
-
 
1166
      }
-
 
1167
 
-
 
1168
    }
-
 
1169
 
1095
  }
1170
  }
1096
 
1171
 
1097
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1172
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1098
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1173
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1099
 
1174
 
Line 11118... Line 11193...
11118
      boolean first = true;
11193
      boolean first = true;
11119
 
11194
 
11120
      sb.append("success:");
11195
      sb.append("success:");
11121
      if (this.success == null) {
11196
      if (this.success == null) {
11122
        sb.append("null");
11197
        sb.append("null");
-
 
11198
      } else {
-
 
11199
        sb.append(this.success);
-
 
11200
      }
-
 
11201
      first = false;
-
 
11202
      if (!first) sb.append(", ");
-
 
11203
      sb.append("hse:");
-
 
11204
      if (this.hse == null) {
-
 
11205
        sb.append("null");
-
 
11206
      } else {
-
 
11207
        sb.append(this.hse);
-
 
11208
      }
-
 
11209
      first = false;
-
 
11210
      sb.append(")");
-
 
11211
      return sb.toString();
-
 
11212
    }
-
 
11213
 
-
 
11214
    public void validate() throws TException {
-
 
11215
      // check for required fields
-
 
11216
    }
-
 
11217
 
-
 
11218
  }
-
 
11219
 
-
 
11220
  public static class authenticateStatisticsUser_args implements TBase<authenticateStatisticsUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateStatisticsUser_args>   {
-
 
11221
    private static final TStruct STRUCT_DESC = new TStruct("authenticateStatisticsUser_args");
-
 
11222
 
-
 
11223
    private static final TField USERNAME_FIELD_DESC = new TField("username", TType.STRING, (short)1);
-
 
11224
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
-
 
11225
 
-
 
11226
    private String username;
-
 
11227
    private String password;
-
 
11228
 
-
 
11229
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
11230
    public enum _Fields implements TFieldIdEnum {
-
 
11231
      USERNAME((short)1, "username"),
-
 
11232
      PASSWORD((short)2, "password");
-
 
11233
 
-
 
11234
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
11235
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
11236
 
-
 
11237
      static {
-
 
11238
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
11239
          byId.put((int)field._thriftId, field);
-
 
11240
          byName.put(field.getFieldName(), field);
-
 
11241
        }
-
 
11242
      }
-
 
11243
 
-
 
11244
      /**
-
 
11245
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
11246
       */
-
 
11247
      public static _Fields findByThriftId(int fieldId) {
-
 
11248
        return byId.get(fieldId);
-
 
11249
      }
-
 
11250
 
-
 
11251
      /**
-
 
11252
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
11253
       * if it is not found.
-
 
11254
       */
-
 
11255
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
11256
        _Fields fields = findByThriftId(fieldId);
-
 
11257
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
11258
        return fields;
-
 
11259
      }
-
 
11260
 
-
 
11261
      /**
-
 
11262
       * Find the _Fields constant that matches name, or null if its not found.
-
 
11263
       */
-
 
11264
      public static _Fields findByName(String name) {
-
 
11265
        return byName.get(name);
-
 
11266
      }
-
 
11267
 
-
 
11268
      private final short _thriftId;
-
 
11269
      private final String _fieldName;
-
 
11270
 
-
 
11271
      _Fields(short thriftId, String fieldName) {
-
 
11272
        _thriftId = thriftId;
-
 
11273
        _fieldName = fieldName;
-
 
11274
      }
-
 
11275
 
-
 
11276
      public short getThriftFieldId() {
-
 
11277
        return _thriftId;
-
 
11278
      }
-
 
11279
 
-
 
11280
      public String getFieldName() {
-
 
11281
        return _fieldName;
-
 
11282
      }
-
 
11283
    }
-
 
11284
 
-
 
11285
    // isset id assignments
-
 
11286
 
-
 
11287
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
11288
      put(_Fields.USERNAME, new FieldMetaData("username", TFieldRequirementType.DEFAULT, 
-
 
11289
          new FieldValueMetaData(TType.STRING)));
-
 
11290
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
-
 
11291
          new FieldValueMetaData(TType.STRING)));
-
 
11292
    }});
-
 
11293
 
-
 
11294
    static {
-
 
11295
      FieldMetaData.addStructMetaDataMap(authenticateStatisticsUser_args.class, metaDataMap);
-
 
11296
    }
-
 
11297
 
-
 
11298
    public authenticateStatisticsUser_args() {
-
 
11299
    }
-
 
11300
 
-
 
11301
    public authenticateStatisticsUser_args(
-
 
11302
      String username,
-
 
11303
      String password)
-
 
11304
    {
-
 
11305
      this();
-
 
11306
      this.username = username;
-
 
11307
      this.password = password;
-
 
11308
    }
-
 
11309
 
-
 
11310
    /**
-
 
11311
     * Performs a deep copy on <i>other</i>.
-
 
11312
     */
-
 
11313
    public authenticateStatisticsUser_args(authenticateStatisticsUser_args other) {
-
 
11314
      if (other.isSetUsername()) {
-
 
11315
        this.username = other.username;
-
 
11316
      }
-
 
11317
      if (other.isSetPassword()) {
-
 
11318
        this.password = other.password;
-
 
11319
      }
-
 
11320
    }
-
 
11321
 
-
 
11322
    public authenticateStatisticsUser_args deepCopy() {
-
 
11323
      return new authenticateStatisticsUser_args(this);
-
 
11324
    }
-
 
11325
 
-
 
11326
    @Deprecated
-
 
11327
    public authenticateStatisticsUser_args clone() {
-
 
11328
      return new authenticateStatisticsUser_args(this);
-
 
11329
    }
-
 
11330
 
-
 
11331
    public String getUsername() {
-
 
11332
      return this.username;
-
 
11333
    }
-
 
11334
 
-
 
11335
    public authenticateStatisticsUser_args setUsername(String username) {
-
 
11336
      this.username = username;
-
 
11337
      return this;
-
 
11338
    }
-
 
11339
 
-
 
11340
    public void unsetUsername() {
-
 
11341
      this.username = null;
-
 
11342
    }
-
 
11343
 
-
 
11344
    /** Returns true if field username is set (has been asigned a value) and false otherwise */
-
 
11345
    public boolean isSetUsername() {
-
 
11346
      return this.username != null;
-
 
11347
    }
-
 
11348
 
-
 
11349
    public void setUsernameIsSet(boolean value) {
-
 
11350
      if (!value) {
-
 
11351
        this.username = null;
-
 
11352
      }
-
 
11353
    }
-
 
11354
 
-
 
11355
    public String getPassword() {
-
 
11356
      return this.password;
-
 
11357
    }
-
 
11358
 
-
 
11359
    public authenticateStatisticsUser_args setPassword(String password) {
-
 
11360
      this.password = password;
-
 
11361
      return this;
-
 
11362
    }
-
 
11363
 
-
 
11364
    public void unsetPassword() {
-
 
11365
      this.password = null;
-
 
11366
    }
-
 
11367
 
-
 
11368
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
-
 
11369
    public boolean isSetPassword() {
-
 
11370
      return this.password != null;
-
 
11371
    }
-
 
11372
 
-
 
11373
    public void setPasswordIsSet(boolean value) {
-
 
11374
      if (!value) {
-
 
11375
        this.password = null;
-
 
11376
      }
-
 
11377
    }
-
 
11378
 
-
 
11379
    public void setFieldValue(_Fields field, Object value) {
-
 
11380
      switch (field) {
-
 
11381
      case USERNAME:
-
 
11382
        if (value == null) {
-
 
11383
          unsetUsername();
-
 
11384
        } else {
-
 
11385
          setUsername((String)value);
-
 
11386
        }
-
 
11387
        break;
-
 
11388
 
-
 
11389
      case PASSWORD:
-
 
11390
        if (value == null) {
-
 
11391
          unsetPassword();
-
 
11392
        } else {
-
 
11393
          setPassword((String)value);
-
 
11394
        }
-
 
11395
        break;
-
 
11396
 
-
 
11397
      }
-
 
11398
    }
-
 
11399
 
-
 
11400
    public void setFieldValue(int fieldID, Object value) {
-
 
11401
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
11402
    }
-
 
11403
 
-
 
11404
    public Object getFieldValue(_Fields field) {
-
 
11405
      switch (field) {
-
 
11406
      case USERNAME:
-
 
11407
        return getUsername();
-
 
11408
 
-
 
11409
      case PASSWORD:
-
 
11410
        return getPassword();
-
 
11411
 
-
 
11412
      }
-
 
11413
      throw new IllegalStateException();
-
 
11414
    }
-
 
11415
 
-
 
11416
    public Object getFieldValue(int fieldId) {
-
 
11417
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
11418
    }
-
 
11419
 
-
 
11420
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
11421
    public boolean isSet(_Fields field) {
-
 
11422
      switch (field) {
-
 
11423
      case USERNAME:
-
 
11424
        return isSetUsername();
-
 
11425
      case PASSWORD:
-
 
11426
        return isSetPassword();
-
 
11427
      }
-
 
11428
      throw new IllegalStateException();
-
 
11429
    }
-
 
11430
 
-
 
11431
    public boolean isSet(int fieldID) {
-
 
11432
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
11433
    }
-
 
11434
 
-
 
11435
    @Override
-
 
11436
    public boolean equals(Object that) {
-
 
11437
      if (that == null)
-
 
11438
        return false;
-
 
11439
      if (that instanceof authenticateStatisticsUser_args)
-
 
11440
        return this.equals((authenticateStatisticsUser_args)that);
-
 
11441
      return false;
-
 
11442
    }
-
 
11443
 
-
 
11444
    public boolean equals(authenticateStatisticsUser_args that) {
-
 
11445
      if (that == null)
-
 
11446
        return false;
-
 
11447
 
-
 
11448
      boolean this_present_username = true && this.isSetUsername();
-
 
11449
      boolean that_present_username = true && that.isSetUsername();
-
 
11450
      if (this_present_username || that_present_username) {
-
 
11451
        if (!(this_present_username && that_present_username))
-
 
11452
          return false;
-
 
11453
        if (!this.username.equals(that.username))
-
 
11454
          return false;
-
 
11455
      }
-
 
11456
 
-
 
11457
      boolean this_present_password = true && this.isSetPassword();
-
 
11458
      boolean that_present_password = true && that.isSetPassword();
-
 
11459
      if (this_present_password || that_present_password) {
-
 
11460
        if (!(this_present_password && that_present_password))
-
 
11461
          return false;
-
 
11462
        if (!this.password.equals(that.password))
-
 
11463
          return false;
-
 
11464
      }
-
 
11465
 
-
 
11466
      return true;
-
 
11467
    }
-
 
11468
 
-
 
11469
    @Override
-
 
11470
    public int hashCode() {
-
 
11471
      return 0;
-
 
11472
    }
-
 
11473
 
-
 
11474
    public int compareTo(authenticateStatisticsUser_args other) {
-
 
11475
      if (!getClass().equals(other.getClass())) {
-
 
11476
        return getClass().getName().compareTo(other.getClass().getName());
-
 
11477
      }
-
 
11478
 
-
 
11479
      int lastComparison = 0;
-
 
11480
      authenticateStatisticsUser_args typedOther = (authenticateStatisticsUser_args)other;
-
 
11481
 
-
 
11482
      lastComparison = Boolean.valueOf(isSetUsername()).compareTo(isSetUsername());
-
 
11483
      if (lastComparison != 0) {
-
 
11484
        return lastComparison;
-
 
11485
      }
-
 
11486
      lastComparison = TBaseHelper.compareTo(username, typedOther.username);
-
 
11487
      if (lastComparison != 0) {
-
 
11488
        return lastComparison;
-
 
11489
      }
-
 
11490
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
-
 
11491
      if (lastComparison != 0) {
-
 
11492
        return lastComparison;
-
 
11493
      }
-
 
11494
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
-
 
11495
      if (lastComparison != 0) {
-
 
11496
        return lastComparison;
-
 
11497
      }
-
 
11498
      return 0;
-
 
11499
    }
-
 
11500
 
-
 
11501
    public void read(TProtocol iprot) throws TException {
-
 
11502
      TField field;
-
 
11503
      iprot.readStructBegin();
-
 
11504
      while (true)
-
 
11505
      {
-
 
11506
        field = iprot.readFieldBegin();
-
 
11507
        if (field.type == TType.STOP) { 
-
 
11508
          break;
-
 
11509
        }
-
 
11510
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
11511
        if (fieldId == null) {
-
 
11512
          TProtocolUtil.skip(iprot, field.type);
-
 
11513
        } else {
-
 
11514
          switch (fieldId) {
-
 
11515
            case USERNAME:
-
 
11516
              if (field.type == TType.STRING) {
-
 
11517
                this.username = iprot.readString();
-
 
11518
              } else { 
-
 
11519
                TProtocolUtil.skip(iprot, field.type);
-
 
11520
              }
-
 
11521
              break;
-
 
11522
            case PASSWORD:
-
 
11523
              if (field.type == TType.STRING) {
-
 
11524
                this.password = iprot.readString();
-
 
11525
              } else { 
-
 
11526
                TProtocolUtil.skip(iprot, field.type);
-
 
11527
              }
-
 
11528
              break;
-
 
11529
          }
-
 
11530
          iprot.readFieldEnd();
-
 
11531
        }
-
 
11532
      }
-
 
11533
      iprot.readStructEnd();
-
 
11534
      validate();
-
 
11535
    }
-
 
11536
 
-
 
11537
    public void write(TProtocol oprot) throws TException {
-
 
11538
      validate();
-
 
11539
 
-
 
11540
      oprot.writeStructBegin(STRUCT_DESC);
-
 
11541
      if (this.username != null) {
-
 
11542
        oprot.writeFieldBegin(USERNAME_FIELD_DESC);
-
 
11543
        oprot.writeString(this.username);
-
 
11544
        oprot.writeFieldEnd();
-
 
11545
      }
-
 
11546
      if (this.password != null) {
-
 
11547
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
-
 
11548
        oprot.writeString(this.password);
-
 
11549
        oprot.writeFieldEnd();
-
 
11550
      }
-
 
11551
      oprot.writeFieldStop();
-
 
11552
      oprot.writeStructEnd();
-
 
11553
    }
-
 
11554
 
-
 
11555
    @Override
-
 
11556
    public String toString() {
-
 
11557
      StringBuilder sb = new StringBuilder("authenticateStatisticsUser_args(");
-
 
11558
      boolean first = true;
-
 
11559
 
-
 
11560
      sb.append("username:");
-
 
11561
      if (this.username == null) {
-
 
11562
        sb.append("null");
-
 
11563
      } else {
-
 
11564
        sb.append(this.username);
-
 
11565
      }
-
 
11566
      first = false;
-
 
11567
      if (!first) sb.append(", ");
-
 
11568
      sb.append("password:");
-
 
11569
      if (this.password == null) {
-
 
11570
        sb.append("null");
-
 
11571
      } else {
-
 
11572
        sb.append(this.password);
-
 
11573
      }
-
 
11574
      first = false;
-
 
11575
      sb.append(")");
-
 
11576
      return sb.toString();
-
 
11577
    }
-
 
11578
 
-
 
11579
    public void validate() throws TException {
-
 
11580
      // check for required fields
-
 
11581
    }
-
 
11582
 
-
 
11583
  }
-
 
11584
 
-
 
11585
  public static class authenticateStatisticsUser_result implements TBase<authenticateStatisticsUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateStatisticsUser_result>   {
-
 
11586
    private static final TStruct STRUCT_DESC = new TStruct("authenticateStatisticsUser_result");
-
 
11587
 
-
 
11588
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
-
 
11589
    private static final TField HSE_FIELD_DESC = new TField("hse", TType.STRUCT, (short)1);
-
 
11590
 
-
 
11591
    private StatisticsUser success;
-
 
11592
    private HelperServiceException hse;
-
 
11593
 
-
 
11594
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
11595
    public enum _Fields implements TFieldIdEnum {
-
 
11596
      SUCCESS((short)0, "success"),
-
 
11597
      HSE((short)1, "hse");
-
 
11598
 
-
 
11599
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
11600
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
11601
 
-
 
11602
      static {
-
 
11603
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
11604
          byId.put((int)field._thriftId, field);
-
 
11605
          byName.put(field.getFieldName(), field);
-
 
11606
        }
-
 
11607
      }
-
 
11608
 
-
 
11609
      /**
-
 
11610
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
11611
       */
-
 
11612
      public static _Fields findByThriftId(int fieldId) {
-
 
11613
        return byId.get(fieldId);
-
 
11614
      }
-
 
11615
 
-
 
11616
      /**
-
 
11617
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
11618
       * if it is not found.
-
 
11619
       */
-
 
11620
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
11621
        _Fields fields = findByThriftId(fieldId);
-
 
11622
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
11623
        return fields;
-
 
11624
      }
-
 
11625
 
-
 
11626
      /**
-
 
11627
       * Find the _Fields constant that matches name, or null if its not found.
-
 
11628
       */
-
 
11629
      public static _Fields findByName(String name) {
-
 
11630
        return byName.get(name);
-
 
11631
      }
-
 
11632
 
-
 
11633
      private final short _thriftId;
-
 
11634
      private final String _fieldName;
-
 
11635
 
-
 
11636
      _Fields(short thriftId, String fieldName) {
-
 
11637
        _thriftId = thriftId;
-
 
11638
        _fieldName = fieldName;
-
 
11639
      }
-
 
11640
 
-
 
11641
      public short getThriftFieldId() {
-
 
11642
        return _thriftId;
-
 
11643
      }
-
 
11644
 
-
 
11645
      public String getFieldName() {
-
 
11646
        return _fieldName;
-
 
11647
      }
-
 
11648
    }
-
 
11649
 
-
 
11650
    // isset id assignments
-
 
11651
 
-
 
11652
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
11653
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
11654
          new StructMetaData(TType.STRUCT, StatisticsUser.class)));
-
 
11655
      put(_Fields.HSE, new FieldMetaData("hse", TFieldRequirementType.DEFAULT, 
-
 
11656
          new FieldValueMetaData(TType.STRUCT)));
-
 
11657
    }});
-
 
11658
 
-
 
11659
    static {
-
 
11660
      FieldMetaData.addStructMetaDataMap(authenticateStatisticsUser_result.class, metaDataMap);
-
 
11661
    }
-
 
11662
 
-
 
11663
    public authenticateStatisticsUser_result() {
-
 
11664
    }
-
 
11665
 
-
 
11666
    public authenticateStatisticsUser_result(
-
 
11667
      StatisticsUser success,
-
 
11668
      HelperServiceException hse)
-
 
11669
    {
-
 
11670
      this();
-
 
11671
      this.success = success;
-
 
11672
      this.hse = hse;
-
 
11673
    }
-
 
11674
 
-
 
11675
    /**
-
 
11676
     * Performs a deep copy on <i>other</i>.
-
 
11677
     */
-
 
11678
    public authenticateStatisticsUser_result(authenticateStatisticsUser_result other) {
-
 
11679
      if (other.isSetSuccess()) {
-
 
11680
        this.success = new StatisticsUser(other.success);
-
 
11681
      }
-
 
11682
      if (other.isSetHse()) {
-
 
11683
        this.hse = new HelperServiceException(other.hse);
-
 
11684
      }
-
 
11685
    }
-
 
11686
 
-
 
11687
    public authenticateStatisticsUser_result deepCopy() {
-
 
11688
      return new authenticateStatisticsUser_result(this);
-
 
11689
    }
-
 
11690
 
-
 
11691
    @Deprecated
-
 
11692
    public authenticateStatisticsUser_result clone() {
-
 
11693
      return new authenticateStatisticsUser_result(this);
-
 
11694
    }
-
 
11695
 
-
 
11696
    public StatisticsUser getSuccess() {
-
 
11697
      return this.success;
-
 
11698
    }
-
 
11699
 
-
 
11700
    public authenticateStatisticsUser_result setSuccess(StatisticsUser success) {
-
 
11701
      this.success = success;
-
 
11702
      return this;
-
 
11703
    }
-
 
11704
 
-
 
11705
    public void unsetSuccess() {
-
 
11706
      this.success = null;
-
 
11707
    }
-
 
11708
 
-
 
11709
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
11710
    public boolean isSetSuccess() {
-
 
11711
      return this.success != null;
-
 
11712
    }
-
 
11713
 
-
 
11714
    public void setSuccessIsSet(boolean value) {
-
 
11715
      if (!value) {
-
 
11716
        this.success = null;
-
 
11717
      }
-
 
11718
    }
-
 
11719
 
-
 
11720
    public HelperServiceException getHse() {
-
 
11721
      return this.hse;
-
 
11722
    }
-
 
11723
 
-
 
11724
    public authenticateStatisticsUser_result setHse(HelperServiceException hse) {
-
 
11725
      this.hse = hse;
-
 
11726
      return this;
-
 
11727
    }
-
 
11728
 
-
 
11729
    public void unsetHse() {
-
 
11730
      this.hse = null;
-
 
11731
    }
-
 
11732
 
-
 
11733
    /** Returns true if field hse is set (has been asigned a value) and false otherwise */
-
 
11734
    public boolean isSetHse() {
-
 
11735
      return this.hse != null;
-
 
11736
    }
-
 
11737
 
-
 
11738
    public void setHseIsSet(boolean value) {
-
 
11739
      if (!value) {
-
 
11740
        this.hse = null;
-
 
11741
      }
-
 
11742
    }
-
 
11743
 
-
 
11744
    public void setFieldValue(_Fields field, Object value) {
-
 
11745
      switch (field) {
-
 
11746
      case SUCCESS:
-
 
11747
        if (value == null) {
-
 
11748
          unsetSuccess();
-
 
11749
        } else {
-
 
11750
          setSuccess((StatisticsUser)value);
-
 
11751
        }
-
 
11752
        break;
-
 
11753
 
-
 
11754
      case HSE:
-
 
11755
        if (value == null) {
-
 
11756
          unsetHse();
-
 
11757
        } else {
-
 
11758
          setHse((HelperServiceException)value);
-
 
11759
        }
-
 
11760
        break;
-
 
11761
 
-
 
11762
      }
-
 
11763
    }
-
 
11764
 
-
 
11765
    public void setFieldValue(int fieldID, Object value) {
-
 
11766
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
11767
    }
-
 
11768
 
-
 
11769
    public Object getFieldValue(_Fields field) {
-
 
11770
      switch (field) {
-
 
11771
      case SUCCESS:
-
 
11772
        return getSuccess();
-
 
11773
 
-
 
11774
      case HSE:
-
 
11775
        return getHse();
-
 
11776
 
-
 
11777
      }
-
 
11778
      throw new IllegalStateException();
-
 
11779
    }
-
 
11780
 
-
 
11781
    public Object getFieldValue(int fieldId) {
-
 
11782
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
11783
    }
-
 
11784
 
-
 
11785
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
11786
    public boolean isSet(_Fields field) {
-
 
11787
      switch (field) {
-
 
11788
      case SUCCESS:
-
 
11789
        return isSetSuccess();
-
 
11790
      case HSE:
-
 
11791
        return isSetHse();
-
 
11792
      }
-
 
11793
      throw new IllegalStateException();
-
 
11794
    }
-
 
11795
 
-
 
11796
    public boolean isSet(int fieldID) {
-
 
11797
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
11798
    }
-
 
11799
 
-
 
11800
    @Override
-
 
11801
    public boolean equals(Object that) {
-
 
11802
      if (that == null)
-
 
11803
        return false;
-
 
11804
      if (that instanceof authenticateStatisticsUser_result)
-
 
11805
        return this.equals((authenticateStatisticsUser_result)that);
-
 
11806
      return false;
-
 
11807
    }
-
 
11808
 
-
 
11809
    public boolean equals(authenticateStatisticsUser_result that) {
-
 
11810
      if (that == null)
-
 
11811
        return false;
-
 
11812
 
-
 
11813
      boolean this_present_success = true && this.isSetSuccess();
-
 
11814
      boolean that_present_success = true && that.isSetSuccess();
-
 
11815
      if (this_present_success || that_present_success) {
-
 
11816
        if (!(this_present_success && that_present_success))
-
 
11817
          return false;
-
 
11818
        if (!this.success.equals(that.success))
-
 
11819
          return false;
-
 
11820
      }
-
 
11821
 
-
 
11822
      boolean this_present_hse = true && this.isSetHse();
-
 
11823
      boolean that_present_hse = true && that.isSetHse();
-
 
11824
      if (this_present_hse || that_present_hse) {
-
 
11825
        if (!(this_present_hse && that_present_hse))
-
 
11826
          return false;
-
 
11827
        if (!this.hse.equals(that.hse))
-
 
11828
          return false;
-
 
11829
      }
-
 
11830
 
-
 
11831
      return true;
-
 
11832
    }
-
 
11833
 
-
 
11834
    @Override
-
 
11835
    public int hashCode() {
-
 
11836
      return 0;
-
 
11837
    }
-
 
11838
 
-
 
11839
    public int compareTo(authenticateStatisticsUser_result other) {
-
 
11840
      if (!getClass().equals(other.getClass())) {
-
 
11841
        return getClass().getName().compareTo(other.getClass().getName());
-
 
11842
      }
-
 
11843
 
-
 
11844
      int lastComparison = 0;
-
 
11845
      authenticateStatisticsUser_result typedOther = (authenticateStatisticsUser_result)other;
-
 
11846
 
-
 
11847
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
11848
      if (lastComparison != 0) {
-
 
11849
        return lastComparison;
-
 
11850
      }
-
 
11851
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
11852
      if (lastComparison != 0) {
-
 
11853
        return lastComparison;
-
 
11854
      }
-
 
11855
      lastComparison = Boolean.valueOf(isSetHse()).compareTo(isSetHse());
-
 
11856
      if (lastComparison != 0) {
-
 
11857
        return lastComparison;
-
 
11858
      }
-
 
11859
      lastComparison = TBaseHelper.compareTo(hse, typedOther.hse);
-
 
11860
      if (lastComparison != 0) {
-
 
11861
        return lastComparison;
-
 
11862
      }
-
 
11863
      return 0;
-
 
11864
    }
-
 
11865
 
-
 
11866
    public void read(TProtocol iprot) throws TException {
-
 
11867
      TField field;
-
 
11868
      iprot.readStructBegin();
-
 
11869
      while (true)
-
 
11870
      {
-
 
11871
        field = iprot.readFieldBegin();
-
 
11872
        if (field.type == TType.STOP) { 
-
 
11873
          break;
-
 
11874
        }
-
 
11875
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
11876
        if (fieldId == null) {
-
 
11877
          TProtocolUtil.skip(iprot, field.type);
-
 
11878
        } else {
-
 
11879
          switch (fieldId) {
-
 
11880
            case SUCCESS:
-
 
11881
              if (field.type == TType.STRUCT) {
-
 
11882
                this.success = new StatisticsUser();
-
 
11883
                this.success.read(iprot);
-
 
11884
              } else { 
-
 
11885
                TProtocolUtil.skip(iprot, field.type);
-
 
11886
              }
-
 
11887
              break;
-
 
11888
            case HSE:
-
 
11889
              if (field.type == TType.STRUCT) {
-
 
11890
                this.hse = new HelperServiceException();
-
 
11891
                this.hse.read(iprot);
-
 
11892
              } else { 
-
 
11893
                TProtocolUtil.skip(iprot, field.type);
-
 
11894
              }
-
 
11895
              break;
-
 
11896
          }
-
 
11897
          iprot.readFieldEnd();
-
 
11898
        }
-
 
11899
      }
-
 
11900
      iprot.readStructEnd();
-
 
11901
      validate();
-
 
11902
    }
-
 
11903
 
-
 
11904
    public void write(TProtocol oprot) throws TException {
-
 
11905
      oprot.writeStructBegin(STRUCT_DESC);
-
 
11906
 
-
 
11907
      if (this.isSetSuccess()) {
-
 
11908
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
11909
        this.success.write(oprot);
-
 
11910
        oprot.writeFieldEnd();
-
 
11911
      } else if (this.isSetHse()) {
-
 
11912
        oprot.writeFieldBegin(HSE_FIELD_DESC);
-
 
11913
        this.hse.write(oprot);
-
 
11914
        oprot.writeFieldEnd();
-
 
11915
      }
-
 
11916
      oprot.writeFieldStop();
-
 
11917
      oprot.writeStructEnd();
-
 
11918
    }
-
 
11919
 
-
 
11920
    @Override
-
 
11921
    public String toString() {
-
 
11922
      StringBuilder sb = new StringBuilder("authenticateStatisticsUser_result(");
-
 
11923
      boolean first = true;
-
 
11924
 
-
 
11925
      sb.append("success:");
-
 
11926
      if (this.success == null) {
-
 
11927
        sb.append("null");
11123
      } else {
11928
      } else {
11124
        sb.append(this.success);
11929
        sb.append(this.success);
11125
      }
11930
      }
11126
      first = false;
11931
      first = false;
11127
      if (!first) sb.append(", ");
11932
      if (!first) sb.append(", ");