Subversion Repositories SmartDukaan

Rev

Rev 578 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 578 Rev 582
Line 56... Line 56...
56
 
56
 
57
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException;
57
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException;
58
 
58
 
59
    public boolean updatePassword(long userid, String password) throws UserContextException, TException;
59
    public boolean updatePassword(long userid, String password) throws UserContextException, TException;
60
 
60
 
-
 
61
    public boolean forgotPassword(String email) throws UserContextException, TException;
-
 
62
 
61
    public long createCart(long userId) throws ShoppingCartException, TException;
63
    public long createCart(long userId) throws ShoppingCartException, TException;
62
 
64
 
63
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
65
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
64
 
66
 
65
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
67
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
Line 655... Line 657...
655
        throw result.ucx;
657
        throw result.ucx;
656
      }
658
      }
657
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
659
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
658
    }
660
    }
659
 
661
 
-
 
662
    public boolean forgotPassword(String email) throws UserContextException, TException
-
 
663
    {
-
 
664
      send_forgotPassword(email);
-
 
665
      return recv_forgotPassword();
-
 
666
    }
-
 
667
 
-
 
668
    public void send_forgotPassword(String email) throws TException
-
 
669
    {
-
 
670
      oprot_.writeMessageBegin(new TMessage("forgotPassword", TMessageType.CALL, seqid_));
-
 
671
      forgotPassword_args args = new forgotPassword_args();
-
 
672
      args.email = email;
-
 
673
      args.write(oprot_);
-
 
674
      oprot_.writeMessageEnd();
-
 
675
      oprot_.getTransport().flush();
-
 
676
    }
-
 
677
 
-
 
678
    public boolean recv_forgotPassword() throws UserContextException, TException
-
 
679
    {
-
 
680
      TMessage msg = iprot_.readMessageBegin();
-
 
681
      if (msg.type == TMessageType.EXCEPTION) {
-
 
682
        TApplicationException x = TApplicationException.read(iprot_);
-
 
683
        iprot_.readMessageEnd();
-
 
684
        throw x;
-
 
685
      }
-
 
686
      forgotPassword_result result = new forgotPassword_result();
-
 
687
      result.read(iprot_);
-
 
688
      iprot_.readMessageEnd();
-
 
689
      if (result.isSetSuccess()) {
-
 
690
        return result.success;
-
 
691
      }
-
 
692
      if (result.ucx != null) {
-
 
693
        throw result.ucx;
-
 
694
      }
-
 
695
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
-
 
696
    }
-
 
697
 
660
    public long createCart(long userId) throws ShoppingCartException, TException
698
    public long createCart(long userId) throws ShoppingCartException, TException
661
    {
699
    {
662
      send_createCart(userId);
700
      send_createCart(userId);
663
      return recv_createCart();
701
      return recv_createCart();
664
    }
702
    }
Line 1693... Line 1731...
1693
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1731
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1694
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1732
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1695
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
1733
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
1696
      processMap_.put("setDefaultAddress", new setDefaultAddress());
1734
      processMap_.put("setDefaultAddress", new setDefaultAddress());
1697
      processMap_.put("updatePassword", new updatePassword());
1735
      processMap_.put("updatePassword", new updatePassword());
-
 
1736
      processMap_.put("forgotPassword", new forgotPassword());
1698
      processMap_.put("createCart", new createCart());
1737
      processMap_.put("createCart", new createCart());
1699
      processMap_.put("getCurrentCart", new getCurrentCart());
1738
      processMap_.put("getCurrentCart", new getCurrentCart());
1700
      processMap_.put("getCart", new getCart());
1739
      processMap_.put("getCart", new getCart());
1701
      processMap_.put("getCartsForUser", new getCartsForUser());
1740
      processMap_.put("getCartsForUser", new getCartsForUser());
1702
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1741
      processMap_.put("getCartsByStatus", new getCartsByStatus());
Line 2149... Line 2188...
2149
        oprot.getTransport().flush();
2188
        oprot.getTransport().flush();
2150
      }
2189
      }
2151
 
2190
 
2152
    }
2191
    }
2153
 
2192
 
-
 
