Subversion Repositories SmartDukaan

Rev

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

Rev 1891 Rev 2024
Line 98... Line 98...
98
     * 
98
     * 
99
     * @param role
99
     * @param role
100
     */
100
     */
101
    public List<Report> getReports(long role) throws TException;
101
    public List<Report> getReports(long role) throws TException;
102
 
102
 
-
 
103
    /**
-
 
104
     * Returns the CatalogDashboardUser struct associated with the given username and password if they match.
-
 
105
     * Throws an exception otherwise.
-
 
106
     * 
-
 
107
     * @param username
-
 
108
     * @param password
-
 
109
     */
-
 
110
    public CatalogDashboardUser authenticateCatalogUser(String username, String password) throws HelperServiceException, TException;
-
 
111
 
103
  }
112
  }
104
 
113
 
105
  public static class Client implements Iface {
114
  public static class Client implements Iface {
106
    public Client(TProtocol prot)
115
    public Client(TProtocol prot)
107
    {
116
    {
Line 762... Line 771...
762
        return result.success;
771
        return result.success;
763
      }
772
      }
764
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReports failed: unknown result");
773
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReports failed: unknown result");
765
    }
774
    }
766
 
775
 
-
 
776
    public CatalogDashboardUser authenticateCatalogUser(String username, String password) throws HelperServiceException, TException
-
 
777
    {
-
 
778
      send_authenticateCatalogUser(username, password);
-
 
779
      return recv_authenticateCatalogUser();
-
 
780
    }
-
 
781
 
-
 
782
    public void send_authenticateCatalogUser(String username, String password) throws TException
-
 
783
    {
-
 
784
      oprot_.writeMessageBegin(new TMessage("authenticateCatalogUser", TMessageType.CALL, seqid_));
-
 
785
      authenticateCatalogUser_args args = new authenticateCatalogUser_args();
-
 
786
      args.username = username;
-
 
787
      args.password = password;
-
 
788
      args.write(oprot_);
-
 
789
      oprot_.writeMessageEnd();
-
 
790
      oprot_.getTransport().flush();
-
 
791
    }
-
 
792
 
-
 
793
    public CatalogDashboardUser recv_authenticateCatalogUser() throws HelperServiceException, TException
-
 
794
    {
-
 
795
      TMessage msg = iprot_.readMessageBegin();
-
 
796
      if (msg.type == TMessageType.EXCEPTION) {
-
 
797
        TApplicationException x = TApplicationException.read(iprot_);
-
 
798
        iprot_.readMessageEnd();
-
 
799
        throw x;
-
 
800
      }
-
 
801
      authenticateCatalogUser_result result = new authenticateCatalogUser_result();
-
 
802
      result.read(iprot_);
-
 
803
      iprot_.readMessageEnd();
-
 
804
      if (result.isSetSuccess()) {
-
 
805
        return result.success;
-
 
806
      }
-
 
807
      if (result.hse != null) {
-
 
808
        throw result.hse;
-
 
809
      }
-
 
810
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateCatalogUser failed: unknown result");
-
 
811
    }
-
 
812
 
767
  }
813
  }
768
  public static class Processor implements TProcessor {
814
  public static class Processor implements TProcessor {
769
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
815
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
770
    public Processor(Iface iface)
816
    public Processor(Iface iface)
771
    {
817
    {
Line 786... Line 832...
786
      processMap_.put("updatePassword", new updatePassword());
832
      processMap_.put("updatePassword", new updatePassword());
787
      processMap_.put("authenticateLogisticsUser", new authenticateLogisticsUser());
833
      processMap_.put("authenticateLogisticsUser", new authenticateLogisticsUser());
788
      processMap_.put("authenticateStatisticsUser", new authenticateStatisticsUser());
834
      processMap_.put("authenticateStatisticsUser", new authenticateStatisticsUser());
789
      processMap_.put("authenticateReportUser", new authenticateReportUser());
835
      processMap_.put("authenticateReportUser", new authenticateReportUser());
790
      processMap_.put("getReports", new getReports());
836
      processMap_.put("getReports", new getReports());
-
 
837
      processMap_.put("authenticateCatalogUser", new authenticateCatalogUser());
791
    }
838
    }
792
 
839
 
793
    protected static interface ProcessFunction {
840
    protected static interface ProcessFunction {
794
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
841
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
795
    }
842
    }
Line 1297... Line 1344...
1297
        oprot.getTransport().flush();
1344
        oprot.getTransport().flush();
1298
      }
1345
      }
