Subversion Repositories SmartDukaan

Rev

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

Rev 1209 Rev 1221
Line 55... Line 55...
55
  private static final TField PICKUP_TIMESTAMP_FIELD_DESC = new TField("pickup_timestamp", TType.I64, (short)27);
55
  private static final TField PICKUP_TIMESTAMP_FIELD_DESC = new TField("pickup_timestamp", TType.I64, (short)27);
56
  private static final TField DELIVERY_TIMESTAMP_FIELD_DESC = new TField("delivery_timestamp", TType.I64, (short)28);
56
  private static final TField DELIVERY_TIMESTAMP_FIELD_DESC = new TField("delivery_timestamp", TType.I64, (short)28);
57
  private static final TField OUTOFSTOCK_TIMESTAMP_FIELD_DESC = new TField("outofstock_timestamp", TType.I64, (short)29);
57
  private static final TField OUTOFSTOCK_TIMESTAMP_FIELD_DESC = new TField("outofstock_timestamp", TType.I64, (short)29);
58
  private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacket_number", TType.I64, (short)30);
58
  private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacket_number", TType.I64, (short)30);
59
  private static final TField RECEIVER_FIELD_DESC = new TField("receiver", TType.STRING, (short)31);
59
  private static final TField RECEIVER_FIELD_DESC = new TField("receiver", TType.STRING, (short)31);
-
 
60
  private static final TField BATCH_NO_FIELD_DESC = new TField("batchNo", TType.I64, (short)32);
-
 
61
  private static final TField SERIAL_NO_FIELD_DESC = new TField("serialNo", TType.I64, (short)33);
60
 
62
 
61
  private long id;
63
  private long id;
62
  private long warehouse_id;
64
  private long warehouse_id;
63
  private List<LineItem> lineitems;
65
  private List<LineItem> lineitems;
64
  private long logistics_provider_id;
66
  private long logistics_provider_id;
Line 87... Line 89...
87
  private long pickup_timestamp;
89
  private long pickup_timestamp;
88
  private long delivery_timestamp;
90
  private long delivery_timestamp;
89
  private long outofstock_timestamp;
91
  private long outofstock_timestamp;
90
  private long jacket_number;
92
  private long jacket_number;
91
  private String receiver;
93
  private String receiver;
-
 
94
  private long batchNo;
-
 
95
  private long serialNo;
92
 
96
 
93
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
97
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
94
  public enum _Fields implements TFieldIdEnum {
98
  public enum _Fields implements TFieldIdEnum {
95
    ID((short)1, "id"),
99
    ID((short)1, "id"),
96
    WAREHOUSE_ID((short)2, "warehouse_id"),
100
    WAREHOUSE_ID((short)2, "warehouse_id"),
Line 146... Line 150...
146
    SHIPPING_TIMESTAMP((short)26, "shipping_timestamp"),
150
    SHIPPING_TIMESTAMP((short)26, "shipping_timestamp"),
147
    PICKUP_TIMESTAMP((short)27, "pickup_timestamp"),
151
    PICKUP_TIMESTAMP((short)27, "pickup_timestamp"),
148
    DELIVERY_TIMESTAMP((short)28, "delivery_timestamp"),
152
    DELIVERY_TIMESTAMP((short)28, "delivery_timestamp"),
149
    OUTOFSTOCK_TIMESTAMP((short)29, "outofstock_timestamp"),
153
    OUTOFSTOCK_TIMESTAMP((short)29, "outofstock_timestamp"),
150
    JACKET_NUMBER((short)30, "jacket_number"),
154
    JACKET_NUMBER((short)30, "jacket_number"),
151
    RECEIVER((short)31, "receiver");
155
    RECEIVER((short)31, "receiver"),
-
 
156
    BATCH_NO((short)32, "batchNo"),
-
 
157
    SERIAL_NO((short)33, "serialNo");
152
 
158
 
153
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
159
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
154
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
160
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
155
 
161
 
156
    static {
162
    static {
Line 215... Line 221...
215
  private static final int __SHIPPING_TIMESTAMP_ISSET_ID = 10;
221
  private static final int __SHIPPING_TIMESTAMP_ISSET_ID = 10;
216
  private static final int __PICKUP_TIMESTAMP_ISSET_ID = 11;
222
  private static final int __PICKUP_TIMESTAMP_ISSET_ID = 11;
217
  private static final int __DELIVERY_TIMESTAMP_ISSET_ID = 12;
223
  private static final int __DELIVERY_TIMESTAMP_ISSET_ID = 12;
218
  private static final int __OUTOFSTOCK_TIMESTAMP_ISSET_ID = 13;
224
  private static final int __OUTOFSTOCK_TIMESTAMP_ISSET_ID = 13;
219
  private static final int __JACKET_NUMBER_ISSET_ID = 14;
225
  private static final int __JACKET_NUMBER_ISSET_ID = 14;
-
 
226
  private static final int __BATCHNO_ISSET_ID = 15;
-
 
227
  private static final int __SERIALNO_ISSET_ID = 16;
220
  private BitSet __isset_bit_vector = new BitSet(15);
228
  private BitSet __isset_bit_vector = new BitSet(17);
221
 
229
 
222
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
230
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
223
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
231
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
224
        new FieldValueMetaData(TType.I64)));
232
        new FieldValueMetaData(TType.I64)));
