Subversion Repositories SmartDukaan

Rev

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

Rev 1891 Rev 1893
Line 67... Line 67...
67
 
67
 
68
    public boolean forgotPassword(String email, String newPassword) throws UserContextException, TException;
68
    public boolean forgotPassword(String email, String newPassword) throws UserContextException, TException;
69
 
69
 
70
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException;
70
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException;
71
 
71
 
-
 
72
    public Address getAddressById(long addressId) throws UserContextException, TException;
-
 
73
 
72
    public long getDefaultAddressId(long userId) throws UserContextException, TException;
74
    public long getDefaultAddressId(long userId) throws UserContextException, TException;
73
 
75
 
74
    public String getDefaultPincode(long userId) throws UserContextException, TException;
76
    public String getDefaultPincode(long userId) throws UserContextException, TException;
75
 
77
 
76
    public boolean saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws UserCommunicationException, TException;
78
    public boolean saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws UserCommunicationException, TException;
Line 894... Line 896...
894
        throw result.ucx;
896
        throw result.ucx;
895
      }
897
      }
896
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
898
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
897
    }
899
    }
898
 
900
 
-
 
901
    public Address getAddressById(long addressId) throws UserContextException, TException
-
 
902
    {
-
 
903
      send_getAddressById(addressId);
-
 
904
      return recv_getAddressById();
-
 
905
    }
-
 
906
 
-
 
907
    public void send_getAddressById(long addressId) throws TException
-
 
908
    {
-
 
909
      oprot_.writeMessageBegin(new TMessage("getAddressById", TMessageType.CALL, seqid_));
-
 
910
      getAddressById_args args = new getAddressById_args();
-
 
911
      args.addressId = addressId;
-
 
912
      args.write(oprot_);
-
 
913
      oprot_.writeMessageEnd();
-
 
914
      oprot_.getTransport().flush();
-
 
915
    }
-
 
916
 
-
 
917
    public Address recv_getAddressById() throws UserContextException, TException
-
 
918
    {
-
 
919
      TMessage msg = iprot_.readMessageBegin();
-
 
920
      if (msg.type == TMessageType.EXCEPTION) {
-
 
921
        TApplicationException x = TApplicationException.read(iprot_);
-
 
922
        iprot_.readMessageEnd();
-
 
923
        throw x;
-
 
924
      }
-
 
925
      getAddressById_result result = new getAddressById_result();
-
 
926
      result.read(iprot_);
-
 
927
      iprot_.readMessageEnd();
-
 
928
      if (result.isSetSuccess()) {
-
 
929
        return result.success;
-
 
930
      }
-
 
931
      if (result.ucx != null) {
-
 
932
        throw result.ucx;
-
 
933
      }
-
 
934
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAddressById failed: unknown result");
-
 
935
    }
-
 
936
 
899
    public long getDefaultAddressId(long userId) throws UserContextException, TException
937
    public long getDefaultAddressId(long userId) throws UserContextException, TException
900
    {
938
    {
901
      send_getDefaultAddressId(userId);
939
      send_getDefaultAddressId(userId);
902
      return recv_getDefaultAddressId();
940
      return recv_getDefaultAddressId();
903
    }
941
    }
Line 2568... Line 2606...
2568
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
2606
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
2569
      processMap_.put("setDefaultAddress", new setDefaultAddress());
2607
      processMap_.put("setDefaultAddress", new setDefaultAddress());
2570
      processMap_.put("updatePassword", new updatePassword());
2608
      processMap_.put("updatePassword", new updatePassword());
2571
      processMap_.put("forgotPassword", new forgotPassword());
2609
      processMap_.put("forgotPassword", new forgotPassword());
2572
      processMap_.put("getAllAddressesForUser", new getAllAddressesForUser());
2610
      processMap_.put("getAllAddressesForUser", new getAllAddressesForUser());
-
 
2611
      processMap_.put("getAddressById", new getAddressById());
2573
      processMap_.put("getDefaultAddressId", new getDefaultAddressId());