2193
    private class forgotPassword implements ProcessFunction {
-
 
2194
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
2195
      {
-
 
2196
        forgotPassword_args args = new forgotPassword_args();
-
 
2197
        args.read(iprot);
-
 
2198
        iprot.readMessageEnd();
-
 
2199
        forgotPassword_result result = new forgotPassword_result();
-
 
2200
        try {
-
 
2201
          result.success = iface_.forgotPassword(args.email);
-
 
2202
          result.setSuccessIsSet(true);
-
 
2203
        } catch (UserContextException ucx) {
-
 
2204
          result.ucx = ucx;
-
 
2205
        } catch (Throwable th) {
-
 
2206
          LOGGER.error("Internal error processing forgotPassword", th);
-
 
2207
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing forgotPassword");
-
 
2208
          oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.EXCEPTION, seqid));
-
 
2209
          x.write(oprot);
-
 
2210
          oprot.writeMessageEnd();
-
 
2211
          oprot.getTransport().flush();
-
 
2212
          return;
-
 
2213
        }
-
 
2214
        oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.REPLY, seqid));
-
 
2215
        result.write(oprot);
-
 
2216
        oprot.writeMessageEnd();
-
 
2217
        oprot.getTransport().flush();
-
 
2218
      }
-
 
2219
 
-
 
2220
    }
-
 
2221
 
2154
    private class createCart implements ProcessFunction {
2222
    private class createCart implements ProcessFunction {
2155
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2223
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2156
      {
2224
      {
2157
        createCart_args args = new createCart_args();
2225
        createCart_args args = new createCart_args();
2158
        args.read(iprot);
2226
        args.read(iprot);
Line 12560... Line 12628...
12560
      boolean first = true;
12628
      boolean first = true;
12561
 
12629
 
12562
      sb.append("success:");
12630
      sb.append("success:");
12563
      sb.append(this.success);
12631
      sb.append(this.success);
12564
      first = false;
12632
      first = false;
-
 
12633
      if (!first) sb.append(", ");
-
 
12634
      sb.append("ucx:");
-
 
12635
      if (this.ucx == null) {
-
 
12636
        sb.append("null");
-
 
12637
      } else {
-
 
12638
        sb.append(this.ucx);
-
 
12639
      }
-
 
12640
      first = false;
-
 
12641
      sb.append(")");
-
 
12642
      return sb.toString();
-
 
12643
    }
-
 
12644
 
-
 
12645
    public void validate() throws TException {
-
 
12646
      // check for required fields
-
 
12647
    }
-
 
12648
 
-
 
12649
  }
-
 
12650
 
-
 
12651
  public static class forgotPassword_args implements TBase<forgotPassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_args>   {
-
 
12652
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_args");
-
 
12653
 
-
 
12654
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
-
 
12655
 
-
 
12656
    private String email;
-
 
12657
 
-
 
12658
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
12659
    public enum _Fields implements TFieldIdEnum {
-
 
12660
      EMAIL((short)1, "email");
-
 
12661
 
-
 
12662
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
12663
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
12664
 
-
 
12665
      static {
-
 
12666
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
12667
          byId.put((int)field._thriftId, field);
-
 
12668
          byName.put(field.getFieldName(), field);
-
 
12669
        }
-
 
12670
      }
-
 
12671
 
-
 
12672
      /**
-
 
12673
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
12674
       */
-
 
12675
      public static _Fields findByThriftId(int fieldId) {
-
 
12676
        return byId.get(fieldId);
-
 
12677
      }
-
 
12678
 
-
 
12679
      /**
-
 
12680
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
12681
       * if it is not found.
-
 
12682
       */
-
 
12683
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
12684
        _Fields fields = findByThriftId(fieldId);
-
 
12685
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
12686
        return fields;
-
 
12687
      }
-
 
12688
 
-
 
12689
      /**
-
 
12690
       * Find the _Fields constant that matches name, or null if its not found.
-
 
12691
       */
-
 
12692
      public static _Fields findByName(String name) {
-
 
12693
        return byName.get(name);
-
 
12694
      }
-
 
12695
 
-
 
12696
      private final short _thriftId;
-
 
12697
      private final String _fieldName;
-
 
12698
 
-
 
12699
      _Fields(short thriftId, String fieldName) {
-
 
12700
        _thriftId = thriftId;
-
 
12701
        _fieldName = fieldName;
-
 
12702
      }
-
 
12703
 
-
 
12704
      public short getThriftFieldId() {
-
 
12705
        return _thriftId;
-
 
12706
      }
-
 
12707
 
-
 
12708
      public String getFieldName() {
-
 
12709
        return _fieldName;
-
 
12710
      }
-
 
12711
    }
-
 
12712
 
-
 
12713
    // isset id assignments
-
 
12714
 
-
 
12715
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
12716
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
-
 
12717
          new FieldValueMetaData(TType.STRING)));
