Subversion Repositories SmartDukaan

Rev

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

Rev 1022 Rev 1114
Line 72... Line 72...
72
     * @param warehouseId
72
     * @param warehouseId
73
     * @param providerId
73
     * @param providerId
74
     */
74
     */
75
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
75
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
76
 
76
 
-
 
77
    /**
-
 
78
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
-
 
79
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
-
 
80
     * Raises an exception if we encounter report for an AWB number that we did not ship.
-
 
81
     * 
-
 
82
     * @param providerId
-
 
83
     * @param pickupDetails
-
 
84
     */
-
 
85
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TransactionServiceException, TException;
-
 
86
 
77
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
87
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
78
 
88
 
79
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
89
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
80
 
90
 
81
  }
91
  }
Line 802... Line 812...
802
        throw result.ex;
812
        throw result.ex;
803
      }
813
      }
804
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
814
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
805
    }
815
    }
806
 
816
 
-
 
817
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TransactionServiceException, TException
-
 
818
    {
-
 
819
      send_markOrdersAsPickedUp(providerId, pickupDetails);
-
 
820
      return recv_markOrdersAsPickedUp();
-
 
821
    }
-
 
822
 
-
 
823
    public void send_markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TException
-
 
824
    {
-
 
825
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
-
 
826
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
-
 
827
      args.providerId = providerId;
-
 
828
      args.pickupDetails = pickupDetails;
-
 
829
      args.write(oprot_);
-
 
830
      oprot_.writeMessageEnd();
-
 
831
      oprot_.getTransport().flush();
-
 
832
    }
-
 
833
 
-
 
834
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
-
 
835
    {
-
 
836
      TMessage msg = iprot_.readMessageBegin();
-
 
837
      if (msg.type == TMessageType.EXCEPTION) {
-
 
838
        TApplicationException x = TApplicationException.read(iprot_);
-
 
839
        iprot_.readMessageEnd();
-
 
840
        throw x;
-
 
841
      }
-
 
842
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
-
 
843
      result.read(iprot_);
-
 
844
      iprot_.readMessageEnd();
-
 
845
      if (result.isSetSuccess()) {
-
 
846
        return result.success;
-
 
847
      }
-
 
848
      if (result.ex != null) {
-
 
849
        throw result.ex;
-
 
850
      }
-
 
851
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
-
 
852
    }
-
 
853
 
807
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
854
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
808
    {
855
    {
809
      send_getAlerts(orderId, valid);
856
      send_getAlerts(orderId, valid);
810
      return recv_getAlerts();
857
      return recv_getAlerts();
811
    }
858
    }
Line 894... Line 941...
894
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
941
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
895
      processMap_.put("createOrder", new createOrder());
942
      processMap_.put("createOrder", new createOrder());
896
      processMap_.put("getOrder", new getOrder());
943
      processMap_.put("getOrder", new getOrder());
897
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
944
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
898
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
945
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
-
 
946
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
899
      processMap_.put("getAlerts", new getAlerts());
947
      processMap_.put("getAlerts", new getAlerts());
900
      processMap_.put("setAlert", new setAlert());
948
      processMap_.put("setAlert", new setAlert());
901
    }
949
    }
902
 
950
 
903
    protected static interface ProcessFunction {
951
    protected static interface ProcessFunction {
Line 1451... Line 1499...
1451
        oprot.getTransport().flush();
1499
        oprot.getTransport().flush();
1452
      }
1500
      }
1453
 
1501
 
1454
    }
1502
    }
1455
 
1503
 
-
 
1504
    private class markOrdersAsPickedUp implements ProcessFunction {
-
 
1505
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
1506
      {
-
 
1507
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
-
 
1508
        args.read(iprot);
-
 
1509
        iprot.readMessageEnd();
-
 
1510
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
-
 
1511
        try {
-
 
1512
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
-
 
1513
        } catch (TransactionServiceException ex) {
-
 
1514
          result.ex = ex;
-
 
1515
        } catch (Throwable th) {
-
 
1516
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
-
 
1517
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
-
 
1518
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
-
 
1519
          x.write(oprot);
-
 
1520
          oprot.writeMessageEnd();
-
 
1521
          oprot.getTransport().flush();
-
 
1522
          return;
-
 
1523
        }
-
 
1524
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
-
 
1525
        result.write(oprot);
-
 
1526
        oprot.writeMessageEnd();
-
 
1527
        oprot.getTransport().flush();
-
 
1528
      }
-
 
1529
 
-
 
1530
    }
-
 
1531
 