1299
 
1346
 
1300
    }
1347
    }
1301
 
1348
 
-
 
1349
    private class authenticateCatalogUser implements ProcessFunction {
-
 
1350
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
1351
      {
-
 
1352
        authenticateCatalogUser_args args = new authenticateCatalogUser_args();
-
 
1353
        args.read(iprot);
-
 
1354
        iprot.readMessageEnd();
-
 
1355
        authenticateCatalogUser_result result = new authenticateCatalogUser_result();
-
 
1356
        try {
-
 
1357
          result.success = iface_.authenticateCatalogUser(args.username, args.password);
-
 
1358
        } catch (HelperServiceException hse) {
-
 
1359
          result.hse = hse;
-
 
1360
        } catch (Throwable th) {
-
 
1361
          LOGGER.error("Internal error processing authenticateCatalogUser", th);
-
 
1362
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateCatalogUser");
-
 
1363
          oprot.writeMessageBegin(new TMessage("authenticateCatalogUser", TMessageType.EXCEPTION, seqid));
-
 
1364
          x.write(oprot);
-
 
1365
          oprot.writeMessageEnd();
-
 
1366
          oprot.getTransport().flush();
-
 
1367
          return;
-
 
1368
        }
-
 
1369
        oprot.writeMessageBegin(new TMessage("authenticateCatalogUser", TMessageType.REPLY, seqid));
-
 
1370
        result.write(oprot);
-
 
1371
        oprot.writeMessageEnd();
-
 
1372
        oprot.getTransport().flush();
-
 
1373
      }
-
 
1374
 
-
 
1375
    }
-
 
1376
 
1302
  }
1377
  }
1303
 
1378
 
1304
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1379
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1305
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1380
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1306
 
1381
 
Line 13396... Line 13471...
13396
      }
13471
      }
13397
      first = false;
13472
      first = false;
13398
      sb.append(")");
13473
      sb.append(")");
13399
      return sb.toString();
13474
      return sb.toString();
13400
    }
13475
    }
-
 
13476
 
-
 
13477
    public void validate() throws TException {
-
 
13478
      // check for required fields
-
 
13479
    }
-
 
13480
 
-
 
13481
  }
-
 
13482
 
-
 
13483
  public static class authenticateCatalogUser_args implements TBase<authenticateCatalogUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateCatalogUser_args>   {
-
 
13484
    private static final TStruct STRUCT_DESC = new TStruct("authenticateCatalogUser_args");
-
 
13485
 
-
 
13486
    private static final TField USERNAME_FIELD_DESC = new TField("username", TType.STRING, (short)1);
-
 
13487
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
-
 
13488
 
-
 
13489
    private String username;
-
 
13490
    private String password;
-
 
13491
 
-
 
13492
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
13493
    public enum _Fields implements TFieldIdEnum {
-
 
13494
      USERNAME((short)1, "username"),
-
 
13495
      PASSWORD((short)2, "password");
-
 
13496
 
-
 
13497
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
13498
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
13499
 
-
 
13500
      static {
-
 
13501
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
13502
          byId.put((int)field._thriftId, field);
-
 
13503
          byName.put(field.getFieldName(), field);
-
 
13504
        }
-
 
13505
      }
-
 
13506
 
-
 
13507
      /**
-
 
13508
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
13509
       */
-
 
13510
      public static _Fields findByThriftId(int fieldId) {
-
 
13511
        return byId.get(fieldId);
-
 
13512
      }
-
 
13513
 
-
 
13514
      /**
-
 
13515
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
13516
       * if it is not found.
-
 
13517
       */
-
 
13518
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
13519
        _Fields fields = findByThriftId(fieldId);
-
 
13520
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
13521
        return fields;
-
 
13522
      }
-
 
13523
 
-
 
13524
      /**
-
 
13525
       * Find the _Fields constant that matches name, or null if its not found.
-
 
13526
       */
-
 
13527
      public static _Fields findByName(String name) {
-
 
13528
        return byName.get(name);
-
 
13529
      }
-
 
13530
 
-
 
13531
      private final short _thriftId;
-
 
13532
      private final String _fieldName;
-
 
13533
 
-
 
13534
      _Fields(short thriftId, String fieldName) {
-
 
13535
        _thriftId = thriftId;
-
 
13536
        _fieldName = fieldName;
-
 
13537
      }
-
 
13538
 
-
 
13539
      public short getThriftFieldId() {
-
 
13540
        return _thriftId;
-
 
13541
      }