-
 
12718
    }});
-
 
12719
 
-
 
12720
    static {
-
 
12721
      FieldMetaData.addStructMetaDataMap(forgotPassword_args.class, metaDataMap);
-
 
12722
    }
-
 
12723
 
-
 
12724
    public forgotPassword_args() {
-
 
12725
    }
-
 
12726
 
-
 
12727
    public forgotPassword_args(
-
 
12728
      String email)
-
 
12729
    {
-
 
12730
      this();
-
 
12731
      this.email = email;
-
 
12732
    }
-
 
12733
 
-
 
12734
    /**
-
 
12735
     * Performs a deep copy on <i>other</i>.
-
 
12736
     */
-
 
12737
    public forgotPassword_args(forgotPassword_args other) {
-
 
12738
      if (other.isSetEmail()) {
-
 
12739
        this.email = other.email;
-
 
12740
      }
-
 
12741
    }
-
 
12742
 
-
 
12743
    public forgotPassword_args deepCopy() {
-
 
12744
      return new forgotPassword_args(this);
-
 
12745
    }
-
 
12746
 
-
 
12747
    @Deprecated
-
 
12748
    public forgotPassword_args clone() {
-
 
12749
      return new forgotPassword_args(this);
-
 
12750
    }
-
 
12751
 
-
 
12752
    public String getEmail() {
-
 
12753
      return this.email;
-
 
12754
    }
-
 
12755
 
-
 
12756
    public forgotPassword_args setEmail(String email) {
-
 
12757
      this.email = email;
-
 
12758
      return this;
-
 
12759
    }
-
 
12760
 
-
 
12761
    public void unsetEmail() {
-
 
12762
      this.email = null;
-
 
12763
    }
-
 
12764
 
-
 
12765
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
-
 
12766
    public boolean isSetEmail() {
-
 
12767
      return this.email != null;
-
 
12768
    }
-
 
12769
 
-
 
12770
    public void setEmailIsSet(boolean value) {
-
 
12771
      if (!value) {
-
 
12772
        this.email = null;
-
 
12773
      }
-
 
12774
    }
-
 
12775
 
-
 
12776
    public void setFieldValue(_Fields field, Object value) {
-
 
12777
      switch (field) {
-
 
12778
      case EMAIL:
-
 
12779
        if (value == null) {
-
 
12780
          unsetEmail();
-
 
12781
        } else {
-
 
12782
          setEmail((String)value);
-
 
12783
        }
-
 
12784
        break;
-
 
12785
 
-
 
12786
      }
-
 
12787
    }
-
 
12788
 
-
 
12789
    public void setFieldValue(int fieldID, Object value) {
-
 
12790
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
12791
    }
-
 
12792
 
-
 
12793
    public Object getFieldValue(_Fields field) {
-
 
12794
      switch (field) {
-
 
12795
      case EMAIL:
-
 
12796
        return getEmail();
-
 
12797
 
-
 
12798
      }
-
 
12799
      throw new IllegalStateException();
-
 
12800
    }
-
 
12801
 
-
 
12802
    public Object getFieldValue(int fieldId) {
-
 
12803
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
12804
    }
-
 
12805
 
-
 
12806
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
12807
    public boolean isSet(_Fields field) {
-
 
12808
      switch (field) {
-
 
12809
      case EMAIL:
-
 
12810
        return isSetEmail();
-
 
12811
      }
-
 
12812
      throw new IllegalStateException();
-
 
12813
    }
-
 
12814
 
-
 
12815
    public boolean isSet(int fieldID) {
-
 
12816
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
12817
    }
-
 
12818
 
-
 
12819
    @Override
-
 
12820
    public boolean equals(Object that) {
-
 
12821
      if (that == null)
-
 
12822
        return false;
-
 
12823
      if (that instanceof forgotPassword_args)
-
 
12824
        return this.equals((forgotPassword_args)that);
-
 
12825
      return false;
-
 
12826
    }
-
 
12827
 
-
 