1456
    private class getAlerts implements ProcessFunction {
1532
    private class getAlerts implements ProcessFunction {
1457
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1533
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1458
      {
1534
      {
1459
        getAlerts_args args = new getAlerts_args();
1535
        getAlerts_args args = new getAlerts_args();
1460
        args.read(iprot);
1536
        args.read(iprot);
Line 15450... Line 15526...
15450
      // check for required fields
15526
      // check for required fields
15451
    }
15527
    }
15452
 
15528
 
15453
  }
15529
  }
15454
 
15530
 
-
 
15531
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
-
 
15532
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
-
 
15533
 
-
 
15534
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
-
 
15535
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
-
 
15536
 
-
 
15537
    private long providerId;
-
 
15538
    private Map<String,Long> pickupDetails;
-
 
15539
 
-
 
15540
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
15541
    public enum _Fields implements TFieldIdEnum {
-
 
15542
      PROVIDER_ID((short)1, "providerId"),
-
 
15543
      PICKUP_DETAILS((short)2, "pickupDetails");
-
 
15544
 
-
 
15545
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
15546
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
15547
 
-
 
15548
      static {
-
 
15549
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
15550
          byId.put((int)field._thriftId, field);
-
 
15551
          byName.put(field.getFieldName(), field);
-
 
15552
        }
-
 
15553
      }
-
 
15554
 
-
 
15555
      /**
-
 
15556
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
15557
       */
-
 
15558
      public static _Fields findByThriftId(int fieldId) {
-
 
15559
        return byId.get(fieldId);
-
 
15560
      }
-
 
15561
 
-
 
15562
      /**
-
 
15563
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
15564
       * if it is not found.
-
 
15565
       */
-
 
15566
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
15567
        _Fields fields = findByThriftId(fieldId);
-
 
15568
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
15569
        return fields;
-
 
15570
      }
-
 
15571
 
-
 
15572
      /**
-
 
15573
       * Find the _Fields constant that matches name, or null if its not found.
-
 
15574
       */
-
 
15575
      public static _Fields findByName(String name) {
-
 
15576
        return byName.get(name);
-
 
15577
      }
-
 
15578
 
-
 
15579
      private final short _thriftId;
-
 
15580
      private final String _fieldName;
-
 
15581
 
-
 
15582
      _Fields(short thriftId, String fieldName) {
-
 
15583
        _thriftId = thriftId;
-
 
15584
        _fieldName = fieldName;
-
 
15585
      }
-
 
15586
 
-
 
15587
      public short getThriftFieldId() {
-
 
15588
        return _thriftId;
-
 
15589
      }
-
 
15590
 
-
 
15591
      public String getFieldName() {
-
 
15592
        return _fieldName;
-
 
15593
      }
-
 
15594
    }
-
 
15595
 
-
 
15596
    // isset id assignments
-
 
15597
    private static final int __PROVIDERID_ISSET_ID = 0;
-
 
15598
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
15599
 
-
 
15600
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
15601
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
-
 
15602
          new FieldValueMetaData(TType.I64)));
-
 
15603
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
-
 
15604
          new MapMetaData(TType.MAP, 
-
 
15605
              new FieldValueMetaData(TType.STRING), 
-
 
15606
              new FieldValueMetaData(TType.I64))));
-
 
15607
    }});
-
 
15608
 
-
 
15609
    static {
-
 
15610
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
-
 
15611
    }
-
 
15612
 
-
 
15613
    public markOrdersAsPickedUp_args() {
-
 
15614
    }
-
 
15615
 
-
 
15616
    public markOrdersAsPickedUp_args(
-
 
15617
      long providerId,
-
 
15618
      Map<String,Long> pickupDetails)
-
 
15619
    {
-
 
15620
      this();
-
 
15621
      this.providerId = providerId;
-
 
15622
      setProviderIdIsSet(true);
-
 
15623
      this.pickupDetails = pickupDetails;
-
 
15624
    }
-
 
15625
 
-
 
15626
    /**
-
 
15627
     * Performs a deep copy on <i>other</i>.
-
 
15628
     */
-
 
15629
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
-
 
15630
      __isset_bit_vector.clear();
-
 
15631
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
15632
      this.providerId = other.providerId;
-
 
15633
      if (other.isSetPickupDetails()) {
-
 
15634
        Map<String,Long> __this__pickupDetails = new HashMap<String,Long>();
-
 
15635
        for (Map.Entry<String, Long> other_element : other.pickupDetails.entrySet()) {
-
 
15636
 
-
 
15637
          String other_element_key = other_element.getKey();
-
 
15638
          Long other_element_value = other_element.getValue();
-
 
15639
 
-
 
15640
          String __this__pickupDetails_copy_key = other_element_key;
-
 
15641
 
-
 
15642
          Long __this__pickupDetails_copy_value = other_element_value;
-
 
15643
 
-
 
15644
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
-
 
15645
        }
-
 
15646
        this.pickupDetails = __this__pickupDetails;
-
 
15647
      }
