Subversion Repositories SmartDukaan

Rev

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

Rev 674 Rev 715
Line 53... Line 53...
53
     * Same as above excpet that an airway bill number is also allocated and returned.
53
     * Same as above excpet that an airway bill number is also allocated and returned.
54
     * 
54
     * 
55
     * @param destination_pincode
55
     * @param destination_pincode
56
     * @param item_id
56
     * @param item_id
57
     */
57
     */
58
    public LogisticsInfo getLogisticsInfo(String destination_pincode, String item_id) throws LogisticsServiceException, TException;
58
    public LogisticsInfo getLogisticsInfo(String destination_pincode, long item_id) throws LogisticsServiceException, TException;
59
 
59
 
60
    /**
60
    /**
61
     * Returns an unused AWB number for the given provider.
61
     * Returns an unused AWB number for the given provider.
62
     * 
62
     * 
63
     * @param providerId
63
     * @param providerId
Line 207... Line 207...
207
        throw result.se;
207
        throw result.se;
208
      }
208
      }
209
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
209
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
210
    }
210
    }
211
 
211
 
212
    public LogisticsInfo getLogisticsInfo(String destination_pincode, String item_id) throws LogisticsServiceException, TException
212
    public LogisticsInfo getLogisticsInfo(String destination_pincode, long item_id) throws LogisticsServiceException, TException
213
    {
213
    {
214
      send_getLogisticsInfo(destination_pincode, item_id);
214
      send_getLogisticsInfo(destination_pincode, item_id);
215
      return recv_getLogisticsInfo();
215
      return recv_getLogisticsInfo();
216
    }
216
    }
217
 
217
 
218
    public void send_getLogisticsInfo(String destination_pincode, String item_id) throws TException
218
    public void send_getLogisticsInfo(String destination_pincode, long item_id) throws TException
219
    {
219
    {
220
      oprot_.writeMessageBegin(new TMessage("getLogisticsInfo", TMessageType.CALL, seqid_));
220
      oprot_.writeMessageBegin(new TMessage("getLogisticsInfo", TMessageType.CALL, seqid_));
221
      getLogisticsInfo_args args = new getLogisticsInfo_args();
221
      getLogisticsInfo_args args = new getLogisticsInfo_args();
222
      args.destination_pincode = destination_pincode;
222
      args.destination_pincode = destination_pincode;
223
      args.item_id = item_id;
223
      args.item_id = item_id;
Line 2493... Line 2493...
2493
 
2493
 
2494
  public static class getLogisticsInfo_args implements TBase<getLogisticsInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLogisticsInfo_args>   {
2494
  public static class getLogisticsInfo_args implements TBase<getLogisticsInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLogisticsInfo_args>   {
2495
    private static final TStruct STRUCT_DESC = new TStruct("getLogisticsInfo_args");
2495
    private static final TStruct STRUCT_DESC = new TStruct("getLogisticsInfo_args");
2496
 
2496
 
2497
    private static final TField DESTINATION_PINCODE_FIELD_DESC = new TField("destination_pincode", TType.STRING, (short)1);
2497
    private static final TField DESTINATION_PINCODE_FIELD_DESC = new TField("destination_pincode", TType.STRING, (short)1);
2498
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.STRING, (short)2);
2498
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
2499
 
2499
 
2500
    private String destination_pincode;
2500
    private String destination_pincode;
2501
    private String item_id;
2501
    private long item_id;
2502
 
2502
 
2503
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2503
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2504
    public enum _Fields implements TFieldIdEnum {
2504
    public enum _Fields implements TFieldIdEnum {
2505
      DESTINATION_PINCODE((short)1, "destination_pincode"),
2505
      DESTINATION_PINCODE((short)1, "destination_pincode"),
2506
      ITEM_ID((short)2, "item_id");
2506
      ITEM_ID((short)2, "item_id");
Line 2555... Line 2555...
2555
        return _fieldName;
2555
        return _fieldName;
2556
      }
2556
      }
2557
    }
2557
    }
2558
 
2558
 
2559
    // isset id assignments
2559
    // isset id assignments
-
 
2560
    private static final int __ITEM_ID_ISSET_ID = 0;
-
 
2561
    private BitSet __isset_bit_vector = new BitSet(1);
2560
 
2562
 
2561
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2563
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2562
      put(_Fields.DESTINATION_PINCODE, new FieldMetaData("destination_pincode", TFieldRequirementType.DEFAULT, 
2564
      put(_Fields.DESTINATION_PINCODE, new FieldMetaData("destination_pincode", TFieldRequirementType.DEFAULT, 
2563
          new FieldValueMetaData(TType.STRING)));
2565
          new FieldValueMetaData(TType.STRING)));
2564
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
2566
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
2565
          new FieldValueMetaData(TType.STRING)));
2567
          new FieldValueMetaData(TType.I64)));
2566
    }});
2568
    }});
2567
 
2569
 
2568
    static {
2570
    static {
2569
      FieldMetaData.addStructMetaDataMap(getLogisticsInfo_args.class, metaDataMap);
2571
      FieldMetaData.addStructMetaDataMap(getLogisticsInfo_args.class, metaDataMap);
2570
    }
2572
    }
Line 2572... Line 2574...
2572
    public getLogisticsInfo_args() {
2574
    public getLogisticsInfo_args() {
2573
    }
2575
    }
2574
 
2576
 
2575
    public getLogisticsInfo_args(
2577
    public getLogisticsInfo_args(
2576
      String destination_pincode,
2578
      String destination_pincode,
2577
      String item_id)
2579
      long item_id)
2578
    {
2580
    {
2579
      this();
2581
      this();
2580
      this.destination_pincode = destination_pincode;
2582
      this.destination_pincode = destination_pincode;
2581
      this.item_id = item_id;
2583
      this.item_id = item_id;
-
 
2584
      setItem_idIsSet(true);
2582
    }
2585
    }
2583
 
2586
 
2584
    /**
2587
    /**
2585
     * Performs a deep copy on <i>other</i>.
2588
     * Performs a deep copy on <i>other</i>.
2586
     */