-
 
13542
 
-
 
13543
      public String getFieldName() {
-
 
13544
        return _fieldName;
-
 
13545
      }
-
 
13546
    }
-
 
13547
 
-
 
13548
    // isset id assignments
-
 
13549
 
-
 
13550
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
13551
      put(_Fields.USERNAME, new FieldMetaData("username", TFieldRequirementType.DEFAULT, 
-
 
13552
          new FieldValueMetaData(TType.STRING)));
-
 
13553
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
-
 
13554
          new FieldValueMetaData(TType.STRING)));
-
 
13555
    }});
-
 
13556
 
-
 
13557
    static {
-
 
13558
      FieldMetaData.addStructMetaDataMap(authenticateCatalogUser_args.class, metaDataMap);
-
 
13559
    }
-
 
13560
 
-
 
13561
    public authenticateCatalogUser_args() {
-
 
13562
    }
-
 
13563
 
-
 
13564
    public authenticateCatalogUser_args(
-
 
13565
      String username,
-
 
13566
      String password)
-
 
13567
    {
-
 
13568
      this();
-
 
13569
      this.username = username;
-
 
13570
      this.password = password;
-
 
13571
    }
-
 
13572
 
-
 
13573
    /**
-
 
13574
     * Performs a deep copy on <i>other</i>.
-
 
13575
     */
-
 
13576
    public authenticateCatalogUser_args(authenticateCatalogUser_args other) {
-
 
13577
      if (other.isSetUsername()) {
-
 
13578
        this.username = other.username;
-
 
13579
      }
-
 
13580
      if (other.isSetPassword()) {
-
 
13581
        this.password = other.password;
-
 
13582
      }
-
 
13583
    }
-
 
13584
 
-
 
13585
    public authenticateCatalogUser_args deepCopy() {
-
 
13586
      return new authenticateCatalogUser_args(this);
-
 
13587
    }
-
 
13588
 
-
 
13589
    @Deprecated
-
 
13590
    public authenticateCatalogUser_args clone() {
-
 
13591
      return new authenticateCatalogUser_args(this);
-
 
13592
    }
-
 
13593
 
-
 
13594
    public String getUsername() {
-
 
13595
      return this.username;
-
 
13596
    }
-
 
13597
 
-
 
13598
    public authenticateCatalogUser_args setUsername(String username) {
-
 
13599
      this.username = username;
-
 
13600
      return this;
-
 
13601
    }
-
 
13602
 
-
 
13603
    public void unsetUsername() {
-
 
13604
      this.username = null;
-
 
13605
    }
-
 
13606
 
-
 
13607
    /** Returns true if field username is set (has been asigned a value) and false otherwise */
-
 
13608
    public boolean isSetUsername() {
-
 
13609
      return this.username != null;
-
 
13610
    }
-
 
13611
 
-
 
13612
    public void setUsernameIsSet(boolean value) {
-
 
13613
      if (!value) {
-
 
13614
        this.username = null;
-
 
13615
      }
-
 
13616
    }
-
 
13617
 
-
 
13618
    public String getPassword() {
-
 
13619
      return this.password;
-
 
13620
    }
-
 
13621
 
-
 
13622
    public authenticateCatalogUser_args setPassword(String password) {
-
 
13623
      this.password = password;
-
 
13624
      return this;
-
 
13625
    }
-
 
13626
 
-
 
13627
    public void unsetPassword() {
-
 
13628
      this.password = null;
-
 
13629
    }
-
 
13630
 
-
 
13631
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
-
 
13632
    public boolean isSetPassword() {
-
 
13633
      return this.password != null;
-
 
13634
    }
-
 
13635
 
-
 
13636
    public void setPasswordIsSet(boolean value) {
-
 
13637
      if (!value) {
-
 
13638
        this.password = null;
-
 
13639
      }
-
 
13640
    }
-
 
13641
 
-
 
13642
    public void setFieldValue(_Fields field, Object value) {
-
 
13643
      switch (field) {
-
 
13644
      case USERNAME:
-
 
13645
        if (value == null) {
-
 
13646
          unsetUsername();
-
 
13647
        } else {
-
 
13648
          setUsername((String)value);
-
 
13649
        }
-
 
13650
        break;
-
 
13651
 
-
 
13652
      case PASSWORD:
-
 
13653
        if (value == null) {
-
 
13654
          unsetPassword();
-
 
13655
        } else {
-
 
13656
          setPassword((String)value);
-
 
13657
        }
-
 
13658
        break;
-
 
13659
 
-
 
13660
      }
-
 
13661
    }