-
 
15648
    }
-
 
15649
 
-
 
15650
    public markOrdersAsPickedUp_args deepCopy() {
-
 
15651
      return new markOrdersAsPickedUp_args(this);
-
 
15652
    }
-
 
15653
 
-
 
15654
    @Deprecated
-
 
15655
    public markOrdersAsPickedUp_args clone() {
-
 
15656
      return new markOrdersAsPickedUp_args(this);
-
 
15657
    }
-
 
15658
 
-
 
15659
    public long getProviderId() {
-
 
15660
      return this.providerId;
-
 
15661
    }
-
 
15662
 
-
 
15663
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
-
 
15664
      this.providerId = providerId;
-
 
15665
      setProviderIdIsSet(true);
-
 
15666
      return this;
-
 
15667
    }
-
 
15668
 
-
 
15669
    public void unsetProviderId() {
-
 
15670
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
-
 
15671
    }
-
 
15672
 
-
 
15673
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
-
 
15674
    public boolean isSetProviderId() {
-
 
15675
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
-
 
15676
    }
-
 
15677
 
-
 
15678
    public void setProviderIdIsSet(boolean value) {
-
 
15679
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
-
 
15680
    }
-
 
15681
 
-
 
15682
    public int getPickupDetailsSize() {
-
 
15683
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
-
 
15684
    }
-
 
15685
 
-
 
15686
    public void putToPickupDetails(String key, long val) {
-
 
15687
      if (this.pickupDetails == null) {
-
 
15688
        this.pickupDetails = new HashMap<String,Long>();
-
 
15689
      }
-
 
15690
      this.pickupDetails.put(key, val);
-
 
15691
    }
-
 
15692
 
-
 
15693
    public Map<String,Long> getPickupDetails() {
-
 
15694
      return this.pickupDetails;
-
 
15695
    }
-
 
15696
 
-
 
15697
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,Long> pickupDetails) {
-
 
15698
      this.pickupDetails = pickupDetails;
-
 
15699
      return this;
-
 
15700
    }
-
 
15701
 
-
 
15702
    public void unsetPickupDetails() {
-
 
15703
      this.pickupDetails = null;
-
 
15704
    }
-
 
15705
 
-
 
15706
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
-
 
15707
    public boolean isSetPickupDetails() {
-
 
15708
      return this.pickupDetails != null;
-
 
15709
    }
-
 
15710
 
-
 
15711
    public void setPickupDetailsIsSet(boolean value) {
-
 
15712
      if (!value) {
-
 
15713
        this.pickupDetails = null;
-
 
15714
      }
-
 
15715
    }
-
 
15716
 
-
 
15717
    public void setFieldValue(_Fields field, Object value) {
-
 
15718
      switch (field) {
-
 
15719
      case PROVIDER_ID:
-
 
15720
        if (value == null) {
-
 
15721
          unsetProviderId();
-
 
15722
        } else {
-
 
15723
          setProviderId((Long)value);
-
 
15724
        }
-
 
15725
        break;
-
 
15726
 
-
 
15727
      case PICKUP_DETAILS:
-
 
15728
        if (value == null) {
-
 
15729
          unsetPickupDetails();
-
 
15730
        } else {
-
 
15731
          setPickupDetails((Map<String,Long>)value);
-
 
15732
        }
-
 
15733
        break;
-
 
15734
 
-
 
15735
      }
-
 
15736
    }
-
 
15737
 
-
 
15738
    public void setFieldValue(int fieldID, Object value) {
-
 
15739
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
15740
    }
-
 
15741
 
-
 
15742
    public Object getFieldValue(_Fields field) {
-
 
15743
      switch (field) {
-
 
15744
      case PROVIDER_ID:
-
 
15745
        return new Long(getProviderId());
-
 
15746
 
-
 
15747
      case PICKUP_DETAILS:
-
 
15748
        return getPickupDetails();
-
 
15749
 
-
 
15750
      }
-
 
15751
      throw new IllegalStateException();
-
 
15752
    }
-
 
15753
 
-
 
15754
    public Object getFieldValue(int fieldId) {
-
 
15755
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
15756
    }
-
 
15757
 
-
 
15758
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
15759
    public boolean isSet(_Fields field) {
-
 
15760
      switch (field) {
-
 
15761
      case PROVIDER_ID:
-
 
15762
        return isSetProviderId();
-
 
15763
      case PICKUP_DETAILS:
-
 
15764
        return isSetPickupDetails();
-
 
15765
      }
-
 
15766
      throw new IllegalStateException();
-
 
15767
    }
