Subversion Repositories SmartDukaan

Rev

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

Rev 2538 Rev 2677
Line 59... Line 59...
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);
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
 
65
 
65
  private long id;
66
  private long id;
66
  private long warehouse_id;
67
  private long warehouse_id;
67
  private List<LineItem> lineitems;
68
  private List<LineItem> lineitems;
68
  private long logistics_provider_id;
69
  private long logistics_provider_id;
Line 95... Line 96...
95
  private String receiver;
96
  private String receiver;
96
  private long batchNo;
97
  private long batchNo;
97
  private long serialNo;
98
  private long serialNo;
98
  private boolean doaFlag;
99
  private boolean doaFlag;
99
  private String pickupRequestNo;
100
  private String pickupRequestNo;
-
 
101
  private long transactionId;
100
 
102
 
101
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
103
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
102
  public enum _Fields implements TFieldIdEnum {
104
  public enum _Fields implements TFieldIdEnum {
103
    ID((short)1, "id"),
105
    ID((short)1, "id"),
104
    WAREHOUSE_ID((short)2, "warehouse_id"),
106
    WAREHOUSE_ID((short)2, "warehouse_id"),
Line 158... Line 160...
158
    JACKET_NUMBER((short)30, "jacket_number"),
160
    JACKET_NUMBER((short)30, "jacket_number"),
159
    RECEIVER((short)31, "receiver"),
161
    RECEIVER((short)31, "receiver"),
160
    BATCH_NO((short)32, "batchNo"),
162
    BATCH_NO((short)32, "batchNo"),
161
    SERIAL_NO((short)33, "serialNo"),
163
    SERIAL_NO((short)33, "serialNo"),
162
    DOA_FLAG((short)34, "doaFlag"),
164
    DOA_FLAG((short)34, "doaFlag"),
163
    PICKUP_REQUEST_NO((short)35, "pickupRequestNo");
165
    PICKUP_REQUEST_NO((short)35, "pickupRequestNo"),
-
 
166
    TRANSACTION_ID((short)36, "transactionId");
164
 
167
 
165
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
168
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
166
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
169
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
167
 
170
 
168
    static {
171
    static {
Line 230... Line 233...
230
  private static final int __OUTOFSTOCK_TIMESTAMP_ISSET_ID = 13;
233
  private static final int __OUTOFSTOCK_TIMESTAMP_ISSET_ID = 13;
231
  private static final int __JACKET_NUMBER_ISSET_ID = 14;
234
  private static final int __JACKET_NUMBER_ISSET_ID = 14;
232
  private static final int __BATCHNO_ISSET_ID = 15;
235
  private static final int __BATCHNO_ISSET_ID = 15;
233
  private static final int __SERIALNO_ISSET_ID = 16;
236
  private static final int __SERIALNO_ISSET_ID = 16;
234
  private static final int __DOAFLAG_ISSET_ID = 17;
237
  private static final int __DOAFLAG_ISSET_ID = 17;
-
 
238
  private static final int __TRANSACTIONID_ISSET_ID = 18;
235
  private BitSet __isset_bit_vector = new BitSet(18);
239
  private BitSet __isset_bit_vector = new BitSet(19);
236
 
240
 
237
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
241
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
238
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
242
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
239
        new FieldValueMetaData(TType.I64)));
243
        new FieldValueMetaData(TType.I64)));
240
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
244
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
Line 304... Line 308...
304
        new FieldValueMetaData(TType.I64)));
308
        new FieldValueMetaData(TType.I64)));
305
    put(_Fields.DOA_FLAG, new FieldMetaData("doaFlag", TFieldRequirementType.DEFAULT, 
309
    put(_Fields.DOA_FLAG, new FieldMetaData("doaFlag", TFieldRequirementType.DEFAULT, 
306
        new FieldValueMetaData(TType.BOOL)));
310
        new FieldValueMetaData(TType.BOOL)));
307
    put(_Fields.PICKUP_REQUEST_NO, new FieldMetaData("pickupRequestNo", TFieldRequirementType.DEFAULT, 
311
    put(_Fields.PICKUP_REQUEST_NO, new FieldMetaData("pickupRequestNo", TFieldRequirementType.DEFAULT, 
308
        new FieldValueMetaData(TType.STRING)));
312
        new FieldValueMetaData(TType.STRING)));
-
 
313
    put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
-
 
314
        new FieldValueMetaData(TType.I64)));
309
  }});
315
  }});
310
 
316
 
311
  static {
317
  static {
312
    FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
318
    FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
313
  }
319
  }
Line 348... Line 354...
348
    long jacket_number,
354
    long jacket_number,
349
    String receiver,
355
    String receiver,
350
    long batchNo,
356
    long batchNo,
351
    long serialNo,
357
    long serialNo,
352
    boolean doaFlag,
358
    boolean doaFlag,
353
    String pickupRequestNo)
359
    String pickupRequestNo,
-
 
360
    long transactionId)