225
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
233
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
Line 281... Line 289...
281
        new FieldValueMetaData(TType.I64)));
289
        new FieldValueMetaData(TType.I64)));
282
    put(_Fields.JACKET_NUMBER, new FieldMetaData("jacket_number", TFieldRequirementType.DEFAULT, 
290
    put(_Fields.JACKET_NUMBER, new FieldMetaData("jacket_number", TFieldRequirementType.DEFAULT, 
283
        new FieldValueMetaData(TType.I64)));
291
        new FieldValueMetaData(TType.I64)));
284
    put(_Fields.RECEIVER, new FieldMetaData("receiver", TFieldRequirementType.DEFAULT, 
292
    put(_Fields.RECEIVER, new FieldMetaData("receiver", TFieldRequirementType.DEFAULT, 
285
        new FieldValueMetaData(TType.STRING)));
293
        new FieldValueMetaData(TType.STRING)));
-
 
294
    put(_Fields.BATCH_NO, new FieldMetaData("batchNo", TFieldRequirementType.DEFAULT, 
-
 
295
        new FieldValueMetaData(TType.I64)));
-
 
296
    put(_Fields.SERIAL_NO, new FieldMetaData("serialNo", TFieldRequirementType.DEFAULT, 
-
 
297
        new FieldValueMetaData(TType.I64)));
286
  }});
298
  }});
287
 
299
 
288
  static {
300
  static {
289
    FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
301
    FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
290
  }
302
  }
Line 321... Line 333...
321
    long shipping_timestamp,
333
    long shipping_timestamp,
322
    long pickup_timestamp,
334
    long pickup_timestamp,
323
    long delivery_timestamp,
335
    long delivery_timestamp,
324
    long outofstock_timestamp,
336
    long outofstock_timestamp,
325
    long jacket_number,
337
    long jacket_number,
326
    String receiver)
338
    String receiver,
-
 
339
    long batchNo,
-
 
340
    long serialNo)
327
  {
341
  {
328
    this();
342
    this();
329
    this.id = id;
343
    this.id = id;
330
    setIdIsSet(true);
344
    setIdIsSet(true);
331
    this.warehouse_id = warehouse_id;
345
    this.warehouse_id = warehouse_id;
Line 370... Line 384...
370
    this.outofstock_timestamp = outofstock_timestamp;
384
    this.outofstock_timestamp = outofstock_timestamp;
371
    setOutofstock_timestampIsSet(true);
385
    setOutofstock_timestampIsSet(true);
372
    this.jacket_number = jacket_number;
386
    this.jacket_number = jacket_number;
373
    setJacket_numberIsSet(true);
387
    setJacket_numberIsSet(true);
374
    this.receiver = receiver;
388
    this.receiver = receiver;
-
 
389
    this.batchNo = batchNo;
-
 
390
    setBatchNoIsSet(true);
-
 
391
    this.serialNo = serialNo;
-
 
392
    setSerialNoIsSet(true);
375
  }
393
  }
376
 
394
 
377
  /**
395
  /**
378
   * Performs a deep copy on <i>other</i>.
396
   * Performs a deep copy on <i>other</i>.
379
   */
397
   */
