Subversion Repositories SmartDukaan

Rev

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

Rev 7888 Rev 9840
Line 117... Line 117...
117
     * 
117
     * 
118
     * @param catalogItemId
118
     * @param catalogItemId
119
     * @param destination_pin
119
     * @param destination_pin
120
     * @param type
120
     * @param type
121
     */
121
     */
122
    public List<Long> getEntityLogisticsEstimation(long catalogItemId, String destination_pin, DeliveryType type) throws LogisticsServiceException, org.apache.thrift.TException;
122
    public List<ItemText> getEntityLogisticsEstimation(long catalogItemId, String destination_pin, DeliveryType type) throws LogisticsServiceException, org.apache.thrift.TException;
123
 
123
 
124
    /**
124
    /**
125
     * Returns the id for a given pickUpType
125
     * Returns the id for a given pickUpType
126
     * 
126
     * 
127
     * @param pickUp
127
     * @param pickUp
Line 498... Line 498...
498
        return result.success;
498
        return result.success;
499
      }
499
      }
500
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHolidays failed: unknown result");
500
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHolidays failed: unknown result");
501
    }
501
    }
502
 
502
 
503
    public List<Long> getEntityLogisticsEstimation(long catalogItemId, String destination_pin, DeliveryType type) throws LogisticsServiceException, org.apache.thrift.TException
503
    public List<ItemText> getEntityLogisticsEstimation(long catalogItemId, String destination_pin, DeliveryType type) throws LogisticsServiceException, org.apache.thrift.TException
504
    {
504
    {
505
      send_getEntityLogisticsEstimation(catalogItemId, destination_pin, type);
505
      send_getEntityLogisticsEstimation(catalogItemId, destination_pin, type);
506
      return recv_getEntityLogisticsEstimation();
506
      return recv_getEntityLogisticsEstimation();
507
    }
507
    }
508
 
508
 
Line 513... Line 513...
513
      args.setDestination_pin(destination_pin);
513
      args.setDestination_pin(destination_pin);
514
      args.setType(type);
514
      args.setType(type);
515
      sendBase("getEntityLogisticsEstimation", args);
515
      sendBase("getEntityLogisticsEstimation", args);
516
    }
516
    }
517
 
517
 
518
    public List<Long> recv_getEntityLogisticsEstimation() throws LogisticsServiceException, org.apache.thrift.TException
518
    public List<ItemText> recv_getEntityLogisticsEstimation() throws LogisticsServiceException, org.apache.thrift.TException
519
    {
519
    {
520
      getEntityLogisticsEstimation_result result = new getEntityLogisticsEstimation_result();
520
      getEntityLogisticsEstimation_result result = new getEntityLogisticsEstimation_result();
521
      receiveBase(result, "getEntityLogisticsEstimation");
521
      receiveBase(result, "getEntityLogisticsEstimation");
522
      if (result.isSetSuccess()) {
522
      if (result.isSetSuccess()) {
523
        return result.success;
523
        return result.success;
Line 1168... Line 1168...
1168
        args.setType(type);
1168
        args.setType(type);
1169
        args.write(prot);
1169
        args.write(prot);
1170
        prot.writeMessageEnd();
1170
        prot.writeMessageEnd();
1171
      }
1171
      }
1172
 
1172
 
1173
      public List<Long> getResult() throws LogisticsServiceException, org.apache.thrift.TException {
1173
      public List<ItemText> getResult() throws LogisticsServiceException, org.apache.thrift.TException {
1174
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1174
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1175
          throw new IllegalStateException("Method call not finished!");
1175
          throw new IllegalStateException("Method call not finished!");
1176
        }
1176
        }
1177
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1177
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1178
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1178
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
Line 10693... Line 10693...
10693
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getEntityLogisticsEstimation_result");
10693
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getEntityLogisticsEstimation_result");
10694
 
10694
 
10695
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
10695
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
10696
    private static final org.apache.thrift.protocol.TField SE_FIELD_DESC = new org.apache.thrift.protocol.TField("se", org.apache.thrift.protocol.TType.STRUCT, (short)1);
10696
    private static final org.apache.thrift.protocol.TField SE_FIELD_DESC = new org.apache.thrift.protocol.TField("se", org.apache.thrift.protocol.TType.STRUCT, (short)1);
10697
 
10697
 
10698
    private List<Long> success; // required
10698
    private List<ItemText> success; // required
10699
    private LogisticsServiceException se; // required
10699
    private LogisticsServiceException se; // required
10700
 
10700
 
10701
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10701
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10702
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10702
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10703
      SUCCESS((short)0, "success"),
10703
      SUCCESS((short)0, "success"),
Line 10764... Line 10764...
10764
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10764
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10765
    static {
10765
    static {
10766
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10766
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10767
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10767
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10768
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10768
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10769
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
10769
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ItemText.class))));
10770
      tmpMap.put(_Fields.SE, new org.apache.thrift.meta_data.FieldMetaData("se", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10770
      tmpMap.put(_Fields.SE, new org.apache.thrift.meta_data.FieldMetaData("se", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10771
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10771
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10772
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10772
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10773
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getEntityLogisticsEstimation_result.class, metaDataMap);
10773
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getEntityLogisticsEstimation_result.class, metaDataMap);
10774
    }
10774
    }
10775
 
10775
 
10776
    public getEntityLogisticsEstimation_result() {
10776
    public getEntityLogisticsEstimation_result() {
10777
    }
10777
    }
10778
 
10778
 
10779
    public getEntityLogisticsEstimation_result(
10779
    public getEntityLogisticsEstimation_result(
10780
      List<Long> success,
10780
      List<ItemText> success,
10781
      LogisticsServiceException se)
10781
      LogisticsServiceException se)
10782
    {
10782
    {
10783
      this();
10783
      this();
10784
      this.success = success;
10784
      this.success = success;
10785
      this.se = se;
10785
      this.se = se;
Line 10788... Line 10788...
10788
    /**
10788
    /**
10789
     * Performs a deep copy on <i>other</i>.
10789
     * Performs a deep copy on <i>other</i>.
10790
     */