2589
     */
2587
    public getLogisticsInfo_args(getLogisticsInfo_args other) {
2590
    public getLogisticsInfo_args(getLogisticsInfo_args other) {
-
 
2591
      __isset_bit_vector.clear();
-
 
2592
      __isset_bit_vector.or(other.__isset_bit_vector);
2588
      if (other.isSetDestination_pincode()) {
2593
      if (other.isSetDestination_pincode()) {
2589
        this.destination_pincode = other.destination_pincode;
2594
        this.destination_pincode = other.destination_pincode;
2590
      }
2595
      }
2591
      if (other.isSetItem_id()) {
-
 
2592
        this.item_id = other.item_id;
2596
      this.item_id = other.item_id;
2593
      }
-
 
2594
    }
2597
    }
2595
 
2598
 
2596
    public getLogisticsInfo_args deepCopy() {
2599
    public getLogisticsInfo_args deepCopy() {
2597
      return new getLogisticsInfo_args(this);
2600
      return new getLogisticsInfo_args(this);
2598
    }
2601
    }
Line 2624... Line 2627...
2624
      if (!value) {
2627
      if (!value) {
2625
        this.destination_pincode = null;
2628
        this.destination_pincode = null;
2626
      }
2629
      }
2627
    }
2630
    }
2628
 
2631
 
2629
    public String getItem_id() {
2632
    public long getItem_id() {
2630
      return this.item_id;
2633
      return this.item_id;
2631
    }
2634
    }
2632
 
2635
 
2633
    public getLogisticsInfo_args setItem_id(String item_id) {
2636
    public getLogisticsInfo_args setItem_id(long item_id) {
2634
      this.item_id = item_id;
2637
      this.item_id = item_id;
-
 
2638
      setItem_idIsSet(true);
2635
      return this;
2639
      return this;
2636
    }
2640
    }
2637
 
2641
 
2638
    public void unsetItem_id() {
2642
    public void unsetItem_id() {
2639
      this.item_id = null;
2643
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
2640
    }
2644
    }
2641
 
2645
 
2642
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
2646
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
2643
    public boolean isSetItem_id() {
2647
    public boolean isSetItem_id() {
2644
      return this.item_id != null;
2648
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
2645
    }
2649
    }
2646
 
2650
 
2647
    public void setItem_idIsSet(boolean value) {
2651
    public void setItem_idIsSet(boolean value) {
2648
      if (!value) {
-
 
2649
        this.item_id = null;
2652
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
2650
      }
-
 
2651
    }
2653
    }
2652
 
2654
 
2653
    public void setFieldValue(_Fields field, Object value) {
2655
    public void setFieldValue(_Fields field, Object value) {
2654
      switch (field) {
2656
      switch (field) {
2655
      case DESTINATION_PINCODE:
2657
      case DESTINATION_PINCODE:
Line 2662... Line 2664...
2662
 
2664
 
2663
      case ITEM_ID:
2665
      case ITEM_ID:
2664
        if (value == null) {
2666
        if (value == null) {
2665
          unsetItem_id();
2667
          unsetItem_id();
2666
        } else {
2668
        } else {
2667
          setItem_id((String)value);
2669
          setItem_id((Long)value);
2668
        }
2670
        }
2669
        break;
2671
        break;
2670
 
2672
 
2671
      }
2673
      }
2672
    }
2674
    }
