Subversion Repositories SmartDukaan

Rev

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

Rev 2219 Rev 2538
Line 57... Line 57...
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);
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);
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);
-
 
63
  private static final TField PICKUP_REQUEST_NO_FIELD_DESC = new TField("pickupRequestNo", TType.STRING, (short)35);
62
 
64
 
63
  private long id;
65
  private long id;
64
  private long warehouse_id;
66
  private long warehouse_id;
65
  private List<LineItem> lineitems;
67
  private List<LineItem> lineitems;
66
  private long logistics_provider_id;
68
  private long logistics_provider_id;
Line 91... Line 93...
91
  private long outofstock_timestamp;
93
  private long outofstock_timestamp;
92
  private long jacket_number;
94
  private long jacket_number;
93
  private String receiver;
95
  private String receiver;
94
  private long batchNo;
96
  private long batchNo;
95
  private long serialNo;
97
  private long serialNo;
-
 
98
  private boolean doaFlag;
-
 
99
  private String pickupRequestNo;
96
 
100
 
97
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
101
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
98
  public enum _Fields implements TFieldIdEnum {
102
  public enum _Fields implements TFieldIdEnum {
99
    ID((short)1, "id"),
103
    ID((short)1, "id"),
100
    WAREHOUSE_ID((short)2, "warehouse_id"),
104
    WAREHOUSE_ID((short)2, "warehouse_id"),
Line 152... Line 156...
152
    DELIVERY_TIMESTAMP((short)28, "delivery_timestamp"),
156
    DELIVERY_TIMESTAMP((short)28, "delivery_timestamp"),
153
    OUTOFSTOCK_TIMESTAMP((short)29, "outofstock_timestamp"),
157
    OUTOFSTOCK_TIMESTAMP((short)29, "outofstock_timestamp"),
154
    JACKET_NUMBER((short)30, "jacket_number"),
158
    JACKET_NUMBER((short)30, "jacket_number"),
155
    RECEIVER((short)31, "receiver"),
159
    RECEIVER((short)31, "receiver"),
156
    BATCH_NO((short)32, "batchNo"),
160
    BATCH_NO((short)32, "batchNo"),
157
    SERIAL_NO((short)33, "serialNo");
161
    SERIAL_NO((short)33, "serialNo"),
-
 
162
    DOA_FLAG((short)34, "doaFlag"),
-
 
163
    PICKUP_REQUEST_NO((short)35, "pickupRequestNo");
158
 
164
 
159
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
165
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
160
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
166
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
161
 
167
 
162
    static {
168
    static {
Line 223... Line 229...
223
  private static final int __DELIVERY_TIMESTAMP_ISSET_ID = 12;
229
  private static final int __DELIVERY_TIMESTAMP_ISSET_ID = 12;
224
  private static final int __OUTOFSTOCK_TIMESTAMP_ISSET_ID = 13;
230
  private static final int __OUTOFSTOCK_TIMESTAMP_ISSET_ID = 13;
225
  private static final int __JACKET_NUMBER_ISSET_ID = 14;
231
  private static final int __JACKET_NUMBER_ISSET_ID = 14;
226
  private static final int __BATCHNO_ISSET_ID = 15;
232
  private static final int __BATCHNO_ISSET_ID = 15;
227
  private static final int __SERIALNO_ISSET_ID = 16;
233
  private static final int __SERIALNO_ISSET_ID = 16;
-
 
234
  private static final int __DOAFLAG_ISSET_ID = 17;
228
  private BitSet __isset_bit_vector = new BitSet(17);
235
  private BitSet __isset_bit_vector = new BitSet(18);
229
 
236
 
230
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
237
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
231
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
238
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
232
        new FieldValueMetaData(TType.I64)));
239
        new FieldValueMetaData(TType.I64)));
233
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
240
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
Line 293... Line 300...
293
        new FieldValueMetaData(TType.STRING)));
300
        new FieldValueMetaData(TType.STRING)));
294
    put(_Fields.BATCH_NO, new FieldMetaData("batchNo", TFieldRequirementType.DEFAULT, 
301
    put(_Fields.BATCH_NO, new FieldMetaData("batchNo", TFieldRequirementType.DEFAULT, 
295
        new FieldValueMetaData(TType.I64)));
302
        new FieldValueMetaData(TType.I64)));