12828
    public boolean equals(forgotPassword_args that) {
-
 
12829
      if (that == null)
-
 
12830
        return false;
-
 
12831
 
-
 
12832
      boolean this_present_email = true && this.isSetEmail();
-
 
12833
      boolean that_present_email = true && that.isSetEmail();
-
 
12834
      if (this_present_email || that_present_email) {
-
 
12835
        if (!(this_present_email && that_present_email))
-
 
12836
          return false;
-
 
12837
        if (!this.email.equals(that.email))
-
 
12838
          return false;
-
 
12839
      }
-
 
12840
 
-
 
12841
      return true;
-
 
12842
    }
-
 
12843
 
-
 
12844
    @Override
-
 
12845
    public int hashCode() {
-
 
12846
      return 0;
-
 
12847
    }
-
 
12848
 
-
 
12849
    public int compareTo(forgotPassword_args other) {
-
 
12850
      if (!getClass().equals(other.getClass())) {
-
 
12851
        return getClass().getName().compareTo(other.getClass().getName());
-
 
12852
      }
-
 
12853
 
-
 
12854
      int lastComparison = 0;
-
 
12855
      forgotPassword_args typedOther = (forgotPassword_args)other;
-
 
12856
 
-
 
12857
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
-
 
12858
      if (lastComparison != 0) {
-
 
12859
        return lastComparison;
-
 
12860
      }
-
 
12861
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
-
 
12862
      if (lastComparison != 0) {
-
 
12863
        return lastComparison;
-
 
12864
      }
-
 
12865
      return 0;
-
 
12866
    }
-
 
12867
 
-
 
12868
    public void read(TProtocol iprot) throws TException {
-
 
12869
      TField field;
-
 
12870
      iprot.readStructBegin();
-
 
12871
      while (true)
-
 
12872
      {
-
 
12873
        field = iprot.readFieldBegin();
-
 
12874
        if (field.type == TType.STOP) { 
-
 
12875
          break;
-
 
12876
        }
-
 
12877
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
12878
        if (fieldId == null) {
-
 
12879
          TProtocolUtil.skip(iprot, field.type);
-
 
12880
        } else {
-
 
12881
          switch (fieldId) {
-
 
12882
            case EMAIL:
-
 
12883
              if (field.type == TType.STRING) {
-
 
12884
                this.email = iprot.readString();
-
 
12885
              } else { 
-
 
12886
                TProtocolUtil.skip(iprot, field.type);
-
 
12887
              }
-
 
12888
              break;
-
 
12889
          }
-
 
12890
          iprot.readFieldEnd();
-
 
12891
        }
-
 
12892
      }
-
 
12893
      iprot.readStructEnd();
-
 
12894
      validate();
-
 
12895
    }
-
 
12896
 
-
 
12897
    public void write(TProtocol oprot) throws TException {
-
 
12898
      validate();
-
 
12899
 
-
 
12900
      oprot.writeStructBegin(STRUCT_DESC);
-
 
12901
      if (this.email != null) {
-
 
12902
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
-
 
12903
        oprot.writeString(this.email);
-
 
12904
        oprot.writeFieldEnd();
-
 
12905
      }
-
 
12906
      oprot.writeFieldStop();
-
 
12907
      oprot.writeStructEnd();
-
 
12908
    }
-
 
12909
 
-
 
12910
    @Override
-
 
12911
    public String toString() {
-
 
12912
      StringBuilder sb = new StringBuilder("forgotPassword_args(");
-
 
12913
      boolean first = true;
-
 
12914
 
-
 
12915
      sb.append("email:");
-
 
12916
      if (this.email == null) {
-
 
12917
        sb.append("null");
-
 
12918
      } else {
-
 
12919
        sb.append(this.email);
-
 
12920
      }
-
 
12921
      first = false;
-
 
12922
      sb.append(")");
-
 
12923
      return sb.toString();
-
 
12924
    }
-
 
12925
 
-
 
12926
    public void validate() throws TException {
-
 
12927
      // check for required fields
-
 
12928
    }
-
 
12929
 
-
 
12930
  }
-
 
12931
 
-
 