-
 
15768
 
-
 
15769
    public boolean isSet(int fieldID) {
-
 
15770
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
15771
    }
-
 
15772
 
-
 
15773
    @Override
-
 
15774
    public boolean equals(Object that) {
-
 
15775
      if (that == null)
-
 
15776
        return false;
-
 
15777
      if (that instanceof markOrdersAsPickedUp_args)
-
 
15778
        return this.equals((markOrdersAsPickedUp_args)that);
-
 
15779
      return false;
-
 
15780
    }
-
 
15781
 
-
 
15782
    public boolean equals(markOrdersAsPickedUp_args that) {
-
 
15783
      if (that == null)
-
 
15784
        return false;
-
 
15785
 
-
 
15786
      boolean this_present_providerId = true;
-
 
15787
      boolean that_present_providerId = true;
-
 
15788
      if (this_present_providerId || that_present_providerId) {
-
 
15789
        if (!(this_present_providerId && that_present_providerId))
-
 
15790
          return false;
-
 
15791
        if (this.providerId != that.providerId)
-
 
15792
          return false;
-
 
15793
      }
-
 
15794
 
-
 
15795
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
-
 
15796
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
-
 
15797
      if (this_present_pickupDetails || that_present_pickupDetails) {
-
 
15798
        if (!(this_present_pickupDetails && that_present_pickupDetails))
-
 
15799
          return false;
-
 
15800
        if (!this.pickupDetails.equals(that.pickupDetails))
-
 
15801
          return false;
-
 
15802
      }
-
 
15803
 
-
 
15804
      return true;
-
 
15805
    }
-
 
15806
 
-
 
15807
    @Override
-
 
15808
    public int hashCode() {
-
 
15809
      return 0;
-
 
15810
    }
-
 
15811
 
-
 
15812
    public void read(TProtocol iprot) throws TException {
-
 
15813
      TField field;
-
 
15814
      iprot.readStructBegin();
-
 
15815
      while (true)
-
 
15816
      {
-
 
15817
        field = iprot.readFieldBegin();
-
 
15818
        if (field.type == TType.STOP) { 
-
 
15819
          break;
-
 
15820
        }
-
 
15821
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
15822
        if (fieldId == null) {
-
 
15823
          TProtocolUtil.skip(iprot, field.type);
-
 
15824
        } else {
-
 
15825
          switch (fieldId) {
-
 
15826
            case PROVIDER_ID:
-
 
15827
              if (field.type == TType.I64) {
-
 
15828
                this.providerId = iprot.readI64();
-
 
15829
                setProviderIdIsSet(true);
-
 
15830
              } else { 
-
 
15831
                TProtocolUtil.skip(iprot, field.type);
-
 
15832
              }
-
 
15833
              break;
-
 
15834
            case PICKUP_DETAILS:
-
 
15835
              if (field.type == TType.MAP) {
-
 
15836
                {
-
 
15837
                  TMap _map36 = iprot.readMapBegin();
-
 
15838
                  this.pickupDetails = new HashMap<String,Long>(2*_map36.size);
-
 
15839
                  for (int _i37 = 0; _i37 < _map36.size; ++_i37)
-
 
15840
                  {
-
 
15841
                    String _key38;
-
 
15842
                    long _val39;
-
 
15843
                    _key38 = iprot.readString();
-
 
15844
                    _val39 = iprot.readI64();
-
 
15845
                    this.pickupDetails.put(_key38, _val39);
-
 
15846
                  }
-
 
15847
                  iprot.readMapEnd();
-
 
15848
                }
-
 
15849
              } else { 
-
 
15850
                TProtocolUtil.skip(iprot, field.type);
-
 
15851
              }
-
 
15852
              break;
-
 
15853
          }
-
 
15854
          iprot.readFieldEnd();
-
 
15855
        }
-
 
15856
      }
-
 
15857
      iprot.readStructEnd();
-
 
15858
      validate();
-
 
15859
    }
-
 
15860
 
-
 
15861
    public void write(TProtocol oprot) throws TException {
-
 
15862
      validate();
-
 
15863
 
-
 
15864
      oprot.writeStructBegin(STRUCT_DESC);
-
 
15865
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
-
 
15866
      oprot.writeI64(this.providerId);
-
 
15867
      oprot.writeFieldEnd();
-
 
15868
      if (this.pickupDetails != null) {
-
 
15869
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
-
 
15870
        {
-
 
15871
          oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.pickupDetails.size()));
-
 
15872
          for (Map.Entry<String, Long> _iter40 : this.pickupDetails.entrySet())
-
 
15873
          {
-
 
15874
            oprot.writeString(_iter40.getKey());
-
 
15875
            oprot.writeI64(_iter40.getValue());
-
 
15876
          }
-
 
15877
          oprot.writeMapEnd();
-
 
15878
        }