2612
      processMap_.put("getDefaultAddressId", new getDefaultAddressId());
2574
      processMap_.put("getDefaultPincode", new getDefaultPincode());
2613
      processMap_.put("getDefaultPincode", new getDefaultPincode());
2575
      processMap_.put("saveUserCommunication", new saveUserCommunication());
2614
      processMap_.put("saveUserCommunication", new saveUserCommunication());
2576
      processMap_.put("getUserCommunicationById", new getUserCommunicationById());
2615
      processMap_.put("getUserCommunicationById", new getUserCommunicationById());
2577
      processMap_.put("getUserCommunicationByUser", new getUserCommunicationByUser());
2616
      processMap_.put("getUserCommunicationByUser", new getUserCommunicationByUser());
Line 3142... Line 3181...
3142
        oprot.getTransport().flush();
3181
        oprot.getTransport().flush();
3143
      }
3182
      }
3144
 
3183
 
3145
    }
3184
    }
3146
 
3185
 
-
 
3186
    private class getAddressById implements ProcessFunction {
-
 
3187
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
3188
      {
-
 
3189
        getAddressById_args args = new getAddressById_args();
-
 
3190
        args.read(iprot);
-
 
3191
        iprot.readMessageEnd();
-
 
3192
        getAddressById_result result = new getAddressById_result();
-
 
3193
        try {
-
 
3194
          result.success = iface_.getAddressById(args.addressId);
-
 
3195
        } catch (UserContextException ucx) {
-
 
3196
          result.ucx = ucx;
-
 
3197
        } catch (Throwable th) {
-
 
3198
          LOGGER.error("Internal error processing getAddressById", th);
-
 
3199
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAddressById");
-
 
3200
          oprot.writeMessageBegin(new TMessage("getAddressById", TMessageType.EXCEPTION, seqid));
-
 
3201
          x.write(oprot);
-
 
3202
          oprot.writeMessageEnd();
-
 
3203
          oprot.getTransport().flush();
-
 
3204
          return;
-
 
3205
        }
-
 
3206
        oprot.writeMessageBegin(new TMessage("getAddressById", TMessageType.REPLY, seqid));
-
 
3207
        result.write(oprot);
-
 
3208
        oprot.writeMessageEnd();
-
 
3209
        oprot.getTransport().flush();
-
 
3210
      }
-
 
3211
 
-
 
3212
    }
-
 
3213
 
