Subversion Repositories SmartDukaan

Rev

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

Rev 2700 Rev 2765
Line 257... Line 257...
257
     * @param pickupNumber
257
     * @param pickupNumber
258
     */
258
     */
259
    public boolean authorizePickup(long orderId, String pickupNumber) throws TransactionServiceException, TException;
259
    public boolean authorizePickup(long orderId, String pickupNumber) throws TransactionServiceException, TException;
260
 
260
 
261
    /**
261
    /**
-
 
262
     * Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
-
 
263
     * Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
-
 
264
     * 
-
 
265
     * @param providerId
-
 
266
     * @param pickupDetails
-
 
267
     */
-
 
268
    public List<Order> markDoasAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException;
-
 
269
 
-
 
270
    /**
262
     * If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
271
     * If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
263
     * If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
272
     * If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
264
     * If the order is in any other state, it returns false.
273
     * If the order is in any other state, it returns false.
265
     * Throws an exception if the order with the given id couldn't be found.
274
     * Throws an exception if the order with the given id couldn't be found.
266
     * 
275
     * 
Line 1798... Line 1807...
1798
        throw result.ex;
1807
        throw result.ex;
1799
      }
1808
      }
1800
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
1809
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
1801
    }
1810
    }
1802
 
1811
 
-
 
1812
    public List<Order> markDoasAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
-
 
1813
    {
-
 
1814
      send_markDoasAsPickedUp(providerId, pickupDetails);
-
 
1815
      return recv_markDoasAsPickedUp();
-
 
1816
    }
-
 
1817
 
-
 
1818
    public void send_markDoasAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
-
 
1819
    {
-
 
1820
      oprot_.writeMessageBegin(new TMessage("markDoasAsPickedUp", TMessageType.CALL, seqid_));
-
 
1821
      markDoasAsPickedUp_args args = new markDoasAsPickedUp_args();
-
 
1822
      args.providerId = providerId;
-
 
1823
      args.pickupDetails = pickupDetails;
-
 
1824
      args.write(oprot_);
-
 
1825
      oprot_.writeMessageEnd();
-
 
1826
      oprot_.getTransport().flush();
-
 
1827
    }
-
 
1828
 
-
 
1829
    public List<Order> recv_markDoasAsPickedUp() throws TException
-
 
1830
    {
-
 
1831
      TMessage msg = iprot_.readMessageBegin();
-
 
1832
      if (msg.type == TMessageType.EXCEPTION) {
-
 
1833
        TApplicationException x = TApplicationException.read(iprot_);
-
 
1834
        iprot_.readMessageEnd();
-
 
1835
        throw x;
-
 
1836
      }
-
 
1837
      markDoasAsPickedUp_result result = new markDoasAsPickedUp_result();
-
 
1838
      result.read(iprot_);
-
 
1839
      iprot_.readMessageEnd();
-
 
1840
      if (result.isSetSuccess()) {
-
 
1841
        return result.success;
-
 
1842
      }
-
 
1843
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markDoasAsPickedUp failed: unknown result");
-
 
1844
    }
-
 
1845
 
1803
    public boolean receiveReturn(long orderId) throws TransactionServiceException, TException
1846
    public boolean receiveReturn(long orderId) throws TransactionServiceException, TException
1804
    {
1847
    {
1805
      send_receiveReturn(orderId);
1848
      send_receiveReturn(orderId);
1806
      return recv_receiveReturn();
1849
      return recv_receiveReturn();
1807
    }
1850
    }
Line 2093... Line 2136...
2093
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
2136
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
2094
      processMap_.put("getValidOrders", new getValidOrders());
2137
      processMap_.put("getValidOrders", new getValidOrders());
2095
      processMap_.put("toggleDOAFlag", new toggleDOAFlag());
2138
      processMap_.put("toggleDOAFlag", new toggleDOAFlag());
2096
      processMap_.put("requestPickupNumber", new requestPickupNumber());
2139
      processMap_.put("requestPickupNumber", new requestPickupNumber());
2097
      processMap_.put("authorizePickup", new authorizePickup());
2140
      processMap_.put("authorizePickup", new authorizePickup());
-
 
2141
      processMap_.put("markDoasAsPickedUp", new markDoasAsPickedUp());
2098
      processMap_.put("receiveReturn", new receiveReturn());
2142
      processMap_.put("receiveReturn", new receiveReturn());
2099
      processMap_.put("validateDoa", new validateDoa());
2143
      processMap_.put("validateDoa", new validateDoa());
2100
      processMap_.put("reshipOrder", new reshipOrder());
2144
      processMap_.put("reshipOrder", new reshipOrder());
2101
      processMap_.put("refundOrder", new refundOrder());
2145
      processMap_.put("refundOrder", new refundOrder());
2102
      processMap_.put("getReturnOrders", new getReturnOrders());
2146
      processMap_.put("getReturnOrders", new getReturnOrders());
Line 3167... Line 3211...
3167
        oprot.getTransport().flush();
3211
        oprot.getTransport().flush();
3168
      }
3212
      }
3169
 
3213
 
3170
    }
3214
    }
3171
 
3215
 
-
 
3216
    private class markDoasAsPickedUp implements ProcessFunction {
-
 
3217
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
3218
      {
-
 
3219
        markDoasAsPickedUp_args args = new markDoasAsPickedUp_args();
-
 
3220
        args.read(iprot);
-
 
3221
        iprot.readMessageEnd();
-
 
3222
        markDoasAsPickedUp_result result = new markDoasAsPickedUp_result();
-
 
3223
        result.success = iface_.markDoasAsPickedUp(args.providerId, args.pickupDetails);
-
 
3224
        oprot.writeMessageBegin(new TMessage("markDoasAsPickedUp", TMessageType.REPLY, seqid));
-
 
3225
        result.write(oprot);
-
 
3226
        oprot.writeMessageEnd();
-
 
3227
        oprot.getTransport().flush();
-
 
3228
      }
-
 
3229
 
-
 
3230
    }
-
 
3231
 
3172
    private class receiveReturn implements ProcessFunction {
3232
    private class receiveReturn implements ProcessFunction {
3173
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3233
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3174
      {
3234
      {
3175
        receiveReturn_args args = new receiveReturn_args();
3235
        receiveReturn_args args = new receiveReturn_args();
3176
        args.read(iprot);
3236
        args.read(iprot);
Line 31110... Line 31170...
31110
      // check for required fields
31170
      // check for required fields
31111
    }
31171
    }
31112
 
31172
 
31113
  }
31173
  }
31114
 
31174
 
-
 
31175
  public static class markDoasAsPickedUp_args implements TBase<markDoasAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
-
 
31176
    private static final TStruct STRUCT_DESC = new TStruct("markDoasAsPickedUp_args");
-
 
31177
 
-
 
31178
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
-
 
31179
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
-
 
31180
 
-
 
31181
    private long providerId;
-
 
31182
    private Map<String,String> pickupDetails;
-
 
31183
 
-
 
31184
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
31185
    public enum _Fields implements TFieldIdEnum {
-
 
31186
      PROVIDER_ID((short)1, "providerId"),
-
 
31187
      PICKUP_DETAILS((short)2, "pickupDetails");
-
 
31188
 
-
 
31189
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
31190
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
31191
 
-
 
31192
      static {
-
 
31193
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
31194
          byId.put((int)field._thriftId, field);
-
 
31195
          byName.put(field.getFieldName(), field);
-
 
31196
        }
-
 
31197
      }
-
 
31198
 
-
 
31199
      /**
-
 
31200
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
31201
       */