-
 
15879
        oprot.writeFieldEnd();
-
 
15880
      }
-
 
15881
      oprot.writeFieldStop();
-
 
15882
      oprot.writeStructEnd();
-
 
15883
    }
-
 
15884
 
-
 
15885
    @Override
-
 
15886
    public String toString() {
-
 
15887
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
-
 
15888
      boolean first = true;
-
 
15889
 
-
 
15890
      sb.append("providerId:");
-
 
15891
      sb.append(this.providerId);
-
 
15892
      first = false;
-
 
15893
      if (!first) sb.append(", ");
-
 
15894
      sb.append("pickupDetails:");
-
 
15895
      if (this.pickupDetails == null) {
-
 
15896
        sb.append("null");
-
 
15897
      } else {
-
 
15898
        sb.append(this.pickupDetails);
-
 
15899
      }
-
 
15900
      first = false;
-
 
15901
      sb.append(")");
-
 
15902
      return sb.toString();
-
 
15903
    }
-
 
15904
 
-
 
15905
    public void validate() throws TException {
-
 
15906
      // check for required fields
-
 
15907
    }
-
 
15908
 
-
 
15909
  }
-
 
15910
 
-
 
15911
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
-
 
15912
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
-
 
15913
 
-
 
15914
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
-
 
15915
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
-
 
15916
 
-
 
15917
    private List<Order> success;
-
 
15918
    private TransactionServiceException ex;
-
 
15919
 
-
 
15920
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
15921
    public enum _Fields implements TFieldIdEnum {
-
 
15922
      SUCCESS((short)0, "success"),
-
 
15923
      EX((short)1, "ex");
-
 
15924
 
-
 
15925
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
15926
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
15927
 
-
 
15928
      static {
-
 
15929
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
15930
          byId.put((int)field._thriftId, field);
-
 
15931
          byName.put(field.getFieldName(), field);
-
 
15932
        }
-
 
15933
      }
-
 
15934
 
-
 
15935
      /**
-
 
15936
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
15937
       */
-
 
15938
      public static _Fields findByThriftId(int fieldId) {
-
 
15939
        return byId.get(fieldId);
-
 
15940
      }
-
 
15941
 
-
 
15942
      /**
-
 
15943
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
15944
       * if it is not found.
-
 
15945
       */
-
 
15946
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
15947
        _Fields fields = findByThriftId(fieldId);
-
 
15948
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
15949
        return fields;
-
 
15950
      }
-
 
15951
 
-
 
15952
      /**
-
 
15953
       * Find the _Fields constant that matches name, or null if its not found.
-
 
15954
       */
-
 
15955
      public static _Fields findByName(String name) {
-
 
15956
        return byName.get(name);
-
 
15957
      }
-
 
15958
 
-
 
15959
      private final short _thriftId;
-
 
15960
      private final String _fieldName;
-
 
15961
 
-
 
15962
      _Fields(short thriftId, String fieldName) {
-
 
15963
        _thriftId = thriftId;
-
 
15964
        _fieldName = fieldName;
-
 
15965
      }
-
 
15966
 
-
 
15967
      public short getThriftFieldId() {
-
 
15968
        return _thriftId;
-
 
15969
      }
-
 
15970
 
-
 
15971
      public String getFieldName() {
-
 
15972
        return _fieldName;
-
 
15973
      }
-
 
15974
    }
-
 
15975
 
-
 
15976
    // isset id assignments
-
 
15977
 
-
 
15978
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
15979
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
15980
          new ListMetaData(TType.LIST, 
-
 
15981
              new StructMetaData(TType.STRUCT, Order.class))));
-
 
15982
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
-
 
15983
          new FieldValueMetaData(TType.STRUCT)));
-
 
15984
    }});
-
 
15985
 
-
 
15986
    static {
-
 
15987
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
-
 
15988
    }
-
 
15989
 
-
 
15990
    public markOrdersAsPickedUp_result() {
-
 
15991
    }
-
 
15992
 
-
 
15993
    public markOrdersAsPickedUp_result(
-
 
15994
      List<Order> success,
-
 
15995
      TransactionServiceException ex)
-
 
15996
    {
-
 
15997
      this();
-
 
15998
      this.success = success;
-
 
15999
      this.ex = ex;
-
 
16000
    }
-
 
16001
 
-
 
16002
    /**
-
 
16003
     * Performs a deep copy on <i>other</i>.
-
 
16004
     */
-
 
16005
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
-
 
