Subversion Repositories SmartDukaan

Rev

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

Rev 2819 Rev 3061
Line 61... Line 61...
61
  private static final TField SERIAL_NO_FIELD_DESC = new TField("serialNo", TType.I64, (short)33);
61
  private static final TField SERIAL_NO_FIELD_DESC = new TField("serialNo", TType.I64, (short)33);
62
  private static final TField DOA_FLAG_FIELD_DESC = new TField("doaFlag", TType.BOOL, (short)34);
62
  private static final TField DOA_FLAG_FIELD_DESC = new TField("doaFlag", TType.BOOL, (short)34);
63
  private static final TField PICKUP_REQUEST_NO_FIELD_DESC = new TField("pickupRequestNo", TType.STRING, (short)35);
63
  private static final TField PICKUP_REQUEST_NO_FIELD_DESC = new TField("pickupRequestNo", TType.STRING, (short)35);
64
  private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)36);
64
  private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)36);
65
  private static final TField PURCHASE_ORDER_NO_FIELD_DESC = new TField("purchaseOrderNo", TType.STRING, (short)37);
65
  private static final TField PURCHASE_ORDER_NO_FIELD_DESC = new TField("purchaseOrderNo", TType.STRING, (short)37);
-
 
66
  private static final TField COD_FIELD_DESC = new TField("cod", TType.BOOL, (short)38);
66
 
67
 
67
  private long id;
68
  private long id;
68
  private long warehouse_id;
69
  private long warehouse_id;
69
  private List<LineItem> lineitems;
70
  private List<LineItem> lineitems;
70
  private long logistics_provider_id;
71
  private long logistics_provider_id;
Line 99... Line 100...
99
  private long serialNo;
100
  private long serialNo;
100
  private boolean doaFlag;
101
  private boolean doaFlag;
101
  private String pickupRequestNo;
102
  private String pickupRequestNo;
102
  private long transactionId;
103
  private long transactionId;
103
  private String purchaseOrderNo;
104
  private String purchaseOrderNo;
-
 
105
  private boolean cod;
104
 
106
 
105
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
107
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
106
  public enum _Fields implements TFieldIdEnum {
108
  public enum _Fields implements TFieldIdEnum {
107
    ID((short)1, "id"),
109
    ID((short)1, "id"),
108
    WAREHOUSE_ID((short)2, "warehouse_id"),
110
    WAREHOUSE_ID((short)2, "warehouse_id"),
Line 164... Line 166...
164
    BATCH_NO((short)32, "batchNo"),
166
    BATCH_NO((short)32, "batchNo"),
165
    SERIAL_NO((short)33, "serialNo"),
167
    SERIAL_NO((short)33, "serialNo"),
166
    DOA_FLAG((short)34, "doaFlag"),
168
    DOA_FLAG((short)34, "doaFlag"),
167
    PICKUP_REQUEST_NO((short)35, "pickupRequestNo"),
169
    PICKUP_REQUEST_NO((short)35, "pickupRequestNo"),
168
    TRANSACTION_ID((short)36, "transactionId"),
170
    TRANSACTION_ID((short)36, "transactionId"),
169
    PURCHASE_ORDER_NO((short)37, "purchaseOrderNo");
171
    PURCHASE_ORDER_NO((short)37, "purchaseOrderNo"),
-
 
172
    COD((short)38, "cod");
170
 
173
 
171
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
174
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
172
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
175
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
173
 
176
 
174
    static {
177
    static {
Line 237... Line 240...
237
  private static final int __JACKET_NUMBER_ISSET_ID = 14;
240
  private static final int __JACKET_NUMBER_ISSET_ID = 14;
238
  private static final int __BATCHNO_ISSET_ID = 15;
241
  private static final int __BATCHNO_ISSET_ID = 15;
239
  private static final int __SERIALNO_ISSET_ID = 16;
242
  private static final int __SERIALNO_ISSET_ID = 16;
240
  private static final int __DOAFLAG_ISSET_ID = 17;
243
  private static final int __DOAFLAG_ISSET_ID = 17;
241
  private static final int __TRANSACTIONID_ISSET_ID = 18;
244
  private static final int __TRANSACTIONID_ISSET_ID = 18;
-
 
245
  private static final int __COD_ISSET_ID = 19;
242
  private BitSet __isset_bit_vector = new BitSet(19);
246
  private BitSet __isset_bit_vector = new BitSet(20);
243
 
247
 
244
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
248
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
245
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
249
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
246
        new FieldValueMetaData(TType.I64)));
250
        new FieldValueMetaData(TType.I64)));