-
 
31202
      public static _Fields findByThriftId(int fieldId) {
-
 
31203
        return byId.get(fieldId);
-
 
31204
      }
-
 
31205
 
-
 
31206
      /**
-
 
31207
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
31208
       * if it is not found.
-
 
31209
       */
-
 
31210
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
31211
        _Fields fields = findByThriftId(fieldId);
-
 
31212
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
31213
        return fields;
-
 
31214
      }
-
 
31215
 
-
 
31216
      /**
-
 
31217
       * Find the _Fields constant that matches name, or null if its not found.
-
 
31218
       */
-
 
31219
      public static _Fields findByName(String name) {
-
 
31220
        return byName.get(name);
-
 
31221
      }
-
 
31222
 
-
 
31223
      private final short _thriftId;
-
 
31224
      private final String _fieldName;
-
 
31225
 
-
 
31226
      _Fields(short thriftId, String fieldName) {
-
 
31227
        _thriftId = thriftId;
-
 
31228
        _fieldName = fieldName;
-
 
31229
      }
-
 
31230
 
-
 
31231
      public short getThriftFieldId() {
-
 
31232
        return _thriftId;
-
 
31233
      }
-
 
31234
 
-
 
31235
      public String getFieldName() {
-
 
31236
        return _fieldName;
-
 
31237
      }
-
 
31238
    }
-
 
31239
 
-
 
31240
    // isset id assignments
-
 
31241
    private static final int __PROVIDERID_ISSET_ID = 0;
-
 
31242
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
31243
 
-
 
31244
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
31245
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
-
 
31246
          new FieldValueMetaData(TType.I64)));
-
 
31247
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
-
 