354
  {
361
  {
355
    this();
362
    this();
356
    this.id = id;
363
    this.id = id;
357
    setIdIsSet(true);
364
    setIdIsSet(true);
358
    this.warehouse_id = warehouse_id;
365
    this.warehouse_id = warehouse_id;
Line 404... Line 411...
404
    this.serialNo = serialNo;
411
    this.serialNo = serialNo;
405
    setSerialNoIsSet(true);
412
    setSerialNoIsSet(true);
406
    this.doaFlag = doaFlag;
413
    this.doaFlag = doaFlag;
407
    setDoaFlagIsSet(true);
414
    setDoaFlagIsSet(true);
408
    this.pickupRequestNo = pickupRequestNo;
415
    this.pickupRequestNo = pickupRequestNo;
-
 
416
    this.transactionId = transactionId;
-
 
417
    setTransactionIdIsSet(true);
409
  }
418
  }
410
 
419
 
411
  /**
420
  /**
412
   * Performs a deep copy on <i>other</i>.
421
   * Performs a deep copy on <i>other</i>.
413
   */
422
   */
Line 485... Line 494...
485
    this.serialNo = other.serialNo;
494
    this.serialNo = other.serialNo;
486
    this.doaFlag = other.doaFlag;
495
    this.doaFlag = other.doaFlag;
487
    if (other.isSetPickupRequestNo()) {
496
    if (other.isSetPickupRequestNo()) {
488
      this.pickupRequestNo = other.pickupRequestNo;
497
      this.pickupRequestNo = other.pickupRequestNo;
489
    }
498
    }
-
 
499
    this.transactionId = other.transactionId;
490
  }
500
  }
491
 
501
 
492
  public Order deepCopy() {
502
  public Order deepCopy() {
493
    return new Order(this);
503
    return new Order(this);
494
  }
504
  }
Line 1385... Line 1395...
1385
    if (!value) {
1395
    if (!value) {
1386
      this.pickupRequestNo = null;
1396
      this.pickupRequestNo = null;
1387
    }
1397
    }
1388
  }
1398
  }
1389
 
1399
 
-
 
1400
  public long getTransactionId() {
-
 
1401
    return this.transactionId;
-
 
1402
  }
-
 
1403
 
-
 
1404
  public Order setTransactionId(long transactionId) {
-
 
1405
    this.transactionId = transactionId;
-
 
1406
    setTransactionIdIsSet(true);
-
 
1407
    return this;
-
 
1408
  }
-
 
1409
 
-
 
1410
  public void unsetTransactionId() {
-
 
1411
    __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
-
 
1412
  }
-
 
1413
 
-
 
1414
  /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
-
 
1415
  public boolean isSetTransactionId() {
-
 
1416
    return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
-
 
1417
  }
-
 
1418
 
-
 
1419
  public void setTransactionIdIsSet(boolean value) {
-
 
1420
    __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
-
 
1421
  }
-
 
1422
 
1390
  public void setFieldValue(_Fields field, Object value) {
1423
  public void setFieldValue(_Fields field, Object value) {
1391
    switch (field) {
1424
    switch (field) {
1392
    case ID:
1425
    case ID:
1393
      if (value == null) {
1426
      if (value == null) {
1394
        unsetId();
1427
        unsetId();
Line 1667... Line 1700...
1667
      } else {
1700
      } else {
1668
        setPickupRequestNo((String)value);
1701
        setPickupRequestNo((String)value);
1669
      }
1702
      }
1670
      break;
1703
      break;
1671
 
1704
 
-
 
1705
    case TRANSACTION_ID:
-
 
1706
      if (value == null) {
-
 
1707
        unsetTransactionId();
-
 
1708
      } else {
-
 
1709
        setTransactionId((Long)value);
-
 
1710
      }
-
 
1711
      break;
-
 
1712
 
1672
    }
1713
    }
1673
  }
1714
  }
1674
 
1715
 
1675
  public void setFieldValue(int fieldID, Object value) {
1716
  public void setFieldValue(int fieldID, Object value) {
1676
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1717
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 1781... Line 1822...
1781
      return new Boolean(isDoaFlag());
1822
      return new Boolean(isDoaFlag());
1782
 
1823
 
1783
    case PICKUP_REQUEST_NO:
1824
    case PICKUP_REQUEST_NO:
1784
      return getPickupRequestNo();
1825
      return getPickupRequestNo();
1785
 
1826
 
-
 
1827
    case TRANSACTION_ID:
-
 
1828
      return new Long(getTransactionId());
-
 
1829
 
1786
    }
1830
    }
1787
    throw new IllegalStateException();
1831
    throw new IllegalStateException();
1788
  }
1832
  }
1789
 
1833
 
1790
  public Object getFieldValue(int fieldId) {
1834
  public Object getFieldValue(int fieldId) {
Line 1862... Line 1906...
1862
      return isSetSerialNo();
1906
      return isSetSerialNo();
1863
    case DOA_FLAG:
1907
    case DOA_FLAG:
1864
      return isSetDoaFlag();
1908
      return isSetDoaFlag();
1865
    case PICKUP_REQUEST_NO:
1909
    case PICKUP_REQUEST_NO:
1866
      return isSetPickupRequestNo();
1910
      return isSetPickupRequestNo();
-
 
1911
    case TRANSACTION_ID:
-
 
1912
      return isSetTransactionId();
1867
    }
1913
    }