-
 
13662
 
-
 
13663
    public void setFieldValue(int fieldID, Object value) {
-
 
13664
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
13665
    }
-
 
13666
 
-
 
13667
    public Object getFieldValue(_Fields field) {
-
 
13668
      switch (field) {
-
 
13669
      case USERNAME:
-
 
13670
        return getUsername();
-
 
13671
 
-
 
13672
      case PASSWORD:
-
 
13673
        return getPassword();
-
 
13674
 
-
 
13675
      }
-
 
13676
      throw new IllegalStateException();
-
 
13677
    }
-
 
13678
 
-
 
13679
    public Object getFieldValue(int fieldId) {
-
 
13680
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
13681
    }
-
 
13682
 
-
 
13683
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
13684
    public boolean isSet(_Fields field) {
-
 
13685
      switch (field) {
-
 
13686
      case USERNAME:
-
 
13687
        return isSetUsername();
-
 
13688
      case PASSWORD:
-
 
13689
        return isSetPassword();
-
 
13690
      }
-
 
13691
      throw new IllegalStateException();
-
 
13692
    }
-
 
13693
 
-
 
13694
    public boolean isSet(int fieldID) {
-
 
13695
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
13696
    }
-
 
13697
 
-
 
13698
    @Override
-
 
13699
    public boolean equals(Object that) {
-
 
13700
      if (that == null)
-
 
13701
        return false;
-
 
13702
      if (that instanceof authenticateCatalogUser_args)
-
 
13703
        return this.equals((authenticateCatalogUser_args)that);
-
 
13704
      return false;
-
 
13705
    }
-
 
13706
 
-
 
13707
    public boolean equals(authenticateCatalogUser_args that) {
-
 
13708
      if (that == null)
-
 
13709
        return false;
-
 
13710
 
-
 
13711
      boolean this_present_username = true && this.isSetUsername();
-
 
13712
      boolean that_present_username = true && that.isSetUsername();
-
 
13713
      if (this_present_username || that_present_username) {
-
 
13714
        if (!(this_present_username && that_present_username))
-
 
13715
          return false;
-
 
13716
        if (!this.username.equals(that.username))
-
 
13717
          return false;
-
 
13718
      }
-
 
13719
 
-
 
13720
      boolean this_present_password = true && this.isSetPassword();
-
 
13721
      boolean that_present_password = true && that.isSetPassword();
-
 
13722
      if (this_present_password || that_present_password) {
-
 
13723
        if (!(this_present_password && that_present_password))
-
 
13724
          return false;
-
 
13725
        if (!this.password.equals(that.password))
-
 
13726
          return false;
-
 
13727
      }
-
 
13728
 
-
 
13729
      return true;
-
 
13730
    }
-
 
13731
 
-
 
13732
    @Override
-
 
13733
    public int hashCode() {
-
 
13734
      return 0;
-
 
13735
    }
-
 
13736
 
-
 
13737
    public int compareTo(authenticateCatalogUser_args other) {
-
 
13738
      if (!getClass().equals(other.getClass())) {
-
 
13739
        return getClass().getName().compareTo(other.getClass().getName());
-
 
13740
      }
-
 
13741
 
-
 
13742
      int lastComparison = 0;
-
 
13743
      authenticateCatalogUser_args typedOther = (authenticateCatalogUser_args)other;
-
 
13744
 
-
 
13745
      lastComparison = Boolean.valueOf(isSetUsername()).compareTo(isSetUsername());
-
 
13746
      if (lastComparison != 0) {
-
 
13747
        return lastComparison;
-
 
13748
      }
-
 
13749
      lastComparison = TBaseHelper.compareTo(username, typedOther.username);
-
 
13750
      if (lastComparison != 0) {
-
 
13751
        return lastComparison;
-
 
13752
      }
-
 
13753
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
-
 
13754
      if (lastComparison != 0) {
-
 
13755
        return lastComparison;
-
 
13756
      }
-
 
13757
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
-
 
13758
      if (lastComparison != 0) {
-
 
13759
        return lastComparison;
-
 
13760
      }
-
 
13761
      return 0;
-
 
13762
    }
-
 
13763
 
-
 