31248
          new MapMetaData(TType.MAP, 
-
 
31249
              new FieldValueMetaData(TType.STRING), 
-
 
31250
              new FieldValueMetaData(TType.STRING))));
-
 
31251
    }});
-
 
31252
 
-
 
31253
    static {
-
 
31254
      FieldMetaData.addStructMetaDataMap(markDoasAsPickedUp_args.class, metaDataMap);
-
 
31255
    }
-
 
31256
 
-
 
31257
    public markDoasAsPickedUp_args() {
-
 
31258
    }
-
 
31259
 
-
 
31260
    public markDoasAsPickedUp_args(
-
 
31261
      long providerId,
-
 
31262
      Map<String,String> pickupDetails)
-
 
31263
    {
-
 
31264
      this();
-
 
31265
      this.providerId = providerId;
-
 
31266
      setProviderIdIsSet(true);
-
 
31267
      this.pickupDetails = pickupDetails;
-
 
31268
    }
-
 
31269
 
-
 
31270
    /**
-
 
31271
     * Performs a deep copy on <i>other</i>.
-
 
31272
     */
-
 
31273
    public markDoasAsPickedUp_args(markDoasAsPickedUp_args other) {
-
 
31274
      __isset_bit_vector.clear();
-
 
31275
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
31276
      this.providerId = other.providerId;
-
 
31277
      if (other.isSetPickupDetails()) {
-
 
31278
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
-
 
31279
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
-
 
31280
 
-
 
31281
          String other_element_key = other_element.getKey();
-
 
31282
          String other_element_value = other_element.getValue();
-
 
31283
 
-
 
31284
          String __this__pickupDetails_copy_key = other_element_key;
-
 
31285
 
-
 
31286
          String __this__pickupDetails_copy_value = other_element_value;
-
 
31287
 
-
 
31288
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
-
 
31289
        }
-
 
31290
        this.pickupDetails = __this__pickupDetails;
-
 
31291
      }
-
 
31292
    }
-
 
31293
 
-
 
31294
    public markDoasAsPickedUp_args deepCopy() {
-
 
31295
      return new markDoasAsPickedUp_args(this);
-
 
31296
    }
-
 
31297
 
-
 
31298
    @Deprecated
-
 
31299
    public markDoasAsPickedUp_args clone() {
-
 
31300
      return new markDoasAsPickedUp_args(this);
-
 
31301
    }
-
 
31302
 
-
 
31303
    public long getProviderId() {
-
 
31304
      return this.providerId;
-
 
31305
    }
-
 
31306
 
-
 
31307
    public markDoasAsPickedUp_args setProviderId(long providerId) {
-
 
31308
      this.providerId = providerId;
-
 
31309
      setProviderIdIsSet(true);
-
 
31310
      return this;
-
 
31311
    }
-
 
31312
 
-
 
31313
    public void unsetProviderId() {
-
 
31314
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
-
 
31315
    }
-
 
31316
 
-
 
31317
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
-
 
31318
    public boolean isSetProviderId() {
-
 
31319
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
-
 
31320
    }
-
 
31321
 
-
 
31322
    public void setProviderIdIsSet(boolean value) {
-
 
31323
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
-
 
31324
    }
-
 
31325
 
-
 
31326
    public int getPickupDetailsSize() {
-
 
31327
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
-
 
31328
    }
-
 
31329
 
-
 
31330
    public void putToPickupDetails(String key, String val) {
-
 
31331
      if (this.pickupDetails == null) {
-
 
31332
        this.pickupDetails = new HashMap<String,String>();
-
 
31333
      }
-
 
31334
      this.pickupDetails.put(key, val);
-
 
31335
    }
-
 
31336
 
-
 
31337
    public Map<String,String> getPickupDetails() {
-
 
31338
      return this.pickupDetails;
-
 
31339
    }
-
 
31340
 
-
 
31341
    public markDoasAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
-
 
31342
      this.pickupDetails = pickupDetails;
-
 
31343
      return this;
-
 
31344
    }
-
 
31345
 
-
 
31346
    public void unsetPickupDetails() {
-
 
31347
      this.pickupDetails = null;
-
 
31348
    }
-
 
31349
 
-
 
31350
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
-
 
31351
    public boolean isSetPickupDetails() {
-
 
31352
      return this.pickupDetails != null;
-
 
31353
    }
-
 
31354
 
-
 
31355
    public void setPickupDetailsIsSet(boolean value) {
-
 
31356
      if (!value) {
-
 
31357
        this.pickupDetails = null;
-
 
31358
      }
-
 
31359
    }
-
 
31360
 
-
 