3147
    private class getDefaultAddressId implements ProcessFunction {
3214
    private class getDefaultAddressId implements ProcessFunction {
3148
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3215
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3149
      {
3216
      {
3150
        getDefaultAddressId_args args = new getDefaultAddressId_args();
3217
        getDefaultAddressId_args args = new getDefaultAddressId_args();
3151
        args.read(iprot);
3218
        args.read(iprot);
Line 16524... Line 16591...
16524
      boolean first = true;
16591
      boolean first = true;
16525
 
16592
 
16526
      sb.append("success:");
16593
      sb.append("success:");
16527
      if (this.success == null) {
16594
      if (this.success == null) {
16528
        sb.append("null");
16595
        sb.append("null");
-
 
16596
      } else {
-
 
16597
        sb.append(this.success);
-
 
16598
      }
-
 
16599
      first = false;
-
 
16600
      if (!first) sb.append(", ");
-
 
16601
      sb.append("ucx:");
-
 
16602
      if (this.ucx == null) {
-
 
16603
        sb.append("null");
-
 
16604
      } else {
-
 
16605
        sb.append(this.ucx);
-
 
16606
      }
-
 
16607
      first = false;
-
 
16608
      sb.append(")");
-
 
16609
      return sb.toString();
-
 
16610
    }
-
 
16611
 
-
 
16612
    public void validate() throws TException {
-
 
16613
      // check for required fields
-
 
16614
    }
-
 
16615
 
-
 
16616
  }
-
 
16617
 
-
 
16618
  public static class getAddressById_args implements TBase<getAddressById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAddressById_args>   {
-
 
16619
    private static final TStruct STRUCT_DESC = new TStruct("getAddressById_args");
-
 
16620
 
-
 
16621
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)1);
-
 
16622
 
-
 
16623
    private long addressId;
-
 
16624
 
-
 
16625
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
16626
    public enum _Fields implements TFieldIdEnum {
-
 
16627
      ADDRESS_ID((short)1, "addressId");
-
 
16628
 
-
 
16629
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
16630
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
16631
 
-
 
16632
      static {
-
 
16633
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
16634
          byId.put((int)field._thriftId, field);
-
 
16635
          byName.put(field.getFieldName(), field);
-
 
16636
        }
-
 
16637
      }
-
 
16638
 
-
 
16639
      /**
-
 
16640
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
16641
       */
-
 
16642
      public static _Fields findByThriftId(int fieldId) {
-
 
16643
        return byId.get(fieldId);
-
 
16644
      }
-
 
16645
 
-
 
16646
      /**
-
 
16647
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
16648
       * if it is not found.
-
 
16649
       */
-
 
16650
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
16651
        _Fields fields = findByThriftId(fieldId);
-
 
16652
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
16653
        return fields;
-
 
16654
      }
-
 
16655
 
-
 
16656
      /**
-
 
16657
       * Find the _Fields constant that matches name, or null if its not found.
-
 
16658
       */
-
 
16659
      public static _Fields findByName(String name) {
-
 
16660
        return byName.get(name);
-
 
16661
      }
-
 
16662
 
-
 
16663
      private final short _thriftId;
-
 
16664
      private final String _fieldName;
-
 
16665
 
-
 
16666
      _Fields(short thriftId, String fieldName) {
-
 
16667
        _thriftId = thriftId;
-
 
16668
        _fieldName = fieldName;
-
 
16669
      }
-
 
16670
 
-
 
16671
      public short getThriftFieldId() {
-
 
16672
        return _thriftId;
-
 
16673
      }
-
 
16674
 
-
 
16675
      public String getFieldName() {
-
 
16676
        return _fieldName;
-
 
16677
      }
-
 
16678
    }
-
 
16679
 
-
 
16680
    // isset id assignments
-
 
16681
    private static final int __ADDRESSID_ISSET_ID = 0;
-
 
16682
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
16683
 
-
 
16684
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
16685
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
-
 
16686
          new FieldValueMetaData(TType.I64)));
-
 
16687
    }});
-
 
16688
 
-
 
16689
    static {
-
 
16690
      FieldMetaData.addStructMetaDataMap(getAddressById_args.class, metaDataMap);
-
 
16691
    }
-
 
16692
 
-
 
16693
    public getAddressById_args() {
-
 
16694
    }
-
 
16695
 
-
 
16696
    public getAddressById_args(
-
 
16697
      long addressId)
-
 
16698
    {
-
 
16699
      this();
-
 
16700
      this.addressId = addressId;
-
 
16701
      setAddressIdIsSet(true);
-
 
16702
    }
-
 
16703
 
-
 
16704
    /**
-
 
16705
     * Performs a deep copy on <i>other</i>.
-
 
16706
     */
-
 
16707
    public getAddressById_args(getAddressById_args other) {
-
 
16708
      __isset_bit_vector.clear();
-
 
16709
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
16710
      this.addressId = other.addressId;
-
 
16711
    }
-
 
16712
 
-
 
16713
    public getAddressById_args deepCopy() {
-
 
16714
      return new getAddressById_args(this);
-
 
16715
    }
-
 
16716
 
-
 
16717
    @Deprecated
-
 
16718
    public getAddressById_args clone() {
-
 
16719
      return new getAddressById_args(this);
-
 
16720
    }
-
 
16721
 
-
 
16722
    public long getAddressId() {
-
 
16723
      return this.addressId;
-
 
16724
    }
-
 
16725
 
-
 