13764
    public void read(TProtocol iprot) throws TException {
-
 
13765
      TField field;
-
 
13766
      iprot.readStructBegin();
-
 
13767
      while (true)
-
 
13768
      {
-
 
13769
        field = iprot.readFieldBegin();
-
 
13770
        if (field.type == TType.STOP) { 
-
 
13771
          break;
-
 
13772
        }
-
 
13773
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
13774
        if (fieldId == null) {
-
 
13775
          TProtocolUtil.skip(iprot, field.type);
-
 
13776
        } else {
-
 
13777
          switch (fieldId) {
-
 
13778
            case USERNAME:
-
 
13779
              if (field.type == TType.STRING) {
-
 
13780
                this.username = iprot.readString();
-
 
13781
              } else { 
-
 
13782
                TProtocolUtil.skip(iprot, field.type);
-
 
13783
              }
-
 
13784
              break;
-
 
13785
            case PASSWORD:
-
 
13786
              if (field.type == TType.STRING) {
-
 
13787
                this.password = iprot.readString();
-
 
13788
              } else { 
-
 
13789
                TProtocolUtil.skip(iprot, field.type);
-
 
13790
              }
-
 
13791
              break;
-
 
13792
          }
-
 
13793
          iprot.readFieldEnd();
-
 
13794
        }
-
 
13795
      }
-
 
13796
      iprot.readStructEnd();
-
 
13797
      validate();
-
 
13798
    }
-
 
13799
 
-
 
13800
    public void write(TProtocol oprot) throws TException {
-
 
13801
      validate();
-
 
13802
 
-
 
13803
      oprot.writeStructBegin(STRUCT_DESC);
-
 
13804
      if (this.username != null) {
-
 
13805
        oprot.writeFieldBegin(USERNAME_FIELD_DESC);
-
 
13806
        oprot.writeString(this.username);
-
 
13807
        oprot.writeFieldEnd();
-
 
13808
      }
-
 
13809
      if (this.password != null) {
-
 
13810
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
-
 
13811
        oprot.writeString(this.password);
-
 
13812
        oprot.writeFieldEnd();
-
 
13813
      }
-
 
13814
      oprot.writeFieldStop();
-
 
13815
      oprot.writeStructEnd();
-
 
13816
    }
-
 
13817
 
-
 
13818
    @Override
-
 
13819
    public String toString() {
-
 
13820
      StringBuilder sb = new StringBuilder("authenticateCatalogUser_args(");
-
 
13821
      boolean first = true;
-
 
13822
 
-
 
13823
      sb.append("username:");
-
 
13824
      if (this.username == null) {
-
 
13825
        sb.append("null");
-
 
13826
      } else {
-
 
13827
        sb.append(this.username);
-
 
13828
      }
-
 
13829
      first = false;
-
 
13830
      if (!first) sb.append(", ");
-
 
13831
      sb.append("password:");
-
 
13832
      if (this.password == null) {
-
 
13833
        sb.append("null");
-
 
13834
      } else {
-
 
13835
        sb.append(this.password);
-
 
13836
      }
-
 
13837
      first = false;
-
 
13838
      sb.append(")");
-
 
13839
      return sb.toString();
-
 
13840
    }
-
 
13841
 
-
 
13842
    public void validate() throws TException {
-
 
13843
      // check for required fields
-
 
13844
    }
-
 
13845
 
-
 
13846
  }
-
 
13847
 
-
 
13848
  public static class authenticateCatalogUser_result implements TBase<authenticateCatalogUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateCatalogUser_result>   {
-
 
13849
    private static final TStruct STRUCT_DESC = new TStruct("authenticateCatalogUser_result");
-
 
13850
 
-
 
13851
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
-
 
13852
    private static final TField HSE_FIELD_DESC = new TField("hse", TType.STRUCT, (short)1);
-
 
13853
 
-
 
13854
    private CatalogDashboardUser success;
-
 
13855
    private HelperServiceException hse;
-
 
13856
 
-
 
13857
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
13858
    public enum _Fields implements TFieldIdEnum {
-
 
13859
      SUCCESS((short)0, "success"),
-
 
13860
      HSE((short)1, "hse");
-
 
13861
 
-
 
13862
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
13863
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
13864
 
-
 
13865
      static {
-
 
13866
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
13867
          byId.put((int)field._thriftId, field);
-
 
13868
          byName.put(field.getFieldName(), field);
-
 
13869
        }
-
 
13870
      }
-
 
13871
 
-
 
13872
      /**
-
 
13873
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
13874
       */
-
 
13875
      public static _Fields findByThriftId(int fieldId) {
-
 
13876
        return byId.get(fieldId);
-
 
13877
      }
-
 
13878
 
-
 
13879
      /**
-
 
13880
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
13881
       * if it is not found.
-
 
13882
       */
-
 
13883
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
13884
        _Fields fields = findByThriftId(fieldId);
-
 
13885
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
13886
        return fields;
-
 
13887
      }