31361
    public void setFieldValue(_Fields field, Object value) {
-
 
31362
      switch (field) {
-
 
31363
      case PROVIDER_ID:
-
 
31364
        if (value == null) {
-
 
31365
          unsetProviderId();
-
 
31366
        } else {
-
 
31367
          setProviderId((Long)value);
-
 
31368
        }
-
 
31369
        break;
-
 
31370
 
-
 
31371
      case PICKUP_DETAILS:
-
 
31372
        if (value == null) {
-
 
31373
          unsetPickupDetails();
-
 
31374
        } else {
-
 
31375
          setPickupDetails((Map<String,String>)value);
-
 
31376
        }
-
 
31377
        break;
-
 
31378
 
-
 
31379
      }
-
 
31380
    }
-
 
31381
 
-
 
31382
    public void setFieldValue(int fieldID, Object value) {
-
 
31383
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
31384
    }
-
 
31385
 
-
 
31386
    public Object getFieldValue(_Fields field) {
-
 
31387
      switch (field) {
-
 
31388
      case PROVIDER_ID:
-
 
31389
        return new Long(getProviderId());
-
 
31390
 
-
 
31391
      case PICKUP_DETAILS:
-
 
31392
        return getPickupDetails();
-
 
31393
 
-
 
31394
      }
-
 
31395
      throw new IllegalStateException();
-
 
31396
    }
-
 
31397
 
-
 
31398
    public Object getFieldValue(int fieldId) {
-
 
31399
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
31400
    }
-
 
31401
 
-
 
31402
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
31403
    public boolean isSet(_Fields field) {
-
 
31404
      switch (field) {
-
 
31405
      case PROVIDER_ID:
-
 
31406
        return isSetProviderId();
-
 
31407
      case PICKUP_DETAILS:
-
 
31408
        return isSetPickupDetails();
-
 
31409
      }
-
 
31410
      throw new IllegalStateException();
-
 
31411
    }
-
 
31412
 
-
 
31413
    public boolean isSet(int fieldID) {
-
 
31414
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
31415
    }
-
 
31416
 
-
 
31417
    @Override
-
 
31418
    public boolean equals(Object that) {
-
 
31419
      if (that == null)
-
 
31420
        return false;
-
 
31421
      if (that instanceof markDoasAsPickedUp_args)
-
 
31422
        return this.equals((markDoasAsPickedUp_args)that);
-
 
31423
      return false;
-
 
31424
    }
-
 
31425
 
-
 
31426
    public boolean equals(markDoasAsPickedUp_args that) {
-
 
31427
      if (that == null)
-
 
31428
        return false;
-
 
31429
 
-
 
31430
      boolean this_present_providerId = true;
-
 
31431
      boolean that_present_providerId = true;
-
 
31432
      if (this_present_providerId || that_present_providerId) {
-
 
31433
        if (!(this_present_providerId && that_present_providerId))
-
 
31434
          return false;
-
 
31435
        if (this.providerId != that.providerId)
-
 
31436
          return false;
-
 
31437
      }
-
 
31438
 
-
 
31439
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
-
 
31440
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
-
 
31441
      if (this_present_pickupDetails || that_present_pickupDetails) {
-
 
31442
        if (!(this_present_pickupDetails && that_present_pickupDetails))
-
 
31443
          return false;
-
 
31444
        if (!this.pickupDetails.equals(that.pickupDetails))
-
 
31445
          return false;
-
 
31446
      }
-
 
31447
 
-
 
31448
      return true;
-
 
31449
    }
-
 
31450
 
-
 
31451
    @Override
-
 
31452
    public int hashCode() {
-
 
31453
      return 0;
-
 
31454
    }
-
 
31455
 
-
 