16726
    public getAddressById_args setAddressId(long addressId) {
-
 
16727
      this.addressId = addressId;
-
 
16728
      setAddressIdIsSet(true);
-
 
16729
      return this;
-
 
16730
    }
-
 
16731
 
-
 
16732
    public void unsetAddressId() {
-
 
16733
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
-
 
16734
    }
-
 
16735
 
-
 
16736
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
-
 
16737
    public boolean isSetAddressId() {
-
 
16738
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
-
 
16739
    }
-
 
16740
 
-
 
16741
    public void setAddressIdIsSet(boolean value) {
-
 
16742
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
-
 
16743
    }
-
 
16744
 
-
 
16745
    public void setFieldValue(_Fields field, Object value) {
-
 
16746
      switch (field) {
-
 
16747
      case ADDRESS_ID:
-
 
16748
        if (value == null) {
-
 
16749
          unsetAddressId();
-
 
16750
        } else {
-
 
16751
          setAddressId((Long)value);
-
 
16752
        }
-
 
16753
        break;
-
 
16754
 
-
 
16755
      }
-
 
16756
    }
-
 
16757
 
-
 
16758
    public void setFieldValue(int fieldID, Object value) {
-
 
16759
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
16760
    }
-
 
16761
 
-
 
16762
    public Object getFieldValue(_Fields field) {
-
 
16763
      switch (field) {
-
 
16764
      case ADDRESS_ID:
-
 
16765
        return new Long(getAddressId());
-
 
16766
 
-
 
16767
      }
-
 
16768
      throw new IllegalStateException();
-
 
16769
    }
-
 
16770
 
-
 
16771
    public Object getFieldValue(int fieldId) {
-
 
16772
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
16773
    }
-
 
16774
 
-
 
16775
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
16776
    public boolean isSet(_Fields field) {
-
 
16777
      switch (field) {
-
 
16778
      case ADDRESS_ID:
-
 
16779
        return isSetAddressId();
-
 
16780
      }
-
 
16781
      throw new IllegalStateException();
-
 
16782
    }
-
 
16783
 
-
 
16784
    public boolean isSet(int fieldID) {
-
 
16785
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
16786
    }
-
 
16787
 
-
 
16788
    @Override
-
 
16789
    public boolean equals(Object that) {
-
 
16790
      if (that == null)
-
 
16791
        return false;
-
 
16792
      if (that instanceof getAddressById_args)
-
 
16793
        return this.equals((getAddressById_args)that);
-
 
16794
      return false;
-
 
16795
    }
-
 
16796
 
-
 
16797
    public boolean equals(getAddressById_args that) {
-
 
16798
      if (that == null)
-
 
16799
        return false;
-
 
16800
 
-
 
16801
      boolean this_present_addressId = true;
-
 
16802
      boolean that_present_addressId = true;
-
 
16803
      if (this_present_addressId || that_present_addressId) {
-
 
16804
        if (!(this_present_addressId && that_present_addressId))
-
 
16805
          return false;
-
 
16806
        if (this.addressId != that.addressId)
-
 
16807
          return false;
-
 
16808
      }
-
 
16809
 
-
 
16810
      return true;
-
 
16811
    }
-
 
16812
 
-
 
16813
    @Override
-
 
16814
    public int hashCode() {
-
 
16815
      return 0;
-
 
16816
    }
-
 
16817
 
-
 
16818
    public int compareTo(getAddressById_args other) {
-
 
16819
      if (!getClass().equals(other.getClass())) {
-
 
16820
        return getClass().getName().compareTo(other.getClass().getName());
-
 
16821
      }
-
 
16822
 
-
 
16823
      int lastComparison = 0;
-
 
16824
      getAddressById_args typedOther = (getAddressById_args)other;
-
 
16825
 
-
 
16826
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
-
 
16827
      if (lastComparison != 0) {
-
 
16828
        return lastComparison;
-
 
16829
      }
-
 
16830
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
-
 
16831
      if (lastComparison != 0) {
-
 
16832
        return lastComparison;
-
 
16833
      }
-
 
16834
      return 0;
-
 
16835
    }