Line 445... Line 463...
445
    this.outofstock_timestamp = other.outofstock_timestamp;
463
    this.outofstock_timestamp = other.outofstock_timestamp;
446
    this.jacket_number = other.jacket_number;
464
    this.jacket_number = other.jacket_number;
447
    if (other.isSetReceiver()) {
465
    if (other.isSetReceiver()) {
448
      this.receiver = other.receiver;
466
      this.receiver = other.receiver;
449
    }
467
    }
-
 
468
    this.batchNo = other.batchNo;
-
 
469
    this.serialNo = other.serialNo;
450
  }
470
  }
451
 
471
 
452
  public Order deepCopy() {
472
  public Order deepCopy() {
453
    return new Order(this);
473
    return new Order(this);
454
  }
474
  }
Line 1252... Line 1272...
1252
    if (!value) {
1272
    if (!value) {
1253
      this.receiver = null;
1273
      this.receiver = null;
1254
    }
1274
    }
1255
  }
1275
  }
1256
 
1276
 
-
 
1277
  public long getBatchNo() {
-
 
1278
    return this.batchNo;
-
 
1279
  }
-
 
1280
 
-
 
1281
  public Order setBatchNo(long batchNo) {
-
 
1282
    this.batchNo = batchNo;
-
 
1283
    setBatchNoIsSet(true);
-
 
1284
    return this;
-
 
1285
  }
-
 
1286
 
-
 
1287
  public void unsetBatchNo() {
-
 
1288
    __isset_bit_vector.clear(__BATCHNO_ISSET_ID);
-
 
1289
  }
-
 
1290
 
-
 
1291
  /** Returns true if field batchNo is set (has been asigned a value) and false otherwise */
-
 
1292
  public boolean isSetBatchNo() {
-
 
1293
    return __isset_bit_vector.get(__BATCHNO_ISSET_ID);
-
 
1294
  }
-
 
1295
 
-
 
1296
  public void setBatchNoIsSet(boolean value) {
-
 
1297
    __isset_bit_vector.set(__BATCHNO_ISSET_ID, value);
-
 
1298
  }
-
 
1299
 
-
 
1300
  public long getSerialNo() {
-
 
1301
    return this.serialNo;
-
 
1302
  }
-
 
1303
 
-
 
1304
  public Order setSerialNo(long serialNo) {
-
 
1305
    this.serialNo = serialNo;
-
 
1306
    setSerialNoIsSet(true);
-
 
1307
    return this;
-
 
1308
  }
-
 
1309
 
-
 
1310
  public void unsetSerialNo() {
-
 
1311
    __isset_bit_vector.clear(__SERIALNO_ISSET_ID);
-
 
1312
  }
-
 
1313
 
-
 
1314
  /** Returns true if field serialNo is set (has been asigned a value) and false otherwise */
-
 
1315
  public boolean isSetSerialNo() {
-
 
1316
    return __isset_bit_vector.get(__SERIALNO_ISSET_ID);
-
 
1317
  }
-
 
1318
 
-
 
1319
  public void setSerialNoIsSet(boolean value) {
-
 
1320
    __isset_bit_vector.set(__SERIALNO_ISSET_ID, value);
-
 
1321
  }
-
 
1322
 
1257
  public void setFieldValue(_Fields field, Object value) {
1323
  public void setFieldValue(_Fields field, Object value) {
1258
    switch (field) {
1324
    switch (field) {
1259
    case ID:
1325
    case ID:
1260
      if (value == null) {
1326
      if (value == null) {
1261
        unsetId();
1327
        unsetId();
Line 1502... Line 1568...
1502
      } else {
1568
      } else {
1503
        setReceiver((String)value);
1569
        setReceiver((String)value);
1504
      }
1570
      }
1505
      break;
1571
      break;
1506
 
1572
 
-
 
1573
    case BATCH_NO:
-
 
1574
      if (value == null) {
-
 
1575
        unsetBatchNo();
-
 
1576
      } else {
-
 
1577
        setBatchNo((Long)value);
-
 
1578
      }
-
 
1579
      break;
-
 
1580
 
-
 
1581
    case SERIAL_NO:
-
 
1582
      if (value == null) {
-
 
1583
        unsetSerialNo();
-
 
1584
      } else {
-
 
1585
        setSerialNo((Long)value);
-
 
1586
      }
-
 
1587
      break;
-
 
1588
 
1507
    }
1589
    }
1508
  }
1590
  }