12932
  public static class forgotPassword_result implements TBase<forgotPassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_result>   {
-
 
12933
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_result");
-
 
12934
 
-
 
12935
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
-
 
12936
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
-
 
12937
 
-
 
12938
    private boolean success;
-
 
12939
    private UserContextException ucx;
-
 
12940
 
-
 
12941
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
12942
    public enum _Fields implements TFieldIdEnum {
-
 
12943
      SUCCESS((short)0, "success"),
-
 
12944
      UCX((short)1, "ucx");
-
 
12945
 
-
 
12946
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
12947
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
12948
 
-
 
12949
      static {
-
 
12950
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
12951
          byId.put((int)field._thriftId, field);
-
 
12952
          byName.put(field.getFieldName(), field);
-
 
12953
        }
-
 
12954
      }
-
 
12955
 
-
 
12956
      /**
-
 
12957
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
12958
       */
-
 
12959
      public static _Fields findByThriftId(int fieldId) {
-
 
12960
        return byId.get(fieldId);
-
 
12961
      }
-
 
12962
 
-
 
12963
      /**
-
 
12964
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
12965
       * if it is not found.
-
 
12966
       */
-
 
12967
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
12968
        _Fields fields = findByThriftId(fieldId);
-
 
12969
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
12970
        return fields;
-
 
12971
      }
-
 
12972
 
-
 
12973
      /**
-
 
12974
       * Find the _Fields constant that matches name, or null if its not found.
-
 
12975
       */
-
 
12976
      public static _Fields findByName(String name) {
-
 
12977
        return byName.get(name);
-
 
12978
      }
-
 
12979
 
-
 
12980
      private final short _thriftId;
-
 
12981
      private final String _fieldName;
-
 
12982
 
-
 
12983
      _Fields(short thriftId, String fieldName) {
-
 
12984
        _thriftId = thriftId;
-
 
12985
        _fieldName = fieldName;
-
 
12986
      }
-
 
12987
 
-
 
12988
      public short getThriftFieldId() {
-
 
12989
        return _thriftId;
-
 
12990
      }
-
 
12991
 
-
 
12992
      public String getFieldName() {
-
 
12993
        return _fieldName;
-
 
12994
      }
-
 
12995
    }
-
 
12996
 
-
 
12997
    // isset id assignments
-
 
12998
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
12999
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
13000
 
-
 
13001
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
13002
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
13003
          new FieldValueMetaData(TType.BOOL)));
-
 
13004
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
-
 
13005
          new FieldValueMetaData(TType.STRUCT)));
-
 
13006
    }});
-
 
13007
 
-
 
13008
    static {
-
 
13009
      FieldMetaData.addStructMetaDataMap(forgotPassword_result.class, metaDataMap);
-
 
13010
    }
-
 
13011
 
-
 
13012
    public forgotPassword_result() {
-
 
13013
    }
-
 
13014
 
-
 
13015
    public forgotPassword_result(
-
 
13016
      boolean success,
-
 
13017
      UserContextException ucx)
-
 
13018
    {
-
 
13019
      this();
-
 
13020
      this.success = success;
-
 
13021
      setSuccessIsSet(true);
-
 
13022
      this.ucx = ucx;
-
 
13023
    }
-
 
13024
 
-
 
13025
    /**
-
 
13026
     * Performs a deep copy on <i>other</i>.
-
 
13027
     */
-
 
13028
    public forgotPassword_result(forgotPassword_result other) {
-
 
13029
      __isset_bit_vector.clear();
-
 
13030
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
13031
      this.success = other.success;
-
 
13032
      if (other.isSetUcx()) {
-
 
13033
        this.ucx = new UserContextException(other.ucx);
-
 
13034
      }
-
 
13035
    }
-
 
13036
 
-
 
13037
    public forgotPassword_result deepCopy() {
-
 
13038
      return new forgotPassword_result(this);
-
 
13039
    }
-
 
13040
 
-
 
13041
    @Deprecated
-
 
13042
    public forgotPassword_result clone() {
-
 
13043
      return new forgotPassword_result(this);
-
 
13044
    }
-
 
13045
 
-
 
13046
    public boolean isSuccess() {
-
 
13047
      return this.success;
-
 
13048
    }
-
 
13049
 
-
 
13050
    public forgotPassword_result setSuccess(boolean success) {
-
 
13051
      this.success = success;
-
 
13052
      setSuccessIsSet(true);
-
 
13053
      return this;
-
 
13054
    }
-
 
13055
 
-
 
13056
    public void unsetSuccess() {
-
 
13057
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
13058
    }
-
 
13059
 
-
 
13060
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
13061
    public boolean isSetSuccess() {
-
 
13062
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
13063
    }