247
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
251
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
Line 315... Line 319...
315
        new FieldValueMetaData(TType.STRING)));
319
        new FieldValueMetaData(TType.STRING)));
316
    put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
320
    put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
317
        new FieldValueMetaData(TType.I64)));
321
        new FieldValueMetaData(TType.I64)));
318
    put(_Fields.PURCHASE_ORDER_NO, new FieldMetaData("purchaseOrderNo", TFieldRequirementType.DEFAULT, 
322
    put(_Fields.PURCHASE_ORDER_NO, new FieldMetaData("purchaseOrderNo", TFieldRequirementType.DEFAULT, 
319
        new FieldValueMetaData(TType.STRING)));
323
        new FieldValueMetaData(TType.STRING)));
-
 
324
    put(_Fields.COD, new FieldMetaData("cod", TFieldRequirementType.DEFAULT, 
-
 
325
        new FieldValueMetaData(TType.BOOL)));
320
  }});
326
  }});
321
 
327
 
322
  static {
328
  static {
323
    FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
329
    FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
324
  }
330
  }
Line 361... Line 367...
361
    long batchNo,
367
    long batchNo,
362
    long serialNo,
368
    long serialNo,
363
    boolean doaFlag,
369
    boolean doaFlag,
364
    String pickupRequestNo,
370
    String pickupRequestNo,
365
    long transactionId,
371
    long transactionId,
366
    String purchaseOrderNo)
372
    String purchaseOrderNo,
-
 
373
    boolean cod)
367
  {
374
  {
368
    this();
375
    this();
369
    this.id = id;
376
    this.id = id;
370
    setIdIsSet(true);
377
    setIdIsSet(true);
371
    this.warehouse_id = warehouse_id;
378
    this.warehouse_id = warehouse_id;
Line 420... Line 427...
420
    setDoaFlagIsSet(true);
427
    setDoaFlagIsSet(true);
421
    this.pickupRequestNo = pickupRequestNo;
428
    this.pickupRequestNo = pickupRequestNo;
422
    this.transactionId = transactionId;
429
    this.transactionId = transactionId;
423
    setTransactionIdIsSet(true);
430
    setTransactionIdIsSet(true);
424
    this.purchaseOrderNo = purchaseOrderNo;
431
    this.purchaseOrderNo = purchaseOrderNo;
-
 
432
    this.cod = cod;
-
 
433
    setCodIsSet(true);
425
  }
434
  }
426
 
435
 
427
  /**
436
  /**
428
   * Performs a deep copy on <i>other</i>.
437
   * Performs a deep copy on <i>other</i>.
429
   */
438
   */
Line 505... Line 514...
505
    }
514
    }
506
    this.transactionId = other.transactionId;
515
    this.transactionId = other.transactionId;
507
    if (other.isSetPurchaseOrderNo()) {
516
    if (other.isSetPurchaseOrderNo()) {
508
      this.purchaseOrderNo = other.purchaseOrderNo;
517
      this.purchaseOrderNo = other.purchaseOrderNo;
509
    }
518
    }
-
 
519
    this.cod = other.cod;
510
  }
520
  }
511
 
521
 
512
  public Order deepCopy() {
522
  public Order deepCopy() {
513
    return new Order(this);
523
    return new Order(this);
514
  }
524
  }
Line 1452... Line 1462...
1452
    if (!value) {
1462
    if (!value) {
1453
      this.purchaseOrderNo = null;
1463
      this.purchaseOrderNo = null;
1454
    }
1464
    }
1455
  }
1465
  }
1456
 
1466
 
-
 
1467
  public boolean isCod() {
-
 
1468
    return this.cod;
-
 
1469
  }
-
 
1470
 
-
 
1471
  public Order setCod(boolean cod) {
-
 
1472
    this.cod = cod;
-
 
1473
    setCodIsSet(true);
-
 
1474
    return this;
-
 
1475
  }