-
 
13888
 
-
 
13889
      /**
-
 
13890
       * Find the _Fields constant that matches name, or null if its not found.
-
 
13891
       */
-
 
13892
      public static _Fields findByName(String name) {
-
 
13893
        return byName.get(name);
-
 
13894
      }
-
 
13895
 
-
 
13896
      private final short _thriftId;
-
 
13897
      private final String _fieldName;
-
 
13898
 
-
 
13899
      _Fields(short thriftId, String fieldName) {
-
 
13900
        _thriftId = thriftId;
-
 
13901
        _fieldName = fieldName;
-
 
13902
      }
-
 
13903
 
-
 
13904
      public short getThriftFieldId() {
-
 
13905
        return _thriftId;
-
 
13906
      }
-
 
13907
 
-
 
13908
      public String getFieldName() {
-
 
13909
        return _fieldName;
-
 
13910
      }
-
 
13911
    }
-
 
13912
 
-
 
13913
    // isset id assignments
-
 
13914
 
-
 
13915
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
13916
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
13917
          new StructMetaData(TType.STRUCT, CatalogDashboardUser.class)));
-
 
13918
      put(_Fields.HSE, new FieldMetaData("hse", TFieldRequirementType.DEFAULT, 
-
 
13919
          new FieldValueMetaData(TType.STRUCT)));
-
 
13920
    }});
-
 
13921
 
-
 
13922
    static {
-
 
13923
      FieldMetaData.addStructMetaDataMap(authenticateCatalogUser_result.class, metaDataMap);
-
 
13924
    }
-
 
13925
 
-
 
13926
    public authenticateCatalogUser_result() {
-
 
13927
    }
-
 
13928
 
-
 
13929
    public authenticateCatalogUser_result(
-
 
13930
      CatalogDashboardUser success,
-
 
13931
      HelperServiceException hse)
-
 
13932
    {
-
 
13933
      this();
-
 
13934
      this.success = success;
-
 
13935
      this.hse = hse;
-
 
13936
    }
-
 
13937
 
-
 
13938
    /**
-
 
13939
     * Performs a deep copy on <i>other</i>.
-
 
13940
     */
-
 
13941
    public authenticateCatalogUser_result(authenticateCatalogUser_result other) {
-
 
13942
      if (other.isSetSuccess()) {
-
 
13943
        this.success = new CatalogDashboardUser(other.success);
-
 
13944
      }
-
 
13945
      if (other.isSetHse()) {
-
 
13946
        this.hse = new HelperServiceException(other.hse);
-
 
13947
      }
-
 
13948
    }
-
 
13949
 
-
 
13950
    public authenticateCatalogUser_result deepCopy() {
-
 
13951
      return new authenticateCatalogUser_result(this);
-
 
13952
    }
-
 
13953
 
-
 
13954
    @Deprecated
-
 
13955
    public authenticateCatalogUser_result clone() {
-
 
13956
      return new authenticateCatalogUser_result(this);
-
 
13957
    }
-
 
13958
 
-
 
13959
    public CatalogDashboardUser getSuccess() {
-
 
13960
      return this.success;
-
 
13961
    }
-
 
13962
 
-
 
13963
    public authenticateCatalogUser_result setSuccess(CatalogDashboardUser success) {
-
 
13964
      this.success = success;
-
 
13965
      return this;
-
 
13966
    }
-
 
13967
 
-
 
13968
    public void unsetSuccess() {
-
 
13969
      this.success = null;
-
 
13970
    }
-
 
13971
 
-
 
13972
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
13973
    public boolean isSetSuccess() {
-
 
13974
      return this.success != null;
-
 
13975
    }
-
 
13976
 
-
 
13977
    public void setSuccessIsSet(boolean value) {
-
 
13978
      if (!value) {
-
 
13979
        this.success = null;
-
 
13980
      }
-
 
13981
    }
-
 
13982
 
-
 
13983
    public HelperServiceException getHse() {
-
 
13984
      return this.hse;
-
 
13985
    }
-
 
13986
 
-
 
13987
    public authenticateCatalogUser_result setHse(HelperServiceException hse) {
-
 
13988
      this.hse = hse;
-
 
13989
      return this;
-
 
13990
    }
-
 