1509
 
1591
 
1510
  public void setFieldValue(int fieldID, Object value) {
1592
  public void setFieldValue(int fieldID, Object value) {
1511
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1593
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 1604... Line 1686...
1604
      return new Long(getJacket_number());
1686
      return new Long(getJacket_number());
1605
 
1687
 
1606
    case RECEIVER:
1688
    case RECEIVER:
1607
      return getReceiver();
1689
      return getReceiver();
1608
 
1690
 
-
 
1691
    case BATCH_NO:
-
 
1692
      return new Long(getBatchNo());
-
 
1693
 
-
 
1694
    case SERIAL_NO:
-
 
1695
      return new Long(getSerialNo());
-
 
1696
 
1609
    }
1697
    }
1610
    throw new IllegalStateException();
1698
    throw new IllegalStateException();
1611
  }
1699
  }
1612
 
1700
 
1613
  public Object getFieldValue(int fieldId) {
1701
  public Object getFieldValue(int fieldId) {
Line 1677... Line 1765...
1677
      return isSetOutofstock_timestamp();
1765
      return isSetOutofstock_timestamp();
1678
    case JACKET_NUMBER:
1766
    case JACKET_NUMBER:
1679
      return isSetJacket_number();
1767
      return isSetJacket_number();
1680
    case RECEIVER:
1768
    case RECEIVER:
1681
      return isSetReceiver();
1769
      return isSetReceiver();
-
 
1770
    case BATCH_NO:
-
 
1771
      return isSetBatchNo();
-
 
1772
    case SERIAL_NO:
-
 
1773
      return isSetSerialNo();
1682
    }
1774
    }
1683
    throw new IllegalStateException();
1775
    throw new IllegalStateException();
1684
  }
1776
  }
1685
 
1777
 
1686
  public boolean isSet(int fieldID) {
1778
  public boolean isSet(int fieldID) {
Line 1977... Line 2069...
1977
        return false;
2069
        return false;
1978
      if (!this.receiver.equals(that.receiver))
2070
      if (!this.receiver.equals(that.receiver))
1979
        return false;
2071
        return false;
1980
    }
2072
    }
1981
 
2073
 
-
 
2074
    boolean this_present_batchNo = true;
-
 
2075
    boolean that_present_batchNo = true;
-
 
2076
    if (this_present_batchNo || that_present_batchNo) {
-
 
2077
      if (!(this_present_batchNo && that_present_batchNo))
-
 
2078
        return false;
-
 
2079
      if (this.batchNo != that.batchNo)
-
 
2080
        return false;
-
 
2081
    }
-
 
2082
 
-
 
2083
    boolean this_present_serialNo = true;
-
 
2084
    boolean that_present_serialNo = true;
-
 
2085
    if (this_present_serialNo || that_present_serialNo) {
-
 
2086
      if (!(this_present_serialNo && that_present_serialNo))
-
 
2087
        return false;
-
 
2088
      if (this.serialNo != that.serialNo)
-
 
2089
        return false;
-
 
2090
    }
-
 
2091
 
1982
    return true;
2092
    return true;
1983
  }
2093
  }
1984
 
2094
 
1985
  @Override
2095
  @Override
1986
  public int hashCode() {
2096
  public int hashCode() {
Line 2241... Line 2351...
2241
    }
2351
    }
2242
    lastComparison = TBaseHelper.compareTo(receiver, typedOther.receiver);
2352
    lastComparison = TBaseHelper.compareTo(receiver, typedOther.receiver);
2243
    if (lastComparison != 0) {
2353
    if (lastComparison != 0) {
2244
      return lastComparison;
2354
      return lastComparison;
2245
    }
2355
    }
-
 
2356
    lastComparison = Boolean.valueOf(isSetBatchNo()).compareTo(isSetBatchNo());
-
 
2357
    if (lastComparison != 0) {
-
 
2358
      return lastComparison;
-
 
2359
    }
-
 
2360
    lastComparison = TBaseHelper.compareTo(batchNo, typedOther.batchNo);
-
 
2361
    if (lastComparison != 0) {
-
 
2362
      return lastComparison;
-
 
2363
    }