1868
    throw new IllegalStateException();
1914
    throw new IllegalStateException();
1869
  }
1915
  }
1870
 
1916
 
1871
  public boolean isSet(int fieldID) {
1917
  public boolean isSet(int fieldID) {
Line 2198... Line 2244...
2198
        return false;
2244
        return false;
2199
      if (!this.pickupRequestNo.equals(that.pickupRequestNo))
2245
      if (!this.pickupRequestNo.equals(that.pickupRequestNo))
2200
        return false;
2246
        return false;
2201
    }
2247
    }
2202
 
2248
 
-
 
2249
    boolean this_present_transactionId = true;
-
 
2250
    boolean that_present_transactionId = true;
-
 
2251
    if (this_present_transactionId || that_present_transactionId) {
-
 
2252
      if (!(this_present_transactionId && that_present_transactionId))
-
 
2253
        return false;
-
 
2254
      if (this.transactionId != that.transactionId)
-
 
2255
        return false;
-
 
2256
    }
-
 
2257
 
2203
    return true;
2258
    return true;
2204
  }
2259
  }
2205
 
2260
 
2206
  @Override
2261
  @Override
2207
  public int hashCode() {
2262
  public int hashCode() {
Line 2494... Line 2549...
2494
    }
2549
    }
2495
    lastComparison = TBaseHelper.compareTo(pickupRequestNo, typedOther.pickupRequestNo);
2550
    lastComparison = TBaseHelper.compareTo(pickupRequestNo, typedOther.pickupRequestNo);
2496
    if (lastComparison != 0) {
2551
    if (lastComparison != 0) {
2497
      return lastComparison;
2552
      return lastComparison;
2498
    }
2553
    }
-
 
2554
    lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
-
 
2555
    if (lastComparison != 0) {
-
 
2556
      return lastComparison;
-
 
2557
    }
-
 
2558
    lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
-
 
2559
    if (lastComparison != 0) {
-
 
2560
      return lastComparison;
-
 
2561
    }
2499
    return 0;
2562
    return 0;
2500
  }
2563
  }
2501
 
2564
 
2502
  public void read(TProtocol iprot) throws TException {
2565
  public void read(TProtocol iprot) throws TException {
2503
    TField field;
2566
    TField field;
Line 2785... Line 2848...
2785
              this.pickupRequestNo = iprot.readString();
2848
              this.pickupRequestNo = iprot.readString();
2786
            } else { 
2849
            } else { 
2787
              TProtocolUtil.skip(iprot, field.type);
2850
              TProtocolUtil.skip(iprot, field.type);
2788
            }
2851
            }
2789
            break;
2852
            break;
-
 
2853
          case TRANSACTION_ID:
-
 
2854
            if (field.type == TType.I64) {
-
 
2855
              this.transactionId = iprot.readI64();
-
 
2856
              setTransactionIdIsSet(true);
-
 
2857
            } else { 
-
 
2858
              TProtocolUtil.skip(iprot, field.type);
-
 
2859
            }
-
 
2860
            break;
2790
        }
2861
        }
2791
        iprot.readFieldEnd();
2862
        iprot.readFieldEnd();
2792
      }
2863
      }
2793
    }
2864
    }
2794
    iprot.readStructEnd();
2865
    iprot.readStructEnd();
Line 2943... Line 3014...
2943
    if (this.pickupRequestNo != null) {
3014
    if (this.pickupRequestNo != null) {
2944
      oprot.writeFieldBegin(PICKUP_REQUEST_NO_FIELD_DESC);
3015
      oprot.writeFieldBegin(PICKUP_REQUEST_NO_FIELD_DESC);
2945
      oprot.writeString(this.pickupRequestNo);
3016
      oprot.writeString(this.pickupRequestNo);
2946
      oprot.writeFieldEnd();
3017
      oprot.writeFieldEnd();
2947
    }
3018
    }
-
 
3019
    oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
-
 
3020
    oprot.writeI64(this.transactionId);
-
 
3021
    oprot.writeFieldEnd();
2948
    oprot.writeFieldStop();
3022
    oprot.writeFieldStop();
2949
    oprot.writeStructEnd();
3023
    oprot.writeStructEnd();
2950
  }
3024
  }
2951
 
3025
 
2952
  @Override
3026
  @Override
Line 3167... Line 3241...
3167
      sb.append("null");
3241
      sb.append("null");
3168
    } else {
3242
    } else {
3169
      sb.append(this.pickupRequestNo);
3243
      sb.append(this.pickupRequestNo);
3170
    }
3244
    }
3171
    first = false;
3245
    first = false;
-
 
3246
    if (!first) sb.append(", ");
-
 
3247
    sb.append("transactionId:");
-
 
3248
    sb.append(this.transactionId);
-
 
3249
    first = false;
3172
    sb.append(")");
3250
    sb.append(")");
3173
    return sb.toString();
3251
    return sb.toString();
3174
  }
3252
  }
3175
 
3253
 
3176
  public void validate() throws TException {
3254
  public void validate() throws TException {