296
    put(_Fields.SERIAL_NO, new FieldMetaData("serialNo", TFieldRequirementType.DEFAULT, 
303
    put(_Fields.SERIAL_NO, new FieldMetaData("serialNo", TFieldRequirementType.DEFAULT, 
297
        new FieldValueMetaData(TType.I64)));
304
        new FieldValueMetaData(TType.I64)));
-
 
305
    put(_Fields.DOA_FLAG, new FieldMetaData("doaFlag", TFieldRequirementType.DEFAULT, 
-
 
306
        new FieldValueMetaData(TType.BOOL)));
-
 
307
    put(_Fields.PICKUP_REQUEST_NO, new FieldMetaData("pickupRequestNo", TFieldRequirementType.DEFAULT, 
-
 
308
        new FieldValueMetaData(TType.STRING)));
298
  }});
309
  }});
299
 
310
 
300
  static {
311
  static {
301
    FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
312
    FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
302
  }
313
  }
Line 335... Line 346...
335
    long delivery_timestamp,
346
    long delivery_timestamp,
336
    long outofstock_timestamp,
347
    long outofstock_timestamp,
337
    long jacket_number,
348
    long jacket_number,
338
    String receiver,
349
    String receiver,
339
    long batchNo,
350
    long batchNo,
340
    long serialNo)
351
    long serialNo,
-
 
352
    boolean doaFlag,
-
 
353
    String pickupRequestNo)
341
  {
354
  {
342
    this();
355
    this();
343
    this.id = id;
356
    this.id = id;
344
    setIdIsSet(true);
357
    setIdIsSet(true);
345
    this.warehouse_id = warehouse_id;
358
    this.warehouse_id = warehouse_id;
Line 388... Line 401...
388
    this.receiver = receiver;
401
    this.receiver = receiver;
389
    this.batchNo = batchNo;
402
    this.batchNo = batchNo;
390
    setBatchNoIsSet(true);
403
    setBatchNoIsSet(true);
391
    this.serialNo = serialNo;
404
    this.serialNo = serialNo;
392
    setSerialNoIsSet(true);
405
    setSerialNoIsSet(true);
-
 
406
    this.doaFlag = doaFlag;
-
 
407
    setDoaFlagIsSet(true);
-
 
408
    this.pickupRequestNo = pickupRequestNo;
393
  }
409
  }
394
 
410
 
395
  /**
411
  /**
396
   * Performs a deep copy on <i>other</i>.
412
   * Performs a deep copy on <i>other</i>.
397
   */
413
   */
Line 465... Line 481...
465
    if (other.isSetReceiver()) {
481
    if (other.isSetReceiver()) {
466
      this.receiver = other.receiver;
482
      this.receiver = other.receiver;
467
    }
483
    }
468
    this.batchNo = other.batchNo;
484
    this.batchNo = other.batchNo;
469
    this.serialNo = other.serialNo;
485
    this.serialNo = other.serialNo;
-
 
486
    this.doaFlag = other.doaFlag;
-
 
487
    if (other.isSetPickupRequestNo()) {
-
 
488
      this.pickupRequestNo = other.pickupRequestNo;
-
 
489
    }
470
  }
490
  }
471
 
491
 
472
  public Order deepCopy() {
492
  public Order deepCopy() {
473
    return new Order(this);
493
    return new Order(this);
474
  }
494
  }
Line 1318... Line 1338...
1318
 
1338
 
1319
  public void setSerialNoIsSet(boolean value) {
1339
  public void setSerialNoIsSet(boolean value) {
1320
    __isset_bit_vector.set(__SERIALNO_ISSET_ID, value);
1340
    __isset_bit_vector.set(__SERIALNO_ISSET_ID, value);
1321
  }
1341
  }
1322
 
1342
 
-
 
1343
  public boolean isDoaFlag() {
-
 
1344
    return this.doaFlag;
-
 
1345
  }
-
 
1346
 
-
 