-
 
2364
    lastComparison = Boolean.valueOf(isSetSerialNo()).compareTo(isSetSerialNo());
-
 
2365
    if (lastComparison != 0) {
-
 
2366
      return lastComparison;
-
 
2367
    }
-
 
2368
    lastComparison = TBaseHelper.compareTo(serialNo, typedOther.serialNo);
-
 
2369
    if (lastComparison != 0) {
-
 
2370
      return lastComparison;
-
 
2371
    }
2246
    return 0;
2372
    return 0;
2247
  }
2373
  }
2248
 
2374
 
2249
  public void read(TProtocol iprot) throws TException {
2375
  public void read(TProtocol iprot) throws TException {
2250
    TField field;
2376
    TField field;
Line 2501... Line 2627...
2501
              this.receiver = iprot.readString();
2627
              this.receiver = iprot.readString();
2502
            } else { 
2628
            } else { 
2503
              TProtocolUtil.skip(iprot, field.type);
2629
              TProtocolUtil.skip(iprot, field.type);
2504
            }
2630
            }
2505
            break;
2631
            break;
-
 
2632
          case BATCH_NO:
-
 
2633
            if (field.type == TType.I64) {
-
 
2634
              this.batchNo = iprot.readI64();
-
 
2635
              setBatchNoIsSet(true);
-
 
2636
            } else { 
-
 
2637
              TProtocolUtil.skip(iprot, field.type);
-
 
2638
            }
-
 
2639
            break;
-
 
2640
          case SERIAL_NO:
-
 
2641
            if (field.type == TType.I64) {
-
 
2642
              this.serialNo = iprot.readI64();
-
 
2643
              setSerialNoIsSet(true);
-
 
2644
            } else { 
-
 
2645
              TProtocolUtil.skip(iprot, field.type);
-
 
2646
            }
-
 
2647
            break;
2506
        }
2648
        }
2507
        iprot.readFieldEnd();
2649
        iprot.readFieldEnd();
2508
      }
2650
      }
2509
    }
2651
    }
2510
    iprot.readStructEnd();
2652
    iprot.readStructEnd();
Line 2645... Line 2787...
2645
    if (this.receiver != null) {
2787
    if (this.receiver != null) {
2646
      oprot.writeFieldBegin(RECEIVER_FIELD_DESC);
2788
      oprot.writeFieldBegin(RECEIVER_FIELD_DESC);
2647
      oprot.writeString(this.receiver);
2789
      oprot.writeString(this.receiver);
2648
      oprot.writeFieldEnd();
2790
      oprot.writeFieldEnd();
2649
    }
2791
    }
-
 
2792
    oprot.writeFieldBegin(BATCH_NO_FIELD_DESC);
-
 
2793
    oprot.writeI64(this.batchNo);
-
 
2794
    oprot.writeFieldEnd();
-
 
2795
    oprot.writeFieldBegin(SERIAL_NO_FIELD_DESC);
-
 
2796
    oprot.writeI64(this.serialNo);
-
 
2797
    oprot.writeFieldEnd();
2650
    oprot.writeFieldStop();
2798
    oprot.writeFieldStop();
2651
    oprot.writeStructEnd();
2799
    oprot.writeStructEnd();
2652
  }
2800
  }
2653
 
2801
 
2654
  @Override
2802
  @Override
Line 2849... Line 2997...
2849
      sb.append("null");
2997
      sb.append("null");
2850
    } else {
2998
    } else {
2851
      sb.append(this.receiver);
2999
      sb.append(this.receiver);
2852
    }
3000
    }
2853
    first = false;
3001
    first = false;
-
 
3002
    if (!first) sb.append(", ");
-
 
3003
    sb.append("batchNo:");
-
 
3004
    sb.append(this.batchNo);
-
 
3005
    first = false;
-
 
3006
    if (!first) sb.append(", ");
-
 
3007
    sb.append("serialNo:");
-
 
3008
    sb.append(this.serialNo);
-
 
3009
    first = false;
2854
    sb.append(")");
3010
    sb.append(")");
2855
    return sb.toString();
3011
    return sb.toString();
2856
  }
3012
  }
2857
 
3013
 
2858
  public void validate() throws TException {
3014
  public void validate() throws TException {