13991
 
-
 
13992
    public void unsetHse() {
-
 
13993
      this.hse = null;
-
 
13994
    }
-
 
13995
 
-
 
13996
    /** Returns true if field hse is set (has been asigned a value) and false otherwise */
-
 
13997
    public boolean isSetHse() {
-
 
13998
      return this.hse != null;
-
 
13999
    }
-
 
14000
 
-
 
14001
    public void setHseIsSet(boolean value) {
-
 
14002
      if (!value) {
-
 
14003
        this.hse = null;
-
 
14004
      }
-
 
14005
    }
-
 
14006
 
-
 
14007
    public void setFieldValue(_Fields field, Object value) {
-
 
14008
      switch (field) {
-
 
14009
      case SUCCESS:
-
 
14010
        if (value == null) {
-
 
14011
          unsetSuccess();
-
 
14012
        } else {
-
 
14013
          setSuccess((CatalogDashboardUser)value);
-
 
14014
        }
-
 
14015
        break;
-
 
14016
 
-
 
14017
      case HSE:
-
 
14018
        if (value == null) {
-
 
14019
          unsetHse();
-
 
14020
        } else {
-
 
14021
          setHse((HelperServiceException)value);
-
 
14022
        }
-
 
14023
        break;
-
 
14024
 
-
 
14025
      }
-
 
14026
    }
-
 
14027
 
-
 
14028
    public void setFieldValue(int fieldID, Object value) {
-
 
14029
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
14030
    }
-
 
14031
 
-
 
14032
    public Object getFieldValue(_Fields field) {
-
 
14033
      switch (field) {
-
 
14034
      case SUCCESS:
-
 
14035
        return getSuccess();
-
 
14036
 
-
 
14037
      case HSE:
-
 
14038
        return getHse();
-
 
14039
 
-
 
14040
      }
-
 
14041
      throw new IllegalStateException();
-
 
14042
    }
-
 
14043
 
-
 
14044
    public Object getFieldValue(int fieldId) {
-
 
14045
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
14046
    }
-
 
14047
 
-
 
14048
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
14049
    public boolean isSet(_Fields field) {
-
 
14050
      switch (field) {
-
 
14051
      case SUCCESS:
-
 
14052
        return isSetSuccess();
-
 
14053
      case HSE:
-
 
14054
        return isSetHse();
-
 
14055
      }
-
 
14056
      throw new IllegalStateException();
-
 
14057
    }
-
 
14058
 
-
 
14059
    public boolean isSet(int fieldID) {
-
 
14060
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
14061
    }
-
 
14062
 
-
 
14063
    @Override
-
 
14064
    public boolean equals(Object that) {
-
 
14065
      if (that == null)
-
 
14066
        return false;
-
 
14067
      if (that instanceof authenticateCatalogUser_result)
-
 
14068
        return this.equals((authenticateCatalogUser_result)that);
-
 
14069
      return false;
-
 
14070
    }
-
 
14071
 
-
 
14072
    public boolean equals(authenticateCatalogUser_result that) {
-
 
14073
      if (that == null)
-
 
14074
        return false;
-
 
14075
 
-
 
14076
      boolean this_present_success = true && this.isSetSuccess();
-
 
14077
      boolean that_present_success = true && that.isSetSuccess();
-
 
14078
      if (this_present_success || that_present_success) {
-
 
14079
        if (!(this_present_success && that_present_success))
-
 
14080
          return false;
-
 
14081
        if (!this.success.equals(that.success))
-
 
14082
          return false;
-
 
14083
      }
-
 
14084
 
-
 
14085
      boolean this_present_hse = true && this.isSetHse();
-
 
14086
      boolean that_present_hse = true && that.isSetHse();
-
 
14087
      if (this_present_hse || that_present_hse) {
-
 
14088
        if (!(this_present_hse && that_present_hse))
-
 
14089
          return false;
-
 
14090
        if (!this.hse.equals(that.hse))
-
 
14091
          return false;
-
 
14092
      }
-
 
14093
 
-
 
14094
      return true;
-
 
14095
    }
-
 
14096
 
-
 
14097
    @Override
-
 
14098
    public int hashCode() {
-
 
14099
      return 0;
-
 
14100
    }
-
 
14101
 
-
 