16006
      if (other.isSetSuccess()) {
-
 
16007
        List<Order> __this__success = new ArrayList<Order>();
-
 
16008
        for (Order other_element : other.success) {
-
 
16009
          __this__success.add(new Order(other_element));
-
 
16010
        }
-
 
16011
        this.success = __this__success;
-
 
16012
      }
-
 
16013
      if (other.isSetEx()) {
-
 
16014
        this.ex = new TransactionServiceException(other.ex);
-
 
16015
      }
-
 
16016
    }
-
 
16017
 
-
 
16018
    public markOrdersAsPickedUp_result deepCopy() {
-
 
16019
      return new markOrdersAsPickedUp_result(this);
-
 
16020
    }
-
 
16021
 
-
 
16022
    @Deprecated
-
 
16023
    public markOrdersAsPickedUp_result clone() {
-
 
16024
      return new markOrdersAsPickedUp_result(this);
-
 
16025
    }
-
 
16026
 
-
 
16027
    public int getSuccessSize() {
-
 
16028
      return (this.success == null) ? 0 : this.success.size();
-
 
16029
    }
-
 
16030
 
-
 
16031
    public java.util.Iterator<Order> getSuccessIterator() {
-
 
16032
      return (this.success == null) ? null : this.success.iterator();
-
 
16033
    }
-
 
16034
 
-
 
16035
    public void addToSuccess(Order elem) {
-
 
16036
      if (this.success == null) {
-
 
16037
        this.success = new ArrayList<Order>();
-
 
16038
      }
-
 
16039
      this.success.add(elem);
-
 
16040
    }
-
 
16041
 
-
 
16042
    public List<Order> getSuccess() {
-
 
16043
      return this.success;
-
 
16044
    }
-
 
16045
 
-
 
16046
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
-
 
16047
      this.success = success;
-
 
16048
      return this;
-
 
16049
    }
-
 
16050
 
-
 
16051
    public void unsetSuccess() {
-
 
16052
      this.success = null;
-
 
16053
    }
-
 
16054
 
-
 
16055
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
16056
    public boolean isSetSuccess() {
-
 
16057
      return this.success != null;
-
 
16058
    }
-
 
16059
 
-
 
16060
    public void setSuccessIsSet(boolean value) {
-
 
16061
      if (!value) {
-
 
16062
        this.success = null;
-
 
16063
      }
-
 
16064
    }
-
 
16065
 
-
 
16066
    public TransactionServiceException getEx() {
-
 
16067
      return this.ex;
-
 
16068
    }
-
 
16069
 
-
 
16070
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
-
 
16071
      this.ex = ex;
-
 
16072
      return this;
-
 
16073
    }
-
 
16074
 
-
 
16075
    public void unsetEx() {
-
 
16076
      this.ex = null;
-
 
16077
    }
-
 
16078
 
-
 
16079
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
-
 
16080
    public boolean isSetEx() {
-
 
16081
      return this.ex != null;
-
 
16082
    }
-
 
16083
 
-
 
16084
    public void setExIsSet(boolean value) {
-
 
16085
      if (!value) {
-
 
16086
        this.ex = null;
-
 
16087
      }
-
 
16088
    }
-
 
16089
 
-
 
16090
    public void setFieldValue(_Fields field, Object value) {
-
 
16091
      switch (field) {
-
 
16092
      case SUCCESS:
-
 
16093
        if (value == null) {
-
 
16094
          unsetSuccess();
-
 
16095
        } else {
-
 
16096
          setSuccess((List<Order>)value);
-
 
16097
        }
-
 
16098
        break;
-
 
16099
 
-
 
16100
      case EX:
-
 
16101
        if (value == null) {
-
 
16102
          unsetEx();
-
 
16103
        } else {
-
 
16104
          setEx((TransactionServiceException)value);
-
 
16105
        }
-
 
16106
        break;
-
 
16107
 
-
 
16108
      }
-
 
16109
    }
-
 
16110
 
-
 
16111
    public void setFieldValue(int fieldID, Object value) {
-
 
16112
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
16113
    }
-
 
16114
 
-
 
16115
    public Object getFieldValue(_Fields field) {
-
 
16116
      switch (field) {
-
 
16117
      case SUCCESS:
-
 
16118
        return getSuccess();
-
 
16119
 
-
 
16120
      case EX:
-
 
16121
        return getEx();
-
 
16122
 
-
 
16123
      }
-
 
16124
      throw new IllegalStateException();
-
 
16125
    }
-
 
16126
 
-
 
16127
    public Object getFieldValue(int fieldId) {
-
 
16128
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
16129
    }
-
 
16130
 
-
 