31456
    public void read(TProtocol iprot) throws TException {
-
 
31457
      TField field;
-
 
31458
      iprot.readStructBegin();
-
 
31459
      while (true)
-
 
31460
      {
-
 
31461
        field = iprot.readFieldBegin();
-
 
31462
        if (field.type == TType.STOP) { 
-
 
31463
          break;
-
 
31464
        }
-
 
31465
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
31466
        if (fieldId == null) {
-
 
31467
          TProtocolUtil.skip(iprot, field.type);
-
 
31468
        } else {
-
 
31469
          switch (fieldId) {
-
 
31470
            case PROVIDER_ID:
-
 
31471
              if (field.type == TType.I64) {
-
 
31472
                this.providerId = iprot.readI64();
-
 
31473
                setProviderIdIsSet(true);
-
 
31474
              } else { 
-
 
31475
                TProtocolUtil.skip(iprot, field.type);
-
 
31476
              }
-
 
31477
              break;
-
 
31478
            case PICKUP_DETAILS:
-
 
31479
              if (field.type == TType.MAP) {
-
 
31480
                {
-
 
31481
                  TMap _map88 = iprot.readMapBegin();
-
 
31482
                  this.pickupDetails = new HashMap<String,String>(2*_map88.size);
-
 
31483
                  for (int _i89 = 0; _i89 < _map88.size; ++_i89)
-
 
31484
                  {
-
 
31485
                    String _key90;
-
 
31486
                    String _val91;
-
 
31487
                    _key90 = iprot.readString();
-
 
31488
                    _val91 = iprot.readString();
-
 
31489
                    this.pickupDetails.put(_key90, _val91);
-
 
31490
                  }
-
 
31491
                  iprot.readMapEnd();
-
 
31492
                }
-
 
31493
              } else { 
-
 
31494
                TProtocolUtil.skip(iprot, field.type);
-
 
31495
              }
-
 
31496
              break;
-
 
31497
          }
-
 
31498
          iprot.readFieldEnd();
-
 
31499
        }
-
 
31500
      }
-
 
31501
      iprot.readStructEnd();
-
 
31502
      validate();
-
 
31503
    }
-
 
31504
 
-
 
31505
    public void write(TProtocol oprot) throws TException {
-
 
31506
      validate();
-
 
31507
 
-
 
31508
      oprot.writeStructBegin(STRUCT_DESC);
-
 
31509
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
-
 
31510
      oprot.writeI64(this.providerId);
-
 
31511
      oprot.writeFieldEnd();
-
 
31512
      if (this.pickupDetails != null) {
-
 
31513
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
-
 
31514
        {
-
 
31515
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
-
 
31516
          for (Map.Entry<String, String> _iter92 : this.pickupDetails.entrySet())
-
 
31517
          {
-
 
31518
            oprot.writeString(_iter92.getKey());
-
 
31519
            oprot.writeString(_iter92.getValue());
-
 
31520
          }
-
 
31521
          oprot.writeMapEnd();
-
 
31522
        }
-
 
31523
        oprot.writeFieldEnd();
-
 
31524
      }
-
 
31525
      oprot.writeFieldStop();
-
 
31526
      oprot.writeStructEnd();
-
 
31527
    }
-
 
31528
 
-
 
31529
    @Override
-
 
31530
    public String toString() {
-
 
31531
      StringBuilder sb = new StringBuilder("markDoasAsPickedUp_args(");
-
 
31532
      boolean first = true;
-
 
31533
 
-
 
31534
      sb.append("providerId:");
-
 
31535
      sb.append(this.providerId);
-
 
31536
      first = false;
-
 
31537
      if (!first) sb.append(", ");
-
 
31538
      sb.append("pickupDetails:");
-
 
31539
      if (this.pickupDetails == null) {
-
 
31540
        sb.append("null");
-
 
31541
      } else {
-
 
31542
        sb.append(this.pickupDetails);
-
 
31543
      }
-
 
31544
      first = false;
-
 
31545
      sb.append(")");
-
 
31546
      return sb.toString();
-
 
31547
    }
-
 
31548
 
-
 
31549
    public void validate() throws TException {
-
 
31550
      // check for required fields
-
 
31551
    }
-
 
31552
 
-
 
31553
  }
-
 
31554
 
-
 
31555
  public static class markDoasAsPickedUp_result implements TBase<markDoasAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markDoasAsPickedUp_result>   {
-
 
31556
    private static final TStruct STRUCT_DESC = new TStruct("markDoasAsPickedUp_result");
-
 
31557
 
-
 
31558
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
-
 
31559
 
-
 
31560
    private List<Order> success;
-
 
31561
 
-
 
31562
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
31563
    public enum _Fields implements TFieldIdEnum {
-
 
31564
      SUCCESS((short)0, "success");
-
 
31565
 
-
 
31566
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
31567
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
31568
 
-
 
31569
      static {
-
 
31570
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
31571
          byId.put((int)field._thriftId, field);
-
 
31572
          byName.put(field.getFieldName(), field);
-
 
31573
        }
-
 
31574
      }
-
 
31575
 
-
 
31576
      /**
-
 
31577
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
31578
       */
-
 
31579
      public static _Fields findByThriftId(int fieldId) {
-
 
31580
        return byId.get(fieldId);
-
 
31581
      }
-
 
31582
 
-
 
31583
      /**
-
 
31584
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
31585
       * if it is not found.
-
 
31586
       */
-
 
31587
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
31588
        _Fields fields = findByThriftId(fieldId);
-
 
31589
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
31590
        return fields;
-
 
31591
      }
-
 
31592
 