-
 
1476
 
-
 
1477
  public void unsetCod() {
-
 
1478
    __isset_bit_vector.clear(__COD_ISSET_ID);
-
 
1479
  }
-
 
1480
 
-
 
1481
  /** Returns true if field cod is set (has been asigned a value) and false otherwise */
-
 
1482
  public boolean isSetCod() {
-
 
1483
    return __isset_bit_vector.get(__COD_ISSET_ID);
-
 
1484
  }
-
 
1485
 
-
 
1486
  public void setCodIsSet(boolean value) {
-
 
1487
    __isset_bit_vector.set(__COD_ISSET_ID, value);
-
 
1488
  }
-
 
1489
 
1457
  public void setFieldValue(_Fields field, Object value) {
1490
  public void setFieldValue(_Fields field, Object value) {
1458
    switch (field) {
1491
    switch (field) {
1459
    case ID:
1492
    case ID:
1460
      if (value == null) {
1493
      if (value == null) {
1461
        unsetId();
1494
        unsetId();
Line 1750... Line 1783...
1750
      } else {
1783
      } else {
1751
        setPurchaseOrderNo((String)value);
1784
        setPurchaseOrderNo((String)value);
1752
      }
1785
      }
1753
      break;
1786
      break;
1754
 
1787
 
-
 
1788
    case COD:
-
 
1789
      if (value == null) {
-
 
1790
        unsetCod();
-
 
1791
      } else {
-
 
1792
        setCod((Boolean)value);
-
 
1793
      }
-
 
1794
      break;
-
 
1795
 
1755
    }
1796
    }
1756
  }
1797
  }
1757
 
1798
 
1758
  public void setFieldValue(int fieldID, Object value) {
1799
  public void setFieldValue(int fieldID, Object value) {
1759
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1800
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 1870... Line 1911...
1870
      return new Long(getTransactionId());
1911
      return new Long(getTransactionId());
1871
 
1912
 
1872
    case PURCHASE_ORDER_NO:
1913
    case PURCHASE_ORDER_NO:
1873
      return getPurchaseOrderNo();
1914
      return getPurchaseOrderNo();
1874
 
1915
 
-
 
1916
    case COD:
-
 
1917
      return new Boolean(isCod());
-
 
1918
 
1875
    }
1919
    }
1876
    throw new IllegalStateException();
1920
    throw new IllegalStateException();
1877
  }
1921
  }
1878
 
1922
 
1879
  public Object getFieldValue(int fieldId) {
1923
  public Object getFieldValue(int fieldId) {
Line 1955... Line 1999...
1955
      return isSetPickupRequestNo();
1999
      return isSetPickupRequestNo();
1956
    case TRANSACTION_ID:
2000
    case TRANSACTION_ID:
1957
      return isSetTransactionId();
2001
      return isSetTransactionId();
1958
    case PURCHASE_ORDER_NO:
2002
    case PURCHASE_ORDER_NO:
1959
      return isSetPurchaseOrderNo();
2003
      return isSetPurchaseOrderNo();
-
 
2004
    case COD:
-
 
2005
      return isSetCod();
1960
    }
2006
    }
1961
    throw new IllegalStateException();
2007
    throw new IllegalStateException();
1962
  }
2008
  }
1963
 
2009
 
1964
  public boolean isSet(int fieldID) {
2010
  public boolean isSet(int fieldID) {
Line 2309... Line 2355...
2309
        return false;
2355
        return false;
2310
      if (!this.purchaseOrderNo.equals(that.purchaseOrderNo))
2356
      if (!this.purchaseOrderNo.equals(that.purchaseOrderNo))
2311
        return false;
2357
        return false;
2312
    }
2358
    }
2313
 
2359
 
-
 
2360
    boolean this_present_cod = true;
-
 
2361
    boolean that_present_cod = true;
-
 
2362
    if (this_present_cod || that_present_cod) {
-
 
2363
      if (!(this_present_cod && that_present_cod))
-
 
2364
        return false;
-
 
2365
      if (this.cod != that.cod)
-
 
2366
        return false;
-
 
2367
    }
-
 
2368
 
2314
    return true;