16131
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
16132
    public boolean isSet(_Fields field) {
-
 
16133
      switch (field) {
-
 
16134
      case SUCCESS:
-
 
16135
        return isSetSuccess();
-
 
16136
      case EX:
-
 
16137
        return isSetEx();
-
 
16138
      }
-
 
16139
      throw new IllegalStateException();
-
 
16140
    }
-
 
16141
 
-
 
16142
    public boolean isSet(int fieldID) {
-
 
16143
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
16144
    }
-
 
16145
 
-
 
16146
    @Override
-
 
16147
    public boolean equals(Object that) {
-
 
16148
      if (that == null)
-
 
16149
        return false;
-
 
16150
      if (that instanceof markOrdersAsPickedUp_result)
-
 
16151
        return this.equals((markOrdersAsPickedUp_result)that);
-
 
16152
      return false;
-
 
16153
    }
-
 
16154
 
-
 
16155
    public boolean equals(markOrdersAsPickedUp_result that) {
-
 
16156
      if (that == null)
-
 
16157
        return false;
-
 
16158
 
-
 
16159
      boolean this_present_success = true && this.isSetSuccess();
-
 
16160
      boolean that_present_success = true && that.isSetSuccess();
-
 
16161
      if (this_present_success || that_present_success) {
-
 
16162
        if (!(this_present_success && that_present_success))
-
 
16163
          return false;
-
 
16164
        if (!this.success.equals(that.success))
-
 
16165
          return false;
-
 
16166
      }
-
 
16167
 
-
 
16168
      boolean this_present_ex = true && this.isSetEx();
-
 
16169
      boolean that_present_ex = true && that.isSetEx();
-
 
16170
      if (this_present_ex || that_present_ex) {
-
 
16171
        if (!(this_present_ex && that_present_ex))
-
 
16172
          return false;
-
 
16173
        if (!this.ex.equals(that.ex))
-
 
16174
          return false;
-
 
16175
      }
-
 
16176
 
-
 
16177
      return true;
-
 
16178
    }
-
 
16179
 
-
 
16180
    @Override
-
 
16181
    public int hashCode() {
-
 
16182
      return 0;
-
 
16183
    }
-
 
16184
 
-
 
16185
    public int compareTo(markOrdersAsPickedUp_result other) {
-
 
16186
      if (!getClass().equals(other.getClass())) {
-
 
16187
        return getClass().getName().compareTo(other.getClass().getName());
-
 
16188
      }
-
 
16189
 
-
 
16190
      int lastComparison = 0;
-
 
16191
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
-
 
16192
 
-
 
16193
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
16194
      if (lastComparison != 0) {
-
 
16195
        return lastComparison;
-
 
16196
      }
-
 
16197
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
16198
      if (lastComparison != 0) {
-
 
16199
        return lastComparison;
-
 
16200
      }
-
 
16201
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
-
 
16202
      if (lastComparison != 0) {
-
 
16203
        return lastComparison;
-
 
16204
      }
-
 
16205
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
-
 
16206
      if (lastComparison != 0) {
-
 
16207
        return lastComparison;
-
 
16208
      }
-
 
16209
      return 0;
-
 
16210
    }
-
 
16211
 
-
 
16212
    public void read(TProtocol iprot) throws TException {
-
 
16213
      TField field;
-
 
16214
      iprot.readStructBegin();
-
 
16215
      while (true)
-
 
16216
      {
-
 
16217
        field = iprot.readFieldBegin();
-
 
16218
        if (field.type == TType.STOP) { 
-
 
16219
          break;
-
 
16220
        }
-
 
16221
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
16222
        if (fieldId == null) {
-
 
16223
          TProtocolUtil.skip(iprot, field.type);
-
 
16224
        } else {
-
 
16225
          switch (fieldId) {
-
 
16226
            case SUCCESS:
-
 
16227
              if (field.type == TType.LIST) {
-
 
16228
                {
-
 
16229
                  TList _list41 = iprot.readListBegin();
-
 
16230
                  this.success = new ArrayList<Order>(_list41.size);
-
 
16231
                  for (int _i42 = 0; _i42 < _list41.size; ++_i42)
-
 
16232
                  {
-
 
16233
                    Order _elem43;
-
 
16234
                    _elem43 = new Order();
-
 
16235
                    _elem43.read(iprot);
-
 
16236
                    this.success.add(_elem43);
-
 
16237
                  }
-
 
16238
                  iprot.readListEnd();
-
 
16239
                }
-
 
16240
              } else { 
-
 
16241
                TProtocolUtil.skip(iprot, field.type);
-
 
16242
              }
-
 
16243
              break;
-
 
16244
            case EX:
-
 
16245
              if (field.type == TType.STRUCT) {
-
 
16246
                this.ex = new TransactionServiceException();
-
 
16247
                this.ex.read(iprot);
-
 
16248
              } else { 
-
 
16249
                TProtocolUtil.skip(iprot, field.type);
-
 
16250
              }
-
 
16251
              break;
-
 
16252
          }
-
 
16253
          iprot.readFieldEnd();
-
 
16254
        }
-
 
16255
      }
-
 
16256
      iprot.readStructEnd();
-
 
16257
      validate();
-
 
16258
    }