Line 2679... Line 2681...
2679
      switch (field) {
2681
      switch (field) {
2680
      case DESTINATION_PINCODE:
2682
      case DESTINATION_PINCODE:
2681
        return getDestination_pincode();
2683
        return getDestination_pincode();
2682
 
2684
 
2683
      case ITEM_ID:
2685
      case ITEM_ID:
2684
        return getItem_id();
2686
        return new Long(getItem_id());
2685
 
2687
 
2686
      }
2688
      }
2687
      throw new IllegalStateException();
2689
      throw new IllegalStateException();
2688
    }
2690
    }
2689
 
2691
 
Line 2726... Line 2728...
2726
          return false;
2728
          return false;
2727
        if (!this.destination_pincode.equals(that.destination_pincode))
2729
        if (!this.destination_pincode.equals(that.destination_pincode))
2728
          return false;
2730
          return false;
2729
      }
2731
      }
2730
 
2732
 
2731
      boolean this_present_item_id = true && this.isSetItem_id();
2733
      boolean this_present_item_id = true;
2732
      boolean that_present_item_id = true && that.isSetItem_id();
2734
      boolean that_present_item_id = true;
2733
      if (this_present_item_id || that_present_item_id) {
2735
      if (this_present_item_id || that_present_item_id) {
2734
        if (!(this_present_item_id && that_present_item_id))
2736
        if (!(this_present_item_id && that_present_item_id))
2735
          return false;
2737
          return false;
2736
        if (!this.item_id.equals(that.item_id))
2738
        if (this.item_id != that.item_id)
2737
          return false;
2739
          return false;
2738
      }
2740
      }
2739
 
2741
 
2740
      return true;
2742
      return true;
2741
    }
2743
    }
Line 2792... Line 2794...
2792
              } else { 
2794
              } else { 
2793
                TProtocolUtil.skip(iprot, field.type);
2795
                TProtocolUtil.skip(iprot, field.type);
2794
              }
2796
              }
2795
              break;
2797
              break;
2796
            case ITEM_ID:
2798
            case ITEM_ID:
2797
              if (field.type == TType.STRING) {
2799
              if (field.type == TType.I64) {
2798
                this.item_id = iprot.readString();
2800
                this.item_id = iprot.readI64();
-
 
2801
                setItem_idIsSet(true);
2799
              } else { 
2802
              } else { 
2800
                TProtocolUtil.skip(iprot, field.type);
2803
                TProtocolUtil.skip(iprot, field.type);
2801
              }
2804
              }
2802
              break;
2805
              break;
2803
          }
2806
          }
Line 2815... Line 2818...
2815
      if (this.destination_pincode != null) {
2818
      if (this.destination_pincode != null) {
2816
        oprot.writeFieldBegin(DESTINATION_PINCODE_FIELD_DESC);
2819
        oprot.writeFieldBegin(DESTINATION_PINCODE_FIELD_DESC);
2817
        oprot.writeString(this.destination_pincode);
2820
        oprot.writeString(this.destination_pincode);
2818
        oprot.writeFieldEnd();
2821
        oprot.writeFieldEnd();
2819
      }
2822
      }
2820
      if (this.item_id != null) {
-
 
2821
        oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
2823
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
2822
        oprot.writeString(this.item_id);
2824
      oprot.writeI64(this.item_id);
2823
        oprot.writeFieldEnd();
2825
      oprot.writeFieldEnd();
2824
      }
-
 
2825
      oprot.writeFieldStop();
2826
      oprot.writeFieldStop();
2826
      oprot.writeStructEnd();
2827
      oprot.writeStructEnd();
2827
    }
2828
    }
2828
 
2829
 
2829
    @Override
2830
    @Override
Line 2838... Line 2839...
2838
        sb.append(this.destination_pincode);
2839
        sb.append(this.destination_pincode);
2839
      }
2840
      }
2840
      first = false;
2841
      first = false;
2841
      if (!first) sb.append(", ");
2842
      if (!first) sb.append(", ");
2842
      sb.append("item_id:");
2843
      sb.append("item_id:");
2843
      if (this.item_id == null) {
-
 
2844
        sb.append("null");
-
 
2845
      } else {
-
 
2846
        sb.append(this.item_id);
2844
      sb.append(this.item_id);
2847
      }
-
 
2848
      first = false;
2845
      first = false;
2849
      sb.append(")");
2846
      sb.append(")");
2850
      return sb.toString();
2847
      return sb.toString();
2851
    }
2848
    }
2852
 
2849