1347
  public Order setDoaFlag(boolean doaFlag) {
-
 
1348
    this.doaFlag = doaFlag;
-
 
1349
    setDoaFlagIsSet(true);
-
 
1350
    return this;
-
 
1351
  }
-
 
1352
 
-
 
1353
  public void unsetDoaFlag() {
-
 
1354
    __isset_bit_vector.clear(__DOAFLAG_ISSET_ID);
-
 
1355
  }
-
 
1356
 
-
 
1357
  /** Returns true if field doaFlag is set (has been asigned a value) and false otherwise */
-
 
1358
  public boolean isSetDoaFlag() {
-
 
1359
    return __isset_bit_vector.get(__DOAFLAG_ISSET_ID);
-
 
1360
  }
-
 
1361
 
-
 
1362
  public void setDoaFlagIsSet(boolean value) {
-
 
1363
    __isset_bit_vector.set(__DOAFLAG_ISSET_ID, value);
-
 
1364
  }
-
 
1365
 
-
 
1366
  public String getPickupRequestNo() {
-
 
1367
    return this.pickupRequestNo;
-
 
1368
  }
-
 
1369
 
-
 
1370
  public Order setPickupRequestNo(String pickupRequestNo) {
-
 
1371
    this.pickupRequestNo = pickupRequestNo;
-
 
1372
    return this;
-
 
1373
  }
-
 
1374
 
-
 
1375
  public void unsetPickupRequestNo() {
-
 
1376
    this.pickupRequestNo = null;
-
 
1377
  }
-
 
1378
 
-
 
1379
  /** Returns true if field pickupRequestNo is set (has been asigned a value) and false otherwise */
-
 
1380
  public boolean isSetPickupRequestNo() {
-
 
1381
    return this.pickupRequestNo != null;
-
 
1382
  }
-
 
1383
 
-
 
1384
  public void setPickupRequestNoIsSet(boolean value) {
-
 
1385
    if (!value) {
-
 
1386
      this.pickupRequestNo = null;
-
 
1387
    }
-
 
1388
  }
-
 
1389
 
1323
  public void setFieldValue(_Fields field, Object value) {
1390
  public void setFieldValue(_Fields field, Object value) {
1324
    switch (field) {
1391
    switch (field) {
1325
    case ID:
1392
    case ID:
1326
      if (value == null) {
1393
      if (value == null) {
1327
        unsetId();
1394
        unsetId();
Line 1584... Line 1651...
1584
      } else {
1651
      } else {
1585
        setSerialNo((Long)value);
1652
        setSerialNo((Long)value);
1586
      }
1653
      }
1587
      break;
1654
      break;
1588
 
1655
 
-
 
1656
    case DOA_FLAG:
-
 
1657
      if (value == null) {
-
 
1658
        unsetDoaFlag();
-
 
1659
      } else {
-
 
1660
        setDoaFlag((Boolean)value);
-
 
1661
      }
-
 
1662
      break;
-
 
1663
 
-
 
1664
    case PICKUP_REQUEST_NO:
-
 
1665
      if (value == null) {
-
 
1666
        unsetPickupRequestNo();
-
 
1667
      } else {
-
 
1668
        setPickupRequestNo((String)value);
-
 
1669
      }
-
 
1670
      break;
-
 
1671
 
1589
    }
1672
    }
1590
  }
1673
  }
1591
 
1674
 
1592
  public void setFieldValue(int fieldID, Object value) {
1675
  public void setFieldValue(int fieldID, Object value) {
1593
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1676
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 1692... Line 1775...
1692
      return new Long(getBatchNo());
1775
      return new Long(getBatchNo());
1693
 
1776
 
1694
    case SERIAL_NO:
1777
    case SERIAL_NO:
1695
      return new Long(getSerialNo());
1778
      return new Long(getSerialNo());
1696
 
1779
 
-
 
1780
    case DOA_FLAG:
-
 
1781
      return new Boolean(isDoaFlag());
-
 
1782
 
-
 
1783
    case PICKUP_REQUEST_NO:
-
 
1784
      return getPickupRequestNo();
-
 
1785
 
1697
    }
1786
    }
1698
    throw new IllegalStateException();