-
 
31593
      /**
-
 
31594
       * Find the _Fields constant that matches name, or null if its not found.
-
 
31595
       */
-
 
31596
      public static _Fields findByName(String name) {
-
 
31597
        return byName.get(name);
-
 
31598
      }
-
 
31599
 
-
 
31600
      private final short _thriftId;
-
 
31601
      private final String _fieldName;
-
 
31602
 
-
 
31603
      _Fields(short thriftId, String fieldName) {
-
 
31604
        _thriftId = thriftId;
-
 
31605
        _fieldName = fieldName;
-
 
31606
      }
-
 
31607
 
-
 
31608
      public short getThriftFieldId() {
-
 
31609
        return _thriftId;
-
 
31610
      }
-
 
31611
 
-
 
31612
      public String getFieldName() {
-
 
31613
        return _fieldName;
-
 
31614
      }
-
 
31615
    }
-
 
31616
 
-
 
31617
    // isset id assignments
-
 
31618
 
-
 
31619
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
31620
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
31621
          new ListMetaData(TType.LIST, 
-
 
31622
              new StructMetaData(TType.STRUCT, Order.class))));
-
 
31623
    }});
-
 
31624
 
-
 
31625
    static {
-
 
31626
      FieldMetaData.addStructMetaDataMap(markDoasAsPickedUp_result.class, metaDataMap);
-
 
31627
    }
-
 
31628
 
-
 
31629
    public markDoasAsPickedUp_result() {
-
 
31630
    }
-
 
31631
 
-
 
31632
    public markDoasAsPickedUp_result(
-
 
31633
      List<Order> success)
-
 
31634
    {
-
 
31635
      this();
-
 
31636
      this.success = success;
-
 
31637
    }
-
 
31638
 
-
 
31639
    /**
-
 
31640
     * Performs a deep copy on <i>other</i>.
-
 
31641
     */
-
 
31642
    public markDoasAsPickedUp_result(markDoasAsPickedUp_result other) {
-
 
31643
      if (other.isSetSuccess()) {
-
 
31644
        List<Order> __this__success = new ArrayList<Order>();
-
 
31645
        for (Order other_element : other.success) {
-
 
31646
          __this__success.add(new Order(other_element));
-
 
31647
        }
-
 
31648
        this.success = __this__success;
-
 
31649
      }
-
 
31650
    }
-
 
31651
 
-
 
31652
    public markDoasAsPickedUp_result deepCopy() {
-
 
31653
      return new markDoasAsPickedUp_result(this);
-
 
31654
    }
-
 
31655
 
-
 
31656
    @Deprecated
-
 
31657
    public markDoasAsPickedUp_result clone() {
-
 
31658
      return new markDoasAsPickedUp_result(this);
-
 
31659
    }
-
 
31660
 
-
 
31661
    public int getSuccessSize() {
-
 
31662
      return (this.success == null) ? 0 : this.success.size();
-
 
31663
    }
-
 
31664
 
-
 
31665
    public java.util.Iterator<Order> getSuccessIterator() {
-
 
31666
      return (this.success == null) ? null : this.success.iterator();
-
 
31667
    }
-
 
31668
 
-
 
31669
    public void addToSuccess(Order elem) {
-
 
31670
      if (this.success == null) {
-
 
31671
        this.success = new ArrayList<Order>();
-
 
31672
      }
-
 
31673
      this.success.add(elem);
-
 
31674
    }
-
 
31675
 
-
 
31676
    public List<Order> getSuccess() {
-
 
31677
      return this.success;
-
 
31678
    }
-
 
31679
 
-
 
31680
    public markDoasAsPickedUp_result setSuccess(List<Order> success) {
-
 
31681
      this.success = success;
-
 
31682
      return this;
-
 
31683
    }
-
 
31684
 
-
 
31685
    public void unsetSuccess() {
-
 
31686
      this.success = null;
-
 
31687
    }
-
 
31688
 
-
 
31689
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
31690
    public boolean isSetSuccess() {
-
 
31691
      return this.success != null;
-
 
31692
    }
-
 
31693
 
-
 
31694
    public void setSuccessIsSet(boolean value) {
-
 
31695
      if (!value) {
-
 
31696
        this.success = null;
-
 
31697
      }
-
 
31698
    }
-
 
31699
 
-
 
31700
    public void setFieldValue(_Fields field, Object value) {
-
 
31701
      switch (field) {
-
 
31702
      case SUCCESS:
-
 
31703
        if (value == null) {
-
 
31704
          unsetSuccess();
-
 
31705
        } else {
-
 
31706
          setSuccess((List<Order>)value);
-
 
31707
        }
-
 
31708
        break;
-
 
31709
 
-
 
31710
      }
-
 
31711
    }
-
 
31712
 
-
 
31713
    public void setFieldValue(int fieldID, Object value) {
-
 
31714
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
31715
    }
-
 
31716
 
-
 
31717
    public Object getFieldValue(_Fields field) {
-
 
31718
      switch (field) {
-
 
31719
      case SUCCESS:
-
 
31720
        return getSuccess();
-
 
31721
 
-
 
31722
      }
-
 
31723
      throw new IllegalStateException();
-
 
31724
    }
-
 
31725
 
-
 
31726
    public Object getFieldValue(int fieldId) {
-
 
31727
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
31728
    }
-
 
31729
 
-
 
31730
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
31731
    public boolean isSet(_Fields field) {
-
 
31732
      switch (field) {
-
 
31733
      case SUCCESS:
-
 
31734
        return isSetSuccess();
-
 
31735
      }
-
 
31736
      throw new IllegalStateException();
-
 
31737
    }
-
 
31738
 
-
 
31739
    public boolean isSet(int fieldID) {
-
 
31740
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
31741
    }
-
 
31742
 
-
 
31743
    @Override
-
 
31744
    public boolean equals(Object that) {
-
 
31745
      if (that == null)
-
 
31746
        return false;
-
 
31747
      if (that instanceof markDoasAsPickedUp_result)
-
 
31748
        return this.equals((markDoasAsPickedUp_result)that);
-
 
31749
      return false;
-
 
31750
    }
-
 
31751
 
-
 
31752
    public boolean equals(markDoasAsPickedUp_result that) {
-
 
31753
      if (that == null)
-
 
31754
        return false;
-
 
31755
 
-
 
31756
      boolean this_present_success = true && this.isSetSuccess();
-
 
31757
      boolean that_present_success = true && that.isSetSuccess();
-
 
31758
      if (this_present_success || that_present_success) {
-
 
31759
        if (!(this_present_success && that_present_success))
-
 
31760
          return false;
-
 
31761
        if (!this.success.equals(that.success))
-
 
31762
          return false;
-
 
31763
      }
-
 
31764
 
-
 
31765
      return true;
-
 
31766
    }
-
 
31767
 
-
 
31768
    @Override
-
 
31769
    public int hashCode() {
-
 
31770
      return 0;
-
 
31771
    }
-
 
31772
 
-
 
31773
    public int compareTo(markDoasAsPickedUp_result other) {
-
 
31774
      if (!getClass().equals(other.getClass())) {
-
 
31775
        return getClass().getName().compareTo(other.getClass().getName());
-
 
31776
      }
-
 
31777
 
-
 
31778
      int lastComparison = 0;
-
 
31779
      markDoasAsPickedUp_result typedOther = (markDoasAsPickedUp_result)other;
-
 
31780
 
-
 
31781
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
31782
      if (lastComparison != 0) {
-
 
31783
        return lastComparison;
-
 
31784
      }
-
 
31785
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
31786
      if (lastComparison != 0) {
-
 
31787
        return lastComparison;
-
 
31788
      }
-
 
31789
      return 0;
-
 
31790
    }
-
 
31791
 
-
 
31792
    public void read(TProtocol iprot) throws TException {
-
 
31793
      TField field;
-
 
31794
      iprot.readStructBegin();
-
 
31795
      while (true)
-
 
31796
      {
-
 
31797
        field = iprot.readFieldBegin();
-
 
31798
        if (field.type == TType.STOP) { 
-
 
31799
          break;
-
 
31800
        }
-
 
31801
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
31802
        if (fieldId == null) {
-
 
31803
          TProtocolUtil.skip(iprot, field.type);
-
 
31804
        } else {
-
 
31805
          switch (fieldId) {
-
 
31806
            case SUCCESS:
-
 
31807
              if (field.type == TType.LIST) {
-
 
31808
                {
-
 
31809
                  TList _list93 = iprot.readListBegin();
-
 
31810
                  this.success = new ArrayList<Order>(_list93.size);
-
 
31811
                  for (int _i94 = 0; _i94 < _list93.size; ++_i94)
-
 
31812
                  {
-
 
31813
                    Order _elem95;
-
 
31814
                    _elem95 = new Order();
-
 
31815
                    _elem95.read(iprot);
-
 
31816
                    this.success.add(_elem95);
-
 
31817
                  }
-
 
31818
                  iprot.readListEnd();
-
 
31819
                }
-
 
31820
              } else { 
-
 
31821
                TProtocolUtil.skip(iprot, field.type);
-
 
31822
              }
-
 
31823
              break;
-
 
31824
          }
-
 
31825
          iprot.readFieldEnd();
-
 
31826
        }
-
 
31827
      }
-
 
31828
      iprot.readStructEnd();
-
 
31829
      validate();
-
 
31830
    }
-
 
31831
 
-
 
31832
    public void write(TProtocol oprot) throws TException {
-
 
31833
      oprot.writeStructBegin(STRUCT_DESC);
-
 
31834
 
-
 
31835
      if (this.isSetSuccess()) {
-
 
31836
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
31837
        {
-
 
31838
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
-
 
31839
          for (Order _iter96 : this.success)
-
 
31840
          {
-
 
31841
            _iter96.write(oprot);
-
 
31842
          }
-
 
31843
          oprot.writeListEnd();
-
 
31844
        }
-
 
31845
        oprot.writeFieldEnd();
-
 
31846
      }
-
 
31847
      oprot.writeFieldStop();
-
 
31848
      oprot.writeStructEnd();
-
 
31849
    }
-
 
31850
 
-
 
31851
    @Override
-
 
31852
    public String toString() {
-
 
31853
      StringBuilder sb = new StringBuilder("markDoasAsPickedUp_result(");
-
 
31854
      boolean first = true;
-
 
31855
 
-
 
31856
      sb.append("success:");
-
 
31857
      if (this.success == null) {
-
 
31858
        sb.append("null");
-
 
31859
      } else {
-
 
31860
        sb.append(this.success);
-
 
31861
      }
-
 
31862
      first = false;
-
 
31863
      sb.append(")");
-
 
31864
      return sb.toString();
-
 
31865
    }
-
 
31866
 
-
 
31867
    public void validate() throws TException {
-
 
31868
      // check for required fields
-
 
31869
    }
-
 
31870
 
-
 
31871
  }
-
 
31872
 
31115
  public static class receiveReturn_args implements TBase<receiveReturn_args._Fields>, java.io.Serializable, Cloneable, Comparable<receiveReturn_args>   {
31873
  public static class receiveReturn_args implements TBase<receiveReturn_args._Fields>, java.io.Serializable, Cloneable, Comparable<receiveReturn_args>   {
31116
    private static final TStruct STRUCT_DESC = new TStruct("receiveReturn_args");
31874
    private static final TStruct STRUCT_DESC = new TStruct("receiveReturn_args");
31117
 
31875
 
31118
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
31876
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
31119
 
31877
 
Line 34440... Line 35198...
34440
        } else {
35198
        } else {
34441
          switch (fieldId) {
35199
          switch (fieldId) {
34442
            case SUCCESS:
35200
            case SUCCESS:
34443
              if (field.type == TType.LIST) {
35201
              if (field.type == TType.LIST) {
34444
                {
35202
                {
34445
                  TList _list88 = iprot.readListBegin();
35203
                  TList _list97 = iprot.readListBegin();
34446
                  this.success = new ArrayList<ReturnOrder>(_list88.size);
35204
                  this.success = new ArrayList<ReturnOrder>(_list97.size);
34447
                  for (int _i89 = 0; _i89 < _list88.size; ++_i89)
35205
                  for (int _i98 = 0; _i98 < _list97.size; ++_i98)
34448
                  {
35206
                  {
34449
                    ReturnOrder _elem90;
35207
                    ReturnOrder _elem99;
34450
                    _elem90 = new ReturnOrder();
35208
                    _elem99 = new ReturnOrder();
34451
                    _elem90.read(iprot);
35209
                    _elem99.read(iprot);
34452
                    this.success.add(_elem90);
35210
                    this.success.add(_elem99);
34453
                  }
35211
                  }
34454
                  iprot.readListEnd();
35212
                  iprot.readListEnd();
34455
                }
35213
                }
34456
              } else { 
35214
              } else { 
34457
                TProtocolUtil.skip(iprot, field.type);
35215
                TProtocolUtil.skip(iprot, field.type);
Line 34470... Line 35228...
34470
 
35228
 
34471
      if (this.isSetSuccess()) {
35229
      if (this.isSetSuccess()) {
34472
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
35230
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
34473
        {
35231
        {
34474
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
35232
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
34475
          for (ReturnOrder _iter91 : this.success)
35233
          for (ReturnOrder _iter100 : this.success)
34476
          {
35234
          {
34477
            _iter91.write(oprot);
35235
            _iter100.write(oprot);
34478
          }
35236
          }
34479
          oprot.writeListEnd();
35237
          oprot.writeListEnd();
34480
        }
35238
        }
34481
        oprot.writeFieldEnd();
35239
        oprot.writeFieldEnd();
34482
      }
35240
      }