-
 
16836
 
-
 
16837
    public void read(TProtocol iprot) throws TException {
-
 
16838
      TField field;
-
 
16839
      iprot.readStructBegin();
-
 
16840
      while (true)
-
 
16841
      {
-
 
16842
        field = iprot.readFieldBegin();
-
 
16843
        if (field.type == TType.STOP) { 
-
 
16844
          break;
-
 
16845
        }
-
 
16846
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
16847
        if (fieldId == null) {
-
 
16848
          TProtocolUtil.skip(iprot, field.type);
-
 
16849
        } else {
-
 
16850
          switch (fieldId) {
-
 
16851
            case ADDRESS_ID:
-
 
16852
              if (field.type == TType.I64) {
-
 
16853
                this.addressId = iprot.readI64();
-
 
16854
                setAddressIdIsSet(true);
-
 
16855
              } else { 
-
 
16856
                TProtocolUtil.skip(iprot, field.type);
-
 
16857
              }
-
 
16858
              break;
-
 
16859
          }
-
 
16860
          iprot.readFieldEnd();
-
 
16861
        }
-
 
16862
      }
-
 
16863
      iprot.readStructEnd();
-
 
16864
      validate();
-
 
16865
    }
-
 
16866
 
-
 
16867
    public void write(TProtocol oprot) throws TException {
-
 
16868
      validate();
-
 
16869
 
-
 
16870
      oprot.writeStructBegin(STRUCT_DESC);
-
 
16871
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
-
 
16872
      oprot.writeI64(this.addressId);
-
 
16873
      oprot.writeFieldEnd();
-
 
16874
      oprot.writeFieldStop();
-
 
16875
      oprot.writeStructEnd();
-
 
16876
    }
-
 
16877
 
-
 
16878
    @Override
-
 
16879
    public String toString() {
-
 
16880
      StringBuilder sb = new StringBuilder("getAddressById_args(");
-
 
16881
      boolean first = true;
-
 
16882
 
-
 
16883
      sb.append("addressId:");
-
 
16884
      sb.append(this.addressId);
-
 
16885
      first = false;
-
 
16886
      sb.append(")");
-
 
16887
      return sb.toString();
-
 
16888
    }
-
 
16889
 
-
 
16890
    public void validate() throws TException {
-
 
16891
      // check for required fields
-
 
16892
    }
-
 
16893
 
-
 
16894
  }
-
 
16895
 
-
 
16896
  public static class getAddressById_result implements TBase<getAddressById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAddressById_result>   {
-
 
16897
    private static final TStruct STRUCT_DESC = new TStruct("getAddressById_result");
-
 
16898
 
-
 
16899
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
-
 
16900
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
-
 
16901
 
-
 
16902
    private Address success;
-
 
16903
    private UserContextException ucx;
-
 
16904
 
-
 
16905
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
16906
    public enum _Fields implements TFieldIdEnum {
-
 
16907
      SUCCESS((short)0, "success"),
-
 
16908
      UCX((short)1, "ucx");
-
 
16909
 
-
 
16910
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
16911
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
16912
 
-
 
16913
      static {
-
 
16914
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
16915
          byId.put((int)field._thriftId, field);
-
 
16916
          byName.put(field.getFieldName(), field);
-
 
16917
        }
-
 
16918
      }
-
 
16919
 
-
 
16920
      /**
-
 
16921
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
16922
       */
-
 
16923
      public static _Fields findByThriftId(int fieldId) {
-
 
16924
        return byId.get(fieldId);
-
 
16925
      }
-
 
16926
 
-
 
16927
      /**
-
 
16928
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
16929
       * if it is not found.
-
 
16930
       */
-
 
16931
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
16932
        _Fields fields = findByThriftId(fieldId);
-
 
16933
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
16934
        return fields;
-
 
16935
      }
-
 
16936
 
-
 
16937
      /**
-
 
16938
       * Find the _Fields constant that matches name, or null if its not found.
-
 
16939
       */