1787
    throw new IllegalStateException();
1699
  }
1788
  }
1700
 
1789
 
1701
  public Object getFieldValue(int fieldId) {
1790
  public Object getFieldValue(int fieldId) {
Line 1769... Line 1858...
1769
      return isSetReceiver();
1858
      return isSetReceiver();
1770
    case BATCH_NO:
1859
    case BATCH_NO:
1771
      return isSetBatchNo();
1860
      return isSetBatchNo();
1772
    case SERIAL_NO:
1861
    case SERIAL_NO:
1773
      return isSetSerialNo();
1862
      return isSetSerialNo();
-
 
1863
    case DOA_FLAG:
-
 
1864
      return isSetDoaFlag();
-
 
1865
    case PICKUP_REQUEST_NO:
-
 
1866
      return isSetPickupRequestNo();
1774
    }
1867
    }
1775
    throw new IllegalStateException();
1868
    throw new IllegalStateException();
1776
  }
1869
  }
1777
 
1870
 
1778
  public boolean isSet(int fieldID) {
1871
  public boolean isSet(int fieldID) {
Line 2087... Line 2180...
2087
        return false;
2180
        return false;
2088
      if (this.serialNo != that.serialNo)
2181
      if (this.serialNo != that.serialNo)
2089
        return false;
2182
        return false;
2090
    }
2183
    }
2091
 
2184
 
-
 
2185
    boolean this_present_doaFlag = true;
-
 
2186
    boolean that_present_doaFlag = true;
-
 
2187
    if (this_present_doaFlag || that_present_doaFlag) {
-
 
2188
      if (!(this_present_doaFlag && that_present_doaFlag))
-
 
2189
        return false;
-
 
2190
      if (this.doaFlag != that.doaFlag)
-
 
2191
        return false;
-
 
2192
    }
-
 
2193
 
-
 
2194
    boolean this_present_pickupRequestNo = true && this.isSetPickupRequestNo();
-
 
2195
    boolean that_present_pickupRequestNo = true && that.isSetPickupRequestNo();
-
 
2196
    if (this_present_pickupRequestNo || that_present_pickupRequestNo) {
-
 
2197
      if (!(this_present_pickupRequestNo && that_present_pickupRequestNo))
-
 
2198
        return false;
-
 
2199
      if (!this.pickupRequestNo.equals(that.pickupRequestNo))
-
 
2200
        return false;
-
 
2201
    }
-
 
2202
 
2092
    return true;
2203
    return true;
2093
  }
2204
  }
2094
 
2205
 
2095
  @Override
2206
  @Override
2096
  public int hashCode() {
2207
  public int hashCode() {
Line 2367... Line 2478...
2367
    }
2478
    }
2368
    lastComparison = TBaseHelper.compareTo(serialNo, typedOther.serialNo);
2479
    lastComparison = TBaseHelper.compareTo(serialNo, typedOther.serialNo);
2369
    if (lastComparison != 0) {
2480
    if (lastComparison != 0) {
2370
      return lastComparison;
2481
      return lastComparison;
2371
    }
2482
    }
-
 
2483
    lastComparison = Boolean.valueOf(isSetDoaFlag()).compareTo(isSetDoaFlag());
-
 
2484
    if (lastComparison != 0) {
-
 
2485
      return lastComparison;
-
 
2486
    }
-
 
2487
    lastComparison = TBaseHelper.compareTo(doaFlag, typedOther.doaFlag);
-
 
2488
    if (lastComparison != 0) {
-
 
2489
      return lastComparison;
-
 
2490
    }
-
 
2491
    lastComparison = Boolean.valueOf(isSetPickupRequestNo()).compareTo(isSetPickupRequestNo());
-
 
2492
    if (lastComparison != 0) {
-
 
2493
      return lastComparison;
-
 
2494
    }
-
 
2495
    lastComparison = TBaseHelper.compareTo(pickupRequestNo, typedOther.pickupRequestNo);
-
 
2496
    if (lastComparison != 0) {
-
 
2497
      return lastComparison;
-
 
2498
    }
2372
    return 0;
2499
    return 0;
2373
  }
2500
  }
2374
 
2501
 