-
 
16259
 
-
 
16260
    public void write(TProtocol oprot) throws TException {
-
 
16261
      oprot.writeStructBegin(STRUCT_DESC);
-
 
16262
 
-
 
16263
      if (this.isSetSuccess()) {
-
 
16264
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
16265
        {
-
 
16266
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
-
 
16267
          for (Order _iter44 : this.success)
-
 
16268
          {
-
 
16269
            _iter44.write(oprot);
-
 
16270
          }
-
 
16271
          oprot.writeListEnd();
-
 
16272
        }
-
 
16273
        oprot.writeFieldEnd();
-
 
16274
      } else if (this.isSetEx()) {
-
 
16275
        oprot.writeFieldBegin(EX_FIELD_DESC);
-
 
16276
        this.ex.write(oprot);
-
 
16277
        oprot.writeFieldEnd();
-
 
16278
      }
-
 
16279
      oprot.writeFieldStop();
-
 
16280
      oprot.writeStructEnd();
-
 
16281
    }
-
 
16282
 
-
 
16283
    @Override
-
 
16284
    public String toString() {
-
 
16285
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
-
 
16286
      boolean first = true;
-
 
16287
 
-
 
16288
      sb.append("success:");
-
 
16289
      if (this.success == null) {
-
 
16290
        sb.append("null");
-
 
16291
      } else {
-
 
16292
        sb.append(this.success);
-
 
16293
      }
-
 
16294
      first = false;
-
 
16295
      if (!first) sb.append(", ");
-
 
16296
      sb.append("ex:");
-
 
16297
      if (this.ex == null) {
-
 
16298
        sb.append("null");
-
 
16299
      } else {
-
 
16300
        sb.append(this.ex);
-
 
16301
      }
-
 
16302
      first = false;
-
 
16303
      sb.append(")");
-
 
16304
      return sb.toString();
-
 
16305
    }
-
 
16306
 
-
 
16307
    public void validate() throws TException {
-
 
16308
      // check for required fields
-
 
16309
    }
-
 
16310
 
-
 
16311
  }
-
 
16312
 
15455
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
16313
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
15456
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
16314
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
15457
 
16315
 
15458
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
16316
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
15459
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
16317
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
Line 16060... Line 16918...
16060
        } else {
16918
        } else {
16061
          switch (fieldId) {
16919
          switch (fieldId) {
16062
            case SUCCESS:
16920
            case SUCCESS:
16063
              if (field.type == TType.LIST) {
16921
              if (field.type == TType.LIST) {
16064
                {
16922
                {
16065
                  TList _list36 = iprot.readListBegin();
16923
                  TList _list45 = iprot.readListBegin();
16066
                  this.success = new ArrayList<Alert>(_list36.size);
16924
                  this.success = new ArrayList<Alert>(_list45.size);
16067
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
16925
                  for (int _i46 = 0; _i46 < _list45.size; ++_i46)
16068
                  {
16926
                  {
16069
                    Alert _elem38;
16927
                    Alert _elem47;
16070
                    _elem38 = new Alert();
16928
                    _elem47 = new Alert();
16071
                    _elem38.read(iprot);
16929
                    _elem47.read(iprot);
16072
                    this.success.add(_elem38);
16930
                    this.success.add(_elem47);
16073
                  }
16931
                  }
16074
                  iprot.readListEnd();
16932
                  iprot.readListEnd();
16075
                }
16933
                }
16076
              } else { 
16934
              } else { 
16077
                TProtocolUtil.skip(iprot, field.type);
16935
                TProtocolUtil.skip(iprot, field.type);
Line 16090... Line 16948...
16090
 
16948
 
16091
      if (this.isSetSuccess()) {
16949
      if (this.isSetSuccess()) {
16092
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16950
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16093
        {
16951
        {
16094
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
16952
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
16095
          for (Alert _iter39 : this.success)
16953
          for (Alert _iter48 : this.success)
16096
          {
16954
          {
16097
            _iter39.write(oprot);
16955
            _iter48.write(oprot);
16098
          }
16956
          }
16099
          oprot.writeListEnd();
16957
          oprot.writeListEnd();
16100
        }
16958
        }
16101
        oprot.writeFieldEnd();
16959
        oprot.writeFieldEnd();
16102
      }
16960
      }