-
 
16940
      public static _Fields findByName(String name) {
-
 
16941
        return byName.get(name);
-
 
16942
      }
-
 
16943
 
-
 
16944
      private final short _thriftId;
-
 
16945
      private final String _fieldName;
-
 
16946
 
-
 
16947
      _Fields(short thriftId, String fieldName) {
-
 
16948
        _thriftId = thriftId;
-
 
16949
        _fieldName = fieldName;
-
 
16950
      }
-
 
16951
 
-
 
16952
      public short getThriftFieldId() {
-
 
16953
        return _thriftId;
-
 
16954
      }
-
 
16955
 
-
 
16956
      public String getFieldName() {
-
 
16957
        return _fieldName;
-
 
16958
      }
-
 
16959
    }
-
 
16960
 
-
 
16961
    // isset id assignments
-
 
16962
 
-
 
16963
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
16964
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
16965
          new StructMetaData(TType.STRUCT, Address.class)));
-
 
16966
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
-
 
16967
          new FieldValueMetaData(TType.STRUCT)));
-
 
16968
    }});
-
 
16969
 
-
 
16970
    static {
-
 
16971
      FieldMetaData.addStructMetaDataMap(getAddressById_result.class, metaDataMap);
-
 
16972
    }
-
 
16973
 
-
 
16974
    public getAddressById_result() {
-
 
16975
    }
-
 
16976
 
-
 
16977
    public getAddressById_result(
-
 
16978
      Address success,
-
 
16979
      UserContextException ucx)
-
 
16980
    {
-
 
16981
      this();
-
 
16982
      this.success = success;
-
 
16983
      this.ucx = ucx;
-
 
16984
    }
-
 
16985
 
-
 
16986
    /**
-
 
16987
     * Performs a deep copy on <i>other</i>.
-
 
16988
     */
-
 
16989
    public getAddressById_result(getAddressById_result other) {
-
 
16990
      if (other.isSetSuccess()) {
-
 
16991
        this.success = new Address(other.success);
-
 
16992
      }
-
 
16993
      if (other.isSetUcx()) {
-
 
16994
        this.ucx = new UserContextException(other.ucx);
-
 
16995
      }
-
 
16996
    }
-
 
16997
 
-
 
16998
    public getAddressById_result deepCopy() {
-
 
16999
      return new getAddressById_result(this);
-
 
17000
    }
-
 
17001
 
-
 
17002
    @Deprecated
-
 
17003
    public getAddressById_result clone() {
-
 
17004
      return new getAddressById_result(this);
-
 
17005
    }
-
 
17006
 
-
 
17007
    public Address getSuccess() {
-
 
17008
      return this.success;
-
 
17009
    }
-
 
17010
 
-
 
17011
    public getAddressById_result setSuccess(Address success) {
-
 
17012
      this.success = success;
-
 
17013
      return this;
-
 
17014
    }
-
 
17015
 
-
 
17016
    public void unsetSuccess() {
-
 
17017
      this.success = null;
-
 
17018
    }
-
 
17019
 
-
 
17020
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
17021
    public boolean isSetSuccess() {
-
 
17022
      return this.success != null;
-
 
17023
    }
-
 
17024
 
-
 
17025
    public void setSuccessIsSet(boolean value) {
-
 
17026
      if (!value) {
-
 
17027
        this.success = null;
-
 
17028
      }
-
 
17029
    }
-
 
17030
 
-
 
17031
    public UserContextException getUcx() {
-
 
17032
      return this.ucx;
-
 
17033
    }
-
 
17034
 
-
 
17035
    public getAddressById_result setUcx(UserContextException ucx) {
-
 
17036
      this.ucx = ucx;
-
 
17037
      return this;
-
 
17038
    }
-
 
17039
 
-
 
17040
    public void unsetUcx() {
-
 
17041
      this.ucx = null;
-
 
17042
    }
-
 
17043
 
-
 
17044
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
-
 
17045
    public boolean isSetUcx() {
-
 
17046
      return this.ucx != null;
-
 
17047
    }
-
 
17048
 
-
 
17049
    public void setUcxIsSet(boolean value) {
-
 
17050
      if (!value) {
-
 
17051
        this.ucx = null;
-
 
17052
      }
-
 
17053
    }
-
 
17054
 
-
 
17055
    public void setFieldValue(_Fields field, Object value) {
-
 
17056
      switch (field) {
-
 
17057
      case SUCCESS:
-
 
17058
        if (value == null) {
-
 
17059
          unsetSuccess();
-
 
17060
        } else {
-
 
17061
          setSuccess((Address)value);
-
 
17062
        }
-
 
17063
        break;
-
 
17064
 
-
 
17065
      case UCX:
-
 
17066
        if (value == null) {
-
 
17067
          unsetUcx();
-
 
17068
        } else {
-
 
17069
          setUcx((UserContextException)value);
-
 
17070
        }
-
 
17071
        break;
-
 
17072
 
-
 
17073
      }
-
 
17074
    }
-
 
17075
 
-
 
17076
    public void setFieldValue(int fieldID, Object value) {
-
 
17077
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
17078
    }
-
 
17079
 
-
 
17080
    public Object getFieldValue(_Fields field) {
-
 
17081
      switch (field) {
-
 
17082
      case SUCCESS:
-
 
17083
        return getSuccess();
-
 
17084
 
-
 
17085
      case UCX:
-
 
17086
        return getUcx();
-
 
17087
 
-
 
17088
      }
-
 
17089
      throw new IllegalStateException();
-
 
17090
    }
-
 
17091
 
-
 
17092
    public Object getFieldValue(int fieldId) {
-
 
17093
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
17094
    }
-
 
17095
 
-
 
17096
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
17097
    public boolean isSet(_Fields field) {
-
 
17098
      switch (field) {
-
 
17099
      case SUCCESS:
-
 
17100
        return isSetSuccess();
-
 
17101
      case UCX:
-
 
17102
        return isSetUcx();
-
 
17103
      }
-
 
17104
      throw new IllegalStateException();
-
 
17105
    }
-
 
17106
 
-
 
17107
    public boolean isSet(int fieldID) {
-
 
17108
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
17109
    }
-
 
17110
 
-
 
17111
    @Override
-
 
17112
    public boolean equals(Object that) {
-
 
17113
      if (that == null)
-
 
17114
        return false;
-
 
17115
      if (that instanceof getAddressById_result)
-
 
17116
        return this.equals((getAddressById_result)that);
-
 
17117
      return false;
-
 
17118
    }
-
 
17119
 
-
 
17120
    public boolean equals(getAddressById_result that) {
-
 
17121
      if (that == null)
-
 
17122
        return false;
-
 
17123
 
-
 
17124
      boolean this_present_success = true && this.isSetSuccess();
-
 
17125
      boolean that_present_success = true && that.isSetSuccess();
-
 
17126
      if (this_present_success || that_present_success) {
-
 
17127
        if (!(this_present_success && that_present_success))
-
 
17128
          return false;
-
 
17129
        if (!this.success.equals(that.success))
-
 
17130
          return false;
-
 
17131
      }
-
 
17132
 
-
 
17133
      boolean this_present_ucx = true && this.isSetUcx();
-
 
17134
      boolean that_present_ucx = true && that.isSetUcx();
-
 
17135
      if (this_present_ucx || that_present_ucx) {
-
 
17136
        if (!(this_present_ucx && that_present_ucx))
-
 
17137
          return false;
-
 
17138
        if (!this.ucx.equals(that.ucx))
-
 
17139
          return false;
-
 
17140
      }
-
 
17141
 
-
 
17142
      return true;
-
 
17143
    }
-
 
17144
 
-
 
17145
    @Override
-
 
17146
    public int hashCode() {
-
 
17147
      return 0;
-
 
17148
    }
-
 
17149
 
-
 