2375
  public void read(TProtocol iprot) throws TException {
2502
  public void read(TProtocol iprot) throws TException {
2376
    TField field;
2503
    TField field;
Line 2643... Line 2770...
2643
              setSerialNoIsSet(true);
2770
              setSerialNoIsSet(true);
2644
            } else { 
2771
            } else { 
2645
              TProtocolUtil.skip(iprot, field.type);
2772
              TProtocolUtil.skip(iprot, field.type);
2646
            }
2773
            }
2647
            break;
2774
            break;
-
 
2775
          case DOA_FLAG:
-
 
2776
            if (field.type == TType.BOOL) {
-
 
2777
              this.doaFlag = iprot.readBool();
-
 
2778
              setDoaFlagIsSet(true);
-
 
2779
            } else { 
-
 
2780
              TProtocolUtil.skip(iprot, field.type);
-
 
2781
            }
-
 
2782
            break;
-
 
2783
          case PICKUP_REQUEST_NO:
-
 
2784
            if (field.type == TType.STRING) {
-
 
2785
              this.pickupRequestNo = iprot.readString();
-
 
2786
            } else { 
-
 
2787
              TProtocolUtil.skip(iprot, field.type);
-
 
2788
            }
-
 
2789
            break;
2648
        }
2790
        }
2649
        iprot.readFieldEnd();
2791
        iprot.readFieldEnd();
2650
      }
2792
      }
2651
    }
2793
    }
2652
    iprot.readStructEnd();
2794
    iprot.readStructEnd();
Line 2793... Line 2935...
2793
    oprot.writeI64(this.batchNo);
2935
    oprot.writeI64(this.batchNo);
2794
    oprot.writeFieldEnd();
2936
    oprot.writeFieldEnd();
2795
    oprot.writeFieldBegin(SERIAL_NO_FIELD_DESC);
2937
    oprot.writeFieldBegin(SERIAL_NO_FIELD_DESC);
2796
    oprot.writeI64(this.serialNo);
2938
    oprot.writeI64(this.serialNo);
2797
    oprot.writeFieldEnd();
2939
    oprot.writeFieldEnd();
-
 
2940
    oprot.writeFieldBegin(DOA_FLAG_FIELD_DESC);
-
 
2941
    oprot.writeBool(this.doaFlag);
-
 
2942
    oprot.writeFieldEnd();
-
 
2943
    if (this.pickupRequestNo != null) {
-
 
2944
      oprot.writeFieldBegin(PICKUP_REQUEST_NO_FIELD_DESC);
-
 
2945
      oprot.writeString(this.pickupRequestNo);
-
 
2946
      oprot.writeFieldEnd();
-
 
2947
    }
2798
    oprot.writeFieldStop();
2948
    oprot.writeFieldStop();
2799
    oprot.writeStructEnd();
2949
    oprot.writeStructEnd();
2800
  }
2950
  }
2801
 
2951
 
2802
  @Override
2952
  @Override
Line 3005... Line 3155...
3005
    first = false;
3155
    first = false;
3006
    if (!first) sb.append(", ");
3156
    if (!first) sb.append(", ");
3007
    sb.append("serialNo:");
3157
    sb.append("serialNo:");
3008
    sb.append(this.serialNo);
3158
    sb.append(this.serialNo);
3009
    first = false;
3159
    first = false;
-
 
3160
    if (!first) sb.append(", ");
-
 
3161
    sb.append("doaFlag:");
-
 
3162
    sb.append(this.doaFlag);
-
 
3163
    first = false;
-
 
3164
    if (!first) sb.append(", ");
-
 
3165
    sb.append("pickupRequestNo:");
-
 
3166
    if (this.pickupRequestNo == null) {
-
 
3167
      sb.append("null");
-
 
3168
    } else {
-
 
3169
      sb.append(this.pickupRequestNo);
-
 
3170
    }
-
 
3171
    first = false;
3010
    sb.append(")");
3172
    sb.append(")");
3011
    return sb.toString();
3173
    return sb.toString();
3012
  }
3174
  }
3013
 
3175
 
3014
  public void validate() throws TException {
3176
  public void validate() throws TException {