10790
     */
10791
    public getEntityLogisticsEstimation_result(getEntityLogisticsEstimation_result other) {
10791
    public getEntityLogisticsEstimation_result(getEntityLogisticsEstimation_result other) {
10792
      if (other.isSetSuccess()) {
10792
      if (other.isSetSuccess()) {
10793
        List<Long> __this__success = new ArrayList<Long>();
10793
        List<ItemText> __this__success = new ArrayList<ItemText>();
10794
        for (Long other_element : other.success) {
10794
        for (ItemText other_element : other.success) {
10795
          __this__success.add(other_element);
10795
          __this__success.add(new ItemText(other_element));
10796
        }
10796
        }
10797
        this.success = __this__success;
10797
        this.success = __this__success;
10798
      }
10798
      }
10799
      if (other.isSetSe()) {
10799
      if (other.isSetSe()) {
10800
        this.se = new LogisticsServiceException(other.se);
10800
        this.se = new LogisticsServiceException(other.se);
Line 10813... Line 10813...
10813
 
10813
 
10814
    public int getSuccessSize() {
10814
    public int getSuccessSize() {
10815
      return (this.success == null) ? 0 : this.success.size();
10815
      return (this.success == null) ? 0 : this.success.size();
10816
    }
10816
    }
10817
 
10817
 
10818
    public java.util.Iterator<Long> getSuccessIterator() {
10818
    public java.util.Iterator<ItemText> getSuccessIterator() {
10819
      return (this.success == null) ? null : this.success.iterator();
10819
      return (this.success == null) ? null : this.success.iterator();
10820
    }
10820
    }
10821
 
10821
 
10822
    public void addToSuccess(long elem) {
10822
    public void addToSuccess(ItemText elem) {
10823
      if (this.success == null) {
10823
      if (this.success == null) {
10824
        this.success = new ArrayList<Long>();
10824
        this.success = new ArrayList<ItemText>();
10825
      }
10825
      }
10826
      this.success.add(elem);
10826
      this.success.add(elem);
10827
    }
10827
    }
10828
 
10828
 
10829
    public List<Long> getSuccess() {
10829
    public List<ItemText> getSuccess() {
10830
      return this.success;
10830
      return this.success;
10831
    }
10831
    }
10832
 
10832
 
10833
    public void setSuccess(List<Long> success) {
10833
    public void setSuccess(List<ItemText> success) {
10834
      this.success = success;
10834
      this.success = success;
10835
    }
10835
    }
10836
 
10836
 
10837
    public void unsetSuccess() {
10837
    public void unsetSuccess() {
10838
      this.success = null;
10838
      this.success = null;
Line 10876... Line 10876...
10876
      switch (field) {
10876
      switch (field) {
10877
      case SUCCESS:
10877
      case SUCCESS:
10878
        if (value == null) {
10878
        if (value == null) {
10879
          unsetSuccess();
10879
          unsetSuccess();
10880
        } else {
10880
        } else {
10881
          setSuccess((List<Long>)value);
10881
          setSuccess((List<ItemText>)value);
10882
        }
10882
        }
10883
        break;
10883
        break;
10884
 
10884
 
10885
      case SE:
10885
      case SE:
10886
        if (value == null) {
10886
        if (value == null) {
Line 11006... Line 11006...
11006
        switch (field.id) {
11006
        switch (field.id) {
11007
          case 0: // SUCCESS
11007
          case 0: // SUCCESS
11008
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11008
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11009
              {
11009
              {
11010
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
11010
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
11011
                this.success = new ArrayList<Long>(_list16.size);
11011
                this.success = new ArrayList<ItemText>(_list16.size);
11012
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
11012
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
11013
                {
11013
                {
11014
                  long _elem18; // required
11014
                  ItemText _elem18; // required
11015
                  _elem18 = iprot.readI64();
11015
                  _elem18 = new ItemText();
-
 
11016
                  _elem18.read(iprot);
11016
                  this.success.add(_elem18);
11017
                  this.success.add(_elem18);
11017
                }
11018
                }
11018
                iprot.readListEnd();
11019
                iprot.readListEnd();
11019
              }
11020
              }
11020
            } else { 
11021
            } else { 
Line 11042... Line 11043...
11042
      oprot.writeStructBegin(STRUCT_DESC);
11043
      oprot.writeStructBegin(STRUCT_DESC);
11043
 
11044
 
11044
      if (this.isSetSuccess()) {
11045
      if (this.isSetSuccess()) {
11045
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11046
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11046
        {
11047
        {
11047
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
11048
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
11048
          for (long _iter19 : this.success)
11049
          for (ItemText _iter19 : this.success)
11049
          {
11050
          {
11050
            oprot.writeI64(_iter19);
11051
            _iter19.write(oprot);
11051
          }
11052
          }
11052
          oprot.writeListEnd();
11053
          oprot.writeListEnd();
11053
        }
11054
        }
11054
        oprot.writeFieldEnd();
11055
        oprot.writeFieldEnd();
11055
      } else if (this.isSetSe()) {
11056
      } else if (this.isSetSe()) {