17150
    public int compareTo(getAddressById_result other) {
-
 
17151
      if (!getClass().equals(other.getClass())) {
-
 
17152
        return getClass().getName().compareTo(other.getClass().getName());
-
 
17153
      }
-
 
17154
 
-
 
17155
      int lastComparison = 0;
-
 
17156
      getAddressById_result typedOther = (getAddressById_result)other;
-
 
17157
 
-
 
17158
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
17159
      if (lastComparison != 0) {
-
 
17160
        return lastComparison;
-
 
17161
      }
-
 
17162
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
17163
      if (lastComparison != 0) {
-
 
17164
        return lastComparison;
-
 
17165
      }
-
 
17166
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
-
 
17167
      if (lastComparison != 0) {
-
 
17168
        return lastComparison;
-
 
17169
      }
-
 
17170
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
-
 
17171
      if (lastComparison != 0) {
-
 
17172
        return lastComparison;
-
 
17173
      }
-
 
17174
      return 0;
-
 
17175
    }
-
 
17176
 
-
 
17177
    public void read(TProtocol iprot) throws TException {
-
 
17178
      TField field;
-
 
17179
      iprot.readStructBegin();
-
 
17180
      while (true)
-
 
17181
      {
-
 
17182
        field = iprot.readFieldBegin();
-
 
17183
        if (field.type == TType.STOP) { 
-
 
17184
          break;
-
 
17185
        }
-
 
17186
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
17187
        if (fieldId == null) {
-
 
17188
          TProtocolUtil.skip(iprot, field.type);
-
 
17189
        } else {
-
 
17190
          switch (fieldId) {
-
 
17191
            case SUCCESS:
-
 
17192
              if (field.type == TType.STRUCT) {
-
 
17193
                this.success = new Address();
-
 
17194
                this.success.read(iprot);
-
 
17195
              } else { 
-
 
17196
                TProtocolUtil.skip(iprot, field.type);
-
 
17197
              }
-
 
17198
              break;
-
 
17199
            case UCX:
-
 
17200
              if (field.type == TType.STRUCT) {
-
 
17201
                this.ucx = new UserContextException();
-
 
17202
                this.ucx.read(iprot);
-
 
17203
              } else { 
-
 
17204
                TProtocolUtil.skip(iprot, field.type);
-
 
17205
              }
-
 
17206
              break;
-
 
17207
          }
-
 
17208
          iprot.readFieldEnd();
-
 
17209
        }
-
 
17210
      }
-
 
17211
      iprot.readStructEnd();
-
 
17212
      validate();
-
 
17213
    }
-
 
17214
 
-
 
17215
    public void write(TProtocol oprot) throws TException {
-
 
17216
      oprot.writeStructBegin(STRUCT_DESC);
-
 
17217
 
-
 
17218
      if (this.isSetSuccess()) {
-
 
17219
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
17220
        this.success.write(oprot);
-
 
17221
        oprot.writeFieldEnd();
-
 
17222
      } else if (this.isSetUcx()) {
-
 
17223
        oprot.writeFieldBegin(UCX_FIELD_DESC);
-
 
17224
        this.ucx.write(oprot);
-
 
17225
        oprot.writeFieldEnd();
-
 
17226
      }
-
 
17227
      oprot.writeFieldStop();
-
 
17228
      oprot.writeStructEnd();
-
 
17229
    }
-
 
17230
 
-
 
17231
    @Override
-
 
17232
    public String toString() {
-
 
17233
      StringBuilder sb = new StringBuilder("getAddressById_result(");
-
 
17234
      boolean first = true;
-
 
17235
 
-
 
17236
      sb.append("success:");
-
 
17237
      if (this.success == null) {
-
 
17238
        sb.append("null");
16529
      } else {
17239
      } else {
16530
        sb.append(this.success);
17240
        sb.append(this.success);
16531
      }
17241
      }
16532
      first = false;
17242
      first = false;
16533
      if (!first) sb.append(", ");
17243
      if (!first) sb.append(", ");