-
 
13064
 
-
 
13065
    public void setSuccessIsSet(boolean value) {
-
 
13066
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
13067
    }
-
 
13068
 
-
 
13069
    public UserContextException getUcx() {
-
 
13070
      return this.ucx;
-
 
13071
    }
-
 
13072
 
-
 
13073
    public forgotPassword_result setUcx(UserContextException ucx) {
-
 
13074
      this.ucx = ucx;
-
 
13075
      return this;
-
 
13076
    }
-
 
13077
 
-
 
13078
    public void unsetUcx() {
-
 
13079
      this.ucx = null;
-
 
13080
    }
-
 
13081
 
-
 
13082
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
-
 
13083
    public boolean isSetUcx() {
-
 
13084
      return this.ucx != null;
-
 
13085
    }
-
 
13086
 
-
 
13087
    public void setUcxIsSet(boolean value) {
-
 
13088
      if (!value) {
-
 
13089
        this.ucx = null;
-
 
13090
      }
-
 
13091
    }
-
 
13092
 
-
 
13093
    public void setFieldValue(_Fields field, Object value) {
-
 
13094
      switch (field) {
-
 
13095
      case SUCCESS:
-
 
13096
        if (value == null) {
-
 
13097
          unsetSuccess();
-
 
13098
        } else {
-
 
13099
          setSuccess((Boolean)value);
-
 
13100
        }
-
 
13101
        break;
-
 
13102
 
-
 
13103
      case UCX:
-
 
13104
        if (value == null) {
-
 
13105
          unsetUcx();
-
 
13106
        } else {
-
 
13107
          setUcx((UserContextException)value);
-
 
13108
        }
-
 
13109
        break;
-
 
13110
 
-
 
13111
      }
-
 
13112
    }
-
 
13113
 
-
 
13114
    public void setFieldValue(int fieldID, Object value) {
-
 
13115
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
13116
    }
-
 
13117
 
-
 
13118
    public Object getFieldValue(_Fields field) {
-
 
13119
      switch (field) {
-
 
13120
      case SUCCESS:
-
 
13121
        return new Boolean(isSuccess());
-
 
13122
 
-
 
13123
      case UCX:
-
 
13124
        return getUcx();
-
 
13125
 
-
 
13126
      }
-
 
13127
      throw new IllegalStateException();
-
 
13128
    }
-
 
13129
 
-
 
13130
    public Object getFieldValue(int fieldId) {
-
 
13131
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
13132
    }
-
 
13133
 
-
 
13134
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
13135
    public boolean isSet(_Fields field) {
-
 
13136
      switch (field) {
-
 
13137
      case SUCCESS:
-
 
13138
        return isSetSuccess();
-
 
13139
      case UCX:
-
 
13140
        return isSetUcx();
-
 
13141
      }
-
 
13142
      throw new IllegalStateException();
-
 
13143
    }
-
 
13144
 
-
 
13145
    public boolean isSet(int fieldID) {
-
 
13146
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
13147
    }
-
 
13148
 
-
 
13149
    @Override
-
 
13150
    public boolean equals(Object that) {
-
 
13151
      if (that == null)
-
 
13152
        return false;
-
 
13153
      if (that instanceof forgotPassword_result)
-
 
13154
        return this.equals((forgotPassword_result)that);
-
 
13155
      return false;
-
 
13156
    }
-
 
13157
 
-
 
13158
    public boolean equals(forgotPassword_result that) {
-
 
13159
      if (that == null)
-
 
13160
        return false;
-
 
13161
 
-
 
13162
      boolean this_present_success = true;
-
 
13163
      boolean that_present_success = true;
-
 
13164
      if (this_present_success || that_present_success) {
-
 
13165
        if (!(this_present_success && that_present_success))
-
 
13166
          return false;
-
 
13167
        if (this.success != that.success)
-
 
13168
          return false;
-
 
13169
      }
-
 
13170
 
-
 
13171
      boolean this_present_ucx = true && this.isSetUcx();
-
 
13172
      boolean that_present_ucx = true && that.isSetUcx();
-
 
13173
      if (this_present_ucx || that_present_ucx) {
-
 
13174
        if (!(this_present_ucx && that_present_ucx))
-
 
13175
          return false;
-
 
13176
        if (!this.ucx.equals(that.ucx))
-
 
13177
          return false;
-
 
13178
      }
-
 
13179
 
-
 
13180
      return true;
-
 
13181
    }
-
 
13182
 
-
 
13183
    @Override
-
 
13184
    public int hashCode() {
-
 
13185
      return 0;
-
 
13186
    }
-
 
13187
 
-
 
13188
    public int compareTo(forgotPassword_result other) {
-
 
13189
      if (!getClass().equals(other.getClass())) {
-
 
13190
        return getClass().getName().compareTo(other.getClass().getName());
-
 
13191
      }
-
 
13192
 
-
 
13193
      int lastComparison = 0;
-
 
13194
      forgotPassword_result typedOther = (forgotPassword_result)other;
-
 
13195
 
-
 
13196
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
13197
      if (lastComparison != 0) {
-
 
13198
        return lastComparison;
-
 
13199
      }
-
 
13200
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
13201
      if (lastComparison != 0) {
-
 
13202
        return lastComparison;
-
 
13203
      }
-
 
13204
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
-
 
13205
      if (lastComparison != 0) {
-
 
13206
        return lastComparison;
-
 
13207
      }
-
 
13208
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
-
 
13209
      if (lastComparison != 0) {
-
 
13210
        return lastComparison;
-
 
13211
      }
-
 
13212
      return 0;
-
 
13213
    }
-
 
13214
 
-
 
13215
    public void read(TProtocol iprot) throws TException {
-
 
13216
      TField field;
-
 
13217
      iprot.readStructBegin();
-
 
13218
      while (true)
-
 
13219
      {
-
 
13220
        field = iprot.readFieldBegin();
-
 
13221
        if (field.type == TType.STOP) { 
-
 
13222
          break;
-
 
13223
        }
-
 
13224
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
13225
        if (fieldId == null) {
-
 
13226
          TProtocolUtil.skip(iprot, field.type);
-
 
13227
        } else {
-
 
13228
          switch (fieldId) {
-
 
13229
            case SUCCESS:
-
 
13230
              if (field.type == TType.BOOL) {
-
 
13231
                this.success = iprot.readBool();
-
 
13232
                setSuccessIsSet(true);
-
 
13233
              } else { 
-
 
13234
                TProtocolUtil.skip(iprot, field.type);
-
 
13235
              }
-
 
13236
              break;
-
 
13237
            case UCX:
-
 
13238
              if (field.type == TType.STRUCT) {
-
 
13239
                this.ucx = new UserContextException();
-
 
13240
                this.ucx.read(iprot);
-
 
13241
              } else { 
-
 
13242
                TProtocolUtil.skip(iprot, field.type);
-
 
13243
              }
-
 
13244
              break;
-
 
13245
          }
-
 
13246
          iprot.readFieldEnd();
-
 
13247
        }
-
 
13248
      }
-
 
13249
      iprot.readStructEnd();
-
 
13250
      validate();
-
 
13251
    }
-
 
13252
 
-
 
13253
    public void write(TProtocol oprot) throws TException {
-
 
13254
      oprot.writeStructBegin(STRUCT_DESC);
-
 
13255
 
-
 
13256
      if (this.isSetSuccess()) {
-
 
13257
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
13258
        oprot.writeBool(this.success);
-
 
13259
        oprot.writeFieldEnd();
-
 
13260
      } else if (this.isSetUcx()) {
-
 
13261
        oprot.writeFieldBegin(UCX_FIELD_DESC);
-
 
13262
        this.ucx.write(oprot);
-
 
13263
        oprot.writeFieldEnd();
-
 
13264
      }
-
 
13265
      oprot.writeFieldStop();
-
 
13266
      oprot.writeStructEnd();
-
 
13267
    }
-
 
13268
 
-
 
13269
    @Override
-
 
13270
    public String toString() {
-
 
13271
      StringBuilder sb = new StringBuilder("forgotPassword_result(");
-
 
13272
      boolean first = true;
-
 
13273
 
-
 
13274
      sb.append("success:");
-
 
13275
      sb.append(this.success);
-
 
13276
      first = false;
12565
      if (!first) sb.append(", ");
13277
      if (!first) sb.append(", ");
12566
      sb.append("ucx:");
13278
      sb.append("ucx:");
12567
      if (this.ucx == null) {
13279
      if (this.ucx == null) {
12568
        sb.append("null");
13280
        sb.append("null");
12569
      } else {
13281
      } else {