14102
    public int compareTo(authenticateCatalogUser_result other) {
-
 
14103
      if (!getClass().equals(other.getClass())) {
-
 
14104
        return getClass().getName().compareTo(other.getClass().getName());
-
 
14105
      }
-
 
14106
 
-
 
14107
      int lastComparison = 0;
-
 
14108
      authenticateCatalogUser_result typedOther = (authenticateCatalogUser_result)other;
-
 
14109
 
-
 
14110
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
14111
      if (lastComparison != 0) {
-
 
14112
        return lastComparison;
-
 
14113
      }
-
 
14114
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
14115
      if (lastComparison != 0) {
-
 
14116
        return lastComparison;
-
 
14117
      }
-
 
14118
      lastComparison = Boolean.valueOf(isSetHse()).compareTo(isSetHse());
-
 
14119
      if (lastComparison != 0) {
-
 
14120
        return lastComparison;
-
 
14121
      }
-
 
14122
      lastComparison = TBaseHelper.compareTo(hse, typedOther.hse);
-
 
14123
      if (lastComparison != 0) {
-
 
14124
        return lastComparison;
-
 
14125
      }
-
 
14126
      return 0;
-
 
14127
    }
-
 
14128
 
-
 
14129
    public void read(TProtocol iprot) throws TException {
-
 
14130
      TField field;
-
 
14131
      iprot.readStructBegin();
-
 
14132
      while (true)
-
 
14133
      {
-
 
14134
        field = iprot.readFieldBegin();
-
 
14135
        if (field.type == TType.STOP) { 
-
 
14136
          break;
-
 
14137
        }
-
 
14138
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
14139
        if (fieldId == null) {
-
 
14140
          TProtocolUtil.skip(iprot, field.type);
-
 
14141
        } else {
-
 
14142
          switch (fieldId) {
-
 
14143
            case SUCCESS:
-
 
14144
              if (field.type == TType.STRUCT) {
-
 
14145
                this.success = new CatalogDashboardUser();
-
 
14146
                this.success.read(iprot);
-
 
14147
              } else { 
-
 
14148
                TProtocolUtil.skip(iprot, field.type);
-
 
14149
              }
-
 
14150
              break;
-
 
14151
            case HSE:
-
 
14152
              if (field.type == TType.STRUCT) {
-
 
14153
                this.hse = new HelperServiceException();
-
 
14154
                this.hse.read(iprot);
-
 
14155
              } else { 
-
 
14156
                TProtocolUtil.skip(iprot, field.type);
-
 
14157
              }
-
 
14158
              break;
-
 
14159
          }
-
 
14160
          iprot.readFieldEnd();
-
 
14161
        }
-
 
14162
      }
-
 
14163
      iprot.readStructEnd();
-
 
14164
      validate();
-
 
14165
    }
-
 
14166
 
-
 
14167
    public void write(TProtocol oprot) throws TException {
-
 
14168
      oprot.writeStructBegin(STRUCT_DESC);
-
 
14169
 
-
 
14170
      if (this.isSetSuccess()) {
-
 
14171
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
14172
        this.success.write(oprot);
-
 
14173
        oprot.writeFieldEnd();
-
 
14174
      } else if (this.isSetHse()) {
-
 
14175
        oprot.writeFieldBegin(HSE_FIELD_DESC);
-
 
14176
        this.hse.write(oprot);
-
 
14177
        oprot.writeFieldEnd();
-
 
14178
      }
-
 
14179
      oprot.writeFieldStop();
-
 
14180
      oprot.writeStructEnd();
-
 
14181
    }
-
 
14182
 
-
 
14183
    @Override
-
 
14184
    public String toString() {
-
 
14185
      StringBuilder sb = new StringBuilder("authenticateCatalogUser_result(");
-
 
14186
      boolean first = true;
-
 
14187
 
-
 
14188
      sb.append("success:");
-
 
14189
      if (this.success == null) {
-
 
14190
        sb.append("null");
-
 
14191
      } else {
-
 
14192
        sb.append(this.success);
-
 
14193
      }
-
 
14194
      first = false;
-
 
14195
      if (!first) sb.append(", ");
-
 
14196
      sb.append("hse:");
-
 
14197
      if (this.hse == null) {
-
 
14198
        sb.append("null");
-
 
14199
      } else {
-
 
14200
        sb.append(this.hse);
-
 
14201
      }
-
 
14202
      first = false;
-
 
14203
      sb.append(")");
-
 
14204
      return sb.toString();
-
 
14205
    }
13401
 
14206
 
13402
    public void validate() throws TException {
14207
    public void validate() throws TException {
13403
      // check for required fields
14208
      // check for required fields
13404
    }
14209
    }
13405
 
14210