2369
    return true;
2315
  }
2370
  }
2316
 
2371
 
2317
  @Override
2372
  @Override
2318
  public int hashCode() {
2373
  public int hashCode() {
Line 2621... Line 2676...
2621
    }
2676
    }
2622
    lastComparison = TBaseHelper.compareTo(purchaseOrderNo, typedOther.purchaseOrderNo);
2677
    lastComparison = TBaseHelper.compareTo(purchaseOrderNo, typedOther.purchaseOrderNo);
2623
    if (lastComparison != 0) {
2678
    if (lastComparison != 0) {
2624
      return lastComparison;
2679
      return lastComparison;
2625
    }
2680
    }
-
 
2681
    lastComparison = Boolean.valueOf(isSetCod()).compareTo(isSetCod());
-
 
2682
    if (lastComparison != 0) {
-
 
2683
      return lastComparison;
-
 
2684
    }
-
 
2685
    lastComparison = TBaseHelper.compareTo(cod, typedOther.cod);
-
 
2686
    if (lastComparison != 0) {
-
 
2687
      return lastComparison;
-
 
2688
    }
2626
    return 0;
2689
    return 0;
2627
  }
2690
  }
2628
 
2691
 
2629
  public void read(TProtocol iprot) throws TException {
2692
  public void read(TProtocol iprot) throws TException {
2630
    TField field;
2693
    TField field;
Line 2927... Line 2990...
2927
              this.purchaseOrderNo = iprot.readString();
2990
              this.purchaseOrderNo = iprot.readString();
2928
            } else { 
2991
            } else { 
2929
              TProtocolUtil.skip(iprot, field.type);
2992
              TProtocolUtil.skip(iprot, field.type);
2930
            }
2993
            }
2931
            break;
2994
            break;
-
 
2995
          case COD:
-
 
2996
            if (field.type == TType.BOOL) {
-
 
2997
              this.cod = iprot.readBool();
-
 
2998
              setCodIsSet(true);
-
 
2999
            } else { 
-
 
3000
              TProtocolUtil.skip(iprot, field.type);
-
 
3001
            }
-
 
3002
            break;
2932
        }
3003
        }
2933
        iprot.readFieldEnd();
3004
        iprot.readFieldEnd();
2934
      }
3005
      }
2935
    }
3006
    }
2936
    iprot.readStructEnd();
3007
    iprot.readStructEnd();
Line 3093... Line 3164...
3093
    if (this.purchaseOrderNo != null) {
3164
    if (this.purchaseOrderNo != null) {
3094
      oprot.writeFieldBegin(PURCHASE_ORDER_NO_FIELD_DESC);
3165
      oprot.writeFieldBegin(PURCHASE_ORDER_NO_FIELD_DESC);
3095
      oprot.writeString(this.purchaseOrderNo);
3166
      oprot.writeString(this.purchaseOrderNo);
3096
      oprot.writeFieldEnd();
3167
      oprot.writeFieldEnd();
3097
    }
3168
    }
-
 
3169
    oprot.writeFieldBegin(COD_FIELD_DESC);
-
 
3170
    oprot.writeBool(this.cod);
-
 
3171
    oprot.writeFieldEnd();
3098
    oprot.writeFieldStop();
3172
    oprot.writeFieldStop();
3099
    oprot.writeStructEnd();
3173
    oprot.writeStructEnd();
3100
  }
3174
  }
3101
 
3175
 
3102
  @Override
3176
  @Override
Line 3329... Line 3403...
3329
      sb.append("null");
3403
      sb.append("null");
3330
    } else {
3404
    } else {
3331
      sb.append(this.purchaseOrderNo);
3405
      sb.append(this.purchaseOrderNo);
3332
    }
3406
    }
3333
    first = false;
3407
    first = false;
-
 
3408
    if (!first) sb.append(", ");
-
 
3409
    sb.append("cod:");
-
 
3410
    sb.append(this.cod);
-
 
3411
    first = false;
3334
    sb.append(")");
3412
    sb.append(")");
3335
    return sb.toString();
3413
    return sb.toString();
3336
  }
3414
  }
3337
 
3415
 
3338
  public void validate() throws TException {
3416
  public void validate() throws TException {