Subversion Repositories SmartDukaan

Rev

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

Rev 3430 Rev 3553
Line 59... Line 59...
59
  private static final org.apache.thrift.protocol.TField DOA_FLAG_FIELD_DESC = new org.apache.thrift.protocol.TField("doaFlag", org.apache.thrift.protocol.TType.BOOL, (short)34);
59
  private static final org.apache.thrift.protocol.TField DOA_FLAG_FIELD_DESC = new org.apache.thrift.protocol.TField("doaFlag", org.apache.thrift.protocol.TType.BOOL, (short)34);
60
  private static final org.apache.thrift.protocol.TField PICKUP_REQUEST_NO_FIELD_DESC = new org.apache.thrift.protocol.TField("pickupRequestNo", org.apache.thrift.protocol.TType.STRING, (short)35);
60
  private static final org.apache.thrift.protocol.TField PICKUP_REQUEST_NO_FIELD_DESC = new org.apache.thrift.protocol.TField("pickupRequestNo", org.apache.thrift.protocol.TType.STRING, (short)35);
61
  private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)36);
61
  private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)36);
62
  private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_NO_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrderNo", org.apache.thrift.protocol.TType.STRING, (short)37);
62
  private static final org.apache.thrift.protocol.TField PURCHASE_ORDER_NO_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseOrderNo", org.apache.thrift.protocol.TType.STRING, (short)37);
63
  private static final org.apache.thrift.protocol.TField COD_FIELD_DESC = new org.apache.thrift.protocol.TField("cod", org.apache.thrift.protocol.TType.BOOL, (short)38);
63
  private static final org.apache.thrift.protocol.TField COD_FIELD_DESC = new org.apache.thrift.protocol.TField("cod", org.apache.thrift.protocol.TType.BOOL, (short)38);
-
 
64
  private static final org.apache.thrift.protocol.TField DELAY_REASON_FIELD_DESC = new org.apache.thrift.protocol.TField("delayReason", org.apache.thrift.protocol.TType.I32, (short)39);
64
 
65
 
65
  private long id; // required
66
  private long id; // required
66
  private long warehouse_id; // required
67
  private long warehouse_id; // required
67
  private List<LineItem> lineitems; // required
68
  private List<LineItem> lineitems; // required
68
  private long logistics_provider_id; // required
69
  private long logistics_provider_id; // required
Line 98... Line 99...
98
  private boolean doaFlag; // required
99
  private boolean doaFlag; // required
99
  private String pickupRequestNo; // required
100
  private String pickupRequestNo; // required
100
  private long transactionId; // required
101
  private long transactionId; // required
101
  private String purchaseOrderNo; // required
102
  private String purchaseOrderNo; // required
102
  private boolean cod; // required
103
  private boolean cod; // required
-
 
104
  private DelayReason delayReason; // required
103
 
105
 
104
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
106
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
105
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
107
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
106
    ID((short)1, "id"),
108
    ID((short)1, "id"),
107
    WAREHOUSE_ID((short)2, "warehouse_id"),
109
    WAREHOUSE_ID((short)2, "warehouse_id"),
Line 164... Line 166...
164
    SERIAL_NO((short)33, "serialNo"),
166
    SERIAL_NO((short)33, "serialNo"),
165
    DOA_FLAG((short)34, "doaFlag"),
167
    DOA_FLAG((short)34, "doaFlag"),
166
    PICKUP_REQUEST_NO((short)35, "pickupRequestNo"),
168
    PICKUP_REQUEST_NO((short)35, "pickupRequestNo"),
167
    TRANSACTION_ID((short)36, "transactionId"),
169
    TRANSACTION_ID((short)36, "transactionId"),
168
    PURCHASE_ORDER_NO((short)37, "purchaseOrderNo"),
170
    PURCHASE_ORDER_NO((short)37, "purchaseOrderNo"),
169
    COD((short)38, "cod");
171
    COD((short)38, "cod"),
-
 
172
    /**
-
 
173
     * 
-
 
174
     * @see DelayReason
-
 
175
     */
-
 
176
    DELAY_REASON((short)39, "delayReason");
170
 
177
 
171
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
178
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
172
 
179
 
173
    static {
180
    static {
174
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
181
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 255... Line 262...
255
          return TRANSACTION_ID;
262
          return TRANSACTION_ID;
256
        case 37: // PURCHASE_ORDER_NO
263
        case 37: // PURCHASE_ORDER_NO
257
          return PURCHASE_ORDER_NO;
264
          return PURCHASE_ORDER_NO;
258
        case 38: // COD
265
        case 38: // COD
259
          return COD;
266
          return COD;
-
 
267
        case 39: // DELAY_REASON
-
 
268
          return DELAY_REASON;
260
        default:
269
        default:
261
          return null;
270
          return null;
262
      }
271
      }
263
    }
272
    }
264
 
273
 
Line 397... Line 406...
397
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
406
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
398
    tmpMap.put(_Fields.PURCHASE_ORDER_NO, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderNo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
407
    tmpMap.put(_Fields.PURCHASE_ORDER_NO, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderNo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
399
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
408
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
400
    tmpMap.put(_Fields.COD, new org.apache.thrift.meta_data.FieldMetaData("cod", org.apache.thrift.TFieldRequirementType.DEFAULT, 
409
    tmpMap.put(_Fields.COD, new org.apache.thrift.meta_data.FieldMetaData("cod", org.apache.thrift.TFieldRequirementType.DEFAULT, 
401
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
410
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
411
    tmpMap.put(_Fields.DELAY_REASON, new org.apache.thrift.meta_data.FieldMetaData("delayReason", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
412
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DelayReason.class)));
402
    metaDataMap = Collections.unmodifiableMap(tmpMap);
413
    metaDataMap = Collections.unmodifiableMap(tmpMap);
403
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
414
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
404
  }
415
  }
405
 
416
 
406
  public Order() {
417
  public Order() {
Line 442... Line 453...
442
    long serialNo,
453
    long serialNo,
443
    boolean doaFlag,
454
    boolean doaFlag,
444
    String pickupRequestNo,
455
    String pickupRequestNo,
445
    long transactionId,
456
    long transactionId,
446
    String purchaseOrderNo,
457
    String purchaseOrderNo,
447
    boolean cod)
458
    boolean cod,
-
 
459
    DelayReason delayReason)
448
  {
460
  {
449
    this();
461
    this();
450
    this.id = id;
462
    this.id = id;
451
    setIdIsSet(true);
463
    setIdIsSet(true);
452
    this.warehouse_id = warehouse_id;
464
    this.warehouse_id = warehouse_id;
Line 503... Line 515...
503
    this.transactionId = transactionId;
515
    this.transactionId = transactionId;
504
    setTransactionIdIsSet(true);
516
    setTransactionIdIsSet(true);
505
    this.purchaseOrderNo = purchaseOrderNo;
517
    this.purchaseOrderNo = purchaseOrderNo;
506
    this.cod = cod;
518
    this.cod = cod;
507
    setCodIsSet(true);
519
    setCodIsSet(true);
-
 
520
    this.delayReason = delayReason;
508
  }
521
  }
509
 
522
 
510
  /**
523
  /**
511
   * Performs a deep copy on <i>other</i>.
524
   * Performs a deep copy on <i>other</i>.
512
   */
525
   */
Line 589... Line 602...
589
    this.transactionId = other.transactionId;
602
    this.transactionId = other.transactionId;
590
    if (other.isSetPurchaseOrderNo()) {
603
    if (other.isSetPurchaseOrderNo()) {
591
      this.purchaseOrderNo = other.purchaseOrderNo;
604
      this.purchaseOrderNo = other.purchaseOrderNo;
592
    }
605
    }
593
    this.cod = other.cod;
606
    this.cod = other.cod;
-
 
607
    if (other.isSetDelayReason()) {
-
 
608
      this.delayReason = other.delayReason;
-
 
609
    }
594
  }
610
  }
595
 
611
 
596
  public Order deepCopy() {
612
  public Order deepCopy() {
597
    return new Order(this);
613
    return new Order(this);
598
  }
614
  }
Line 655... Line 671...
655
    setTransactionIdIsSet(false);
671
    setTransactionIdIsSet(false);
656
    this.transactionId = 0;
672
    this.transactionId = 0;
657
    this.purchaseOrderNo = null;
673
    this.purchaseOrderNo = null;
658
    setCodIsSet(false);
674
    setCodIsSet(false);
659
    this.cod = false;
675
    this.cod = false;
-
 
676
    this.delayReason = null;
660
  }
677
  }
661
 
678
 
662
  public long getId() {
679
  public long getId() {
663
    return this.id;
680
    return this.id;
664
  }
681
  }
Line 1578... Line 1595...
1578
 
1595
 
1579
  public void setCodIsSet(boolean value) {
1596
  public void setCodIsSet(boolean value) {
1580
    __isset_bit_vector.set(__COD_ISSET_ID, value);
1597
    __isset_bit_vector.set(__COD_ISSET_ID, value);
1581
  }
1598
  }
1582
 
1599
 
-
 
1600
  /**
-
 
1601
   * 
-
 
1602
   * @see DelayReason
-
 
1603
   */
-
 
1604
  public DelayReason getDelayReason() {
-
 
1605
    return this.delayReason;
-
 
1606
  }
-
 
1607
 
-
 
1608
  /**
-
 
1609
   * 
-
 
1610
   * @see DelayReason
-
 
1611
   */
-
 
1612
  public void setDelayReason(DelayReason delayReason) {
-
 
1613
    this.delayReason = delayReason;
-
 
1614
  }
-
 
1615
 
-
 
1616
  public void unsetDelayReason() {
-
 
1617
    this.delayReason = null;
-
 
1618
  }
-
 
1619
 
-
 
1620
  /** Returns true if field delayReason is set (has been assigned a value) and false otherwise */
-
 
1621
  public boolean isSetDelayReason() {
-
 
1622
    return this.delayReason != null;
-
 
1623
  }
-
 
1624
 
-
 
1625
  public void setDelayReasonIsSet(boolean value) {
-
 
1626
    if (!value) {
-
 
1627
      this.delayReason = null;
-
 
1628
    }
-
 
1629
  }
-
 
1630
 
1583
  public void setFieldValue(_Fields field, Object value) {
1631
  public void setFieldValue(_Fields field, Object value) {
1584
    switch (field) {
1632
    switch (field) {
1585
    case ID:
1633
    case ID:
1586
      if (value == null) {
1634
      if (value == null) {
1587
        unsetId();
1635
        unsetId();
Line 1884... Line 1932...
1884
      } else {
1932
      } else {
1885
        setCod((Boolean)value);
1933
        setCod((Boolean)value);
1886
      }
1934
      }
1887
      break;
1935
      break;
1888
 
1936
 
-
 
1937
    case DELAY_REASON:
-
 
1938
      if (value == null) {
-
 
1939
        unsetDelayReason();
-
 
1940
      } else {
-
 
1941
        setDelayReason((DelayReason)value);
-
 
1942
      }
-
 
1943
      break;
-
 
1944
 
1889
    }
1945
    }
1890
  }
1946
  }
1891
 
1947
 
1892
  public Object getFieldValue(_Fields field) {
1948
  public Object getFieldValue(_Fields field) {
1893
    switch (field) {
1949
    switch (field) {
Line 2003... Line 2059...
2003
      return getPurchaseOrderNo();
2059
      return getPurchaseOrderNo();
2004
 
2060
 
2005
    case COD:
2061
    case COD:
2006
      return Boolean.valueOf(isCod());
2062
      return Boolean.valueOf(isCod());
2007
 
2063
 
-
 
2064
    case DELAY_REASON:
-
 
2065
      return getDelayReason();
-
 
2066
 
2008
    }
2067
    }
2009
    throw new IllegalStateException();
2068
    throw new IllegalStateException();
2010
  }
2069
  }
2011
 
2070
 
2012
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2071
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 2090... Line 2149...
2090
      return isSetTransactionId();
2149
      return isSetTransactionId();
2091
    case PURCHASE_ORDER_NO:
2150
    case PURCHASE_ORDER_NO:
2092
      return isSetPurchaseOrderNo();
2151
      return isSetPurchaseOrderNo();
2093
    case COD:
2152
    case COD:
2094
      return isSetCod();
2153
      return isSetCod();
-
 
2154
    case DELAY_REASON:
-
 
2155
      return isSetDelayReason();
2095
    }
2156
    }
2096
    throw new IllegalStateException();
2157
    throw new IllegalStateException();
2097
  }
2158
  }
2098
 
2159
 
2099
  @Override
2160
  @Override
Line 2449... Line 2510...
2449
        return false;
2510
        return false;
2450
      if (this.cod != that.cod)
2511
      if (this.cod != that.cod)
2451
        return false;
2512
        return false;
2452
    }
2513
    }
2453
 
2514
 
-
 
2515
    boolean this_present_delayReason = true && this.isSetDelayReason();
-
 
2516
    boolean that_present_delayReason = true && that.isSetDelayReason();
-
 
2517
    if (this_present_delayReason || that_present_delayReason) {
-
 
2518
      if (!(this_present_delayReason && that_present_delayReason))
-
 
2519
        return false;
-
 
2520
      if (!this.delayReason.equals(that.delayReason))
-
 
2521
        return false;
-
 
2522
    }
-
 
2523
 
2454
    return true;
2524
    return true;
2455
  }
2525
  }
2456
 
2526
 
2457
  @Override
2527
  @Override
2458
  public int hashCode() {
2528
  public int hashCode() {
Line 2845... Line 2915...
2845
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cod, typedOther.cod);
2915
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cod, typedOther.cod);
2846
      if (lastComparison != 0) {
2916
      if (lastComparison != 0) {
2847
        return lastComparison;
2917
        return lastComparison;
2848
      }
2918
      }
2849
    }
2919
    }
-
 
2920
    lastComparison = Boolean.valueOf(isSetDelayReason()).compareTo(typedOther.isSetDelayReason());
-
 
2921
    if (lastComparison != 0) {
-
 
2922
      return lastComparison;
-
 
2923
    }
-
 
2924
    if (isSetDelayReason()) {
-
 
2925
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delayReason, typedOther.delayReason);
-
 
2926
      if (lastComparison != 0) {
-
 
2927
        return lastComparison;
-
 
2928
      }
-
 
2929
    }
2850
    return 0;
2930
    return 0;
2851
  }
2931
  }
2852
 
2932
 
2853
  public _Fields fieldForId(int fieldId) {
2933
  public _Fields fieldForId(int fieldId) {
2854
    return _Fields.findByThriftId(fieldId);
2934
    return _Fields.findByThriftId(fieldId);
Line 3159... Line 3239...
3159
            setCodIsSet(true);
3239
            setCodIsSet(true);
3160
          } else { 
3240
          } else { 
3161
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3241
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3162
          }
3242
          }
3163
          break;
3243
          break;
-
 
3244
        case 39: // DELAY_REASON
-
 
3245
          if (field.type == org.apache.thrift.protocol.TType.I32) {
-
 
3246
            this.delayReason = DelayReason.findByValue(iprot.readI32());
-
 
3247
          } else { 
-
 
3248
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3249
          }
-
 
3250
          break;
3164
        default:
3251
        default:
3165
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3252
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3166
      }
3253
      }
3167
      iprot.readFieldEnd();
3254
      iprot.readFieldEnd();
3168
    }
3255
    }
Line 3329... Line 3416...
3329
      oprot.writeFieldEnd();
3416
      oprot.writeFieldEnd();
3330
    }
3417
    }
3331
    oprot.writeFieldBegin(COD_FIELD_DESC);
3418
    oprot.writeFieldBegin(COD_FIELD_DESC);
3332
    oprot.writeBool(this.cod);
3419
    oprot.writeBool(this.cod);
3333
    oprot.writeFieldEnd();
3420
    oprot.writeFieldEnd();
-
 
3421
    if (this.delayReason != null) {
-
 
3422
      oprot.writeFieldBegin(DELAY_REASON_FIELD_DESC);
-
 
3423
      oprot.writeI32(this.delayReason.getValue());
-
 
3424
      oprot.writeFieldEnd();
-
 
3425
    }
3334
    oprot.writeFieldStop();
3426
    oprot.writeFieldStop();
3335
    oprot.writeStructEnd();
3427
    oprot.writeStructEnd();
3336
  }
3428
  }
3337
 
3429
 
3338
  @Override
3430
  @Override
Line 3561... Line 3653...
3561
    first = false;
3653
    first = false;
3562
    if (!first) sb.append(", ");
3654
    if (!first) sb.append(", ");
3563
    sb.append("cod:");
3655
    sb.append("cod:");
3564
    sb.append(this.cod);
3656
    sb.append(this.cod);
3565
    first = false;
3657
    first = false;
-
 
3658
    if (!first) sb.append(", ");
-
 
3659
    sb.append("delayReason:");
-
 
3660
    if (this.delayReason == null) {
-
 
3661
      sb.append("null");
-
 
3662
    } else {
-
 
3663
      sb.append(this.delayReason);
-
 
3664
    }
-
 
3665
    first = false;
3566
    sb.append(")");
3666
    sb.append(")");
3567
    return sb.toString();
3667
    return sb.toString();
3568
  }
3668
  }
3569
 
3669
 
3570
  public void validate() throws org.apache.thrift.TException {
3670
  public void validate() throws org.apache.thrift.TException {