Subversion Repositories SmartDukaan

Rev

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

Rev 3430 Rev 4172
Line 37... Line 37...
37
  private static final org.apache.thrift.protocol.TField TOTAL_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("total_price", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
37
  private static final org.apache.thrift.protocol.TField TOTAL_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("total_price", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
38
  private static final org.apache.thrift.protocol.TField TRANSFER_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("transfer_price", org.apache.thrift.protocol.TType.DOUBLE, (short)13);
38
  private static final org.apache.thrift.protocol.TField TRANSFER_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("transfer_price", org.apache.thrift.protocol.TType.DOUBLE, (short)13);
39
  private static final org.apache.thrift.protocol.TField TOTAL_WEIGHT_FIELD_DESC = new org.apache.thrift.protocol.TField("total_weight", org.apache.thrift.protocol.TType.DOUBLE, (short)14);
39
  private static final org.apache.thrift.protocol.TField TOTAL_WEIGHT_FIELD_DESC = new org.apache.thrift.protocol.TField("total_weight", org.apache.thrift.protocol.TType.DOUBLE, (short)14);
40
  private static final org.apache.thrift.protocol.TField IMEI_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("imei_number", org.apache.thrift.protocol.TType.I64, (short)15);
40
  private static final org.apache.thrift.protocol.TField IMEI_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("imei_number", org.apache.thrift.protocol.TType.I64, (short)15);
41
  private static final org.apache.thrift.protocol.TField ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("item_number", org.apache.thrift.protocol.TType.STRING, (short)16);
41
  private static final org.apache.thrift.protocol.TField ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("item_number", org.apache.thrift.protocol.TType.STRING, (short)16);
-
 
42
  private static final org.apache.thrift.protocol.TField DEAL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("dealText", org.apache.thrift.protocol.TType.STRING, (short)17);
42
 
43
 
43
  private long id; // required
44
  private long id; // required
44
  private long item_id; // required
45
  private long item_id; // required
45
  private String productGroup; // required
46
  private String productGroup; // required
46
  private String brand; // required
47
  private String brand; // required
Line 54... Line 55...
54
  private double total_price; // required
55
  private double total_price; // required
55
  private double transfer_price; // required
56
  private double transfer_price; // required
56
  private double total_weight; // required
57
  private double total_weight; // required
57
  private long imei_number; // required
58
  private long imei_number; // required
58
  private String item_number; // required
59
  private String item_number; // required
-
 
60
  private String dealText; // required
59
 
61
 
60
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
62
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
61
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
63
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
62
    ID((short)1, "id"),
64
    ID((short)1, "id"),
63
    ITEM_ID((short)2, "item_id"),
65
    ITEM_ID((short)2, "item_id"),
Line 72... Line 74...
72
    UNIT_WEIGHT((short)11, "unit_weight"),
74
    UNIT_WEIGHT((short)11, "unit_weight"),
73
    TOTAL_PRICE((short)12, "total_price"),
75
    TOTAL_PRICE((short)12, "total_price"),
74
    TRANSFER_PRICE((short)13, "transfer_price"),
76
    TRANSFER_PRICE((short)13, "transfer_price"),
75
    TOTAL_WEIGHT((short)14, "total_weight"),
77
    TOTAL_WEIGHT((short)14, "total_weight"),
76
    IMEI_NUMBER((short)15, "imei_number"),
78
    IMEI_NUMBER((short)15, "imei_number"),
77
    ITEM_NUMBER((short)16, "item_number");
79
    ITEM_NUMBER((short)16, "item_number"),
-
 
80
    DEAL_TEXT((short)17, "dealText");
78
 
81
 
79
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
82
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
80
 
83
 
81
    static {
84
    static {
82
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
85
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 119... Line 122...
119
          return TOTAL_WEIGHT;
122
          return TOTAL_WEIGHT;
120
        case 15: // IMEI_NUMBER
123
        case 15: // IMEI_NUMBER
121
          return IMEI_NUMBER;
124
          return IMEI_NUMBER;
122
        case 16: // ITEM_NUMBER
125
        case 16: // ITEM_NUMBER
123
          return ITEM_NUMBER;
126
          return ITEM_NUMBER;
-
 
127
        case 17: // DEAL_TEXT
-
 
128
          return DEAL_TEXT;
124
        default:
129
        default:
125
          return null;
130
          return null;
126
      }
131
      }
127
    }
132
    }
128
 
133
 
Line 205... Line 210...
205
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
210
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
206
    tmpMap.put(_Fields.IMEI_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("imei_number", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
211
    tmpMap.put(_Fields.IMEI_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("imei_number", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
207
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
212
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
208
    tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("item_number", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
213
    tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("item_number", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
209
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
214
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
215
    tmpMap.put(_Fields.DEAL_TEXT, new org.apache.thrift.meta_data.FieldMetaData("dealText", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-
 
216
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
210
    metaDataMap = Collections.unmodifiableMap(tmpMap);
217
    metaDataMap = Collections.unmodifiableMap(tmpMap);
211
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LineItem.class, metaDataMap);
218
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LineItem.class, metaDataMap);
212
  }
219
  }
213
 
220
 
214
  public LineItem() {
221
  public LineItem() {
Line 289... Line 296...
289
    this.total_weight = other.total_weight;
296
    this.total_weight = other.total_weight;
290
    this.imei_number = other.imei_number;
297
    this.imei_number = other.imei_number;
291
    if (other.isSetItem_number()) {
298
    if (other.isSetItem_number()) {
292
      this.item_number = other.item_number;
299
      this.item_number = other.item_number;
293
    }
300
    }
-
 
301
    if (other.isSetDealText()) {
-
 
302
      this.dealText = other.dealText;
-
 
303
    }
294
  }
304
  }
295
 
305
 
296
  public LineItem deepCopy() {
306
  public LineItem deepCopy() {
297
    return new LineItem(this);
307
    return new LineItem(this);
298
  }
308
  }
Line 322... Line 332...
322
    setTotal_weightIsSet(false);
332
    setTotal_weightIsSet(false);
323
    this.total_weight = 0.0;
333
    this.total_weight = 0.0;
324
    setImei_numberIsSet(false);
334
    setImei_numberIsSet(false);
325
    this.imei_number = 0;
335
    this.imei_number = 0;
326
    this.item_number = null;
336
    this.item_number = null;
-
 
337
    this.dealText = null;
327
  }
338
  }
328
 
339
 
329
  public long getId() {
340
  public long getId() {
330
    return this.id;
341
    return this.id;
331
  }
342
  }
Line 683... Line 694...
683
    if (!value) {
694
    if (!value) {
684
      this.item_number = null;
695
      this.item_number = null;
685
    }
696
    }
686
  }
697
  }
687
 
698
 
-
 
699
  public String getDealText() {
-
 
700
    return this.dealText;
-
 
701
  }
-
 
702
 
-
 
703
  public void setDealText(String dealText) {
-
 
704
    this.dealText = dealText;
-
 
705
  }
-
 
706
 
-
 
707
  public void unsetDealText() {
-
 
708
    this.dealText = null;
-
 
709
  }
-
 
710
 
-
 
711
  /** Returns true if field dealText is set (has been assigned a value) and false otherwise */
-
 
712
  public boolean isSetDealText() {
-
 
713
    return this.dealText != null;
-
 
714
  }
-
 
715
 
-
 
716
  public void setDealTextIsSet(boolean value) {
-
 
717
    if (!value) {
-
 
718
      this.dealText = null;
-
 
719
    }
-
 
720
  }
-
 
721
 
688
  public void setFieldValue(_Fields field, Object value) {
722
  public void setFieldValue(_Fields field, Object value) {
689
    switch (field) {
723
    switch (field) {
690
    case ID:
724
    case ID:
691
      if (value == null) {
725
      if (value == null) {
692
        unsetId();
726
        unsetId();
Line 813... Line 847...
813
      } else {
847
      } else {
814
        setItem_number((String)value);
848
        setItem_number((String)value);
815
      }
849
      }
816
      break;
850
      break;
817
 
851
 
-
 
852
    case DEAL_TEXT:
-
 
853
      if (value == null) {
-
 
854
        unsetDealText();
-
 
855
      } else {
-
 
856
        setDealText((String)value);
-
 
857
      }
-
 
858
      break;
-
 
859
 
818
    }
860
    }
819
  }
861
  }
820
 
862
 
821
  public Object getFieldValue(_Fields field) {
863
  public Object getFieldValue(_Fields field) {
822
    switch (field) {
864
    switch (field) {
Line 866... Line 908...
866
      return Long.valueOf(getImei_number());
908
      return Long.valueOf(getImei_number());
867
 
909
 
868
    case ITEM_NUMBER:
910
    case ITEM_NUMBER:
869
      return getItem_number();
911
      return getItem_number();
870
 
912
 
-
 
913
    case DEAL_TEXT:
-
 
914
      return getDealText();
-
 
915
 
871
    }
916
    }
872
    throw new IllegalStateException();
917
    throw new IllegalStateException();
873
  }
918
  }
874
 
919
 
875
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
920
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 909... Line 954...
909
      return isSetTotal_weight();
954
      return isSetTotal_weight();
910
    case IMEI_NUMBER:
955
    case IMEI_NUMBER:
911
      return isSetImei_number();
956
      return isSetImei_number();
912
    case ITEM_NUMBER:
957
    case ITEM_NUMBER:
913
      return isSetItem_number();
958
      return isSetItem_number();
-
 
959
    case DEAL_TEXT:
-
 
960
      return isSetDealText();
914
    }
961
    }
915
    throw new IllegalStateException();
962
    throw new IllegalStateException();
916
  }
963
  }
917
 
964
 
918
  @Override
965
  @Override
Line 1070... Line 1117...
1070
        return false;
1117
        return false;
1071
      if (!this.item_number.equals(that.item_number))
1118
      if (!this.item_number.equals(that.item_number))
1072
        return false;
1119
        return false;
1073
    }
1120
    }
1074
 
1121
 
-
 
1122
    boolean this_present_dealText = true && this.isSetDealText();
-
 
1123
    boolean that_present_dealText = true && that.isSetDealText();
-
 
1124
    if (this_present_dealText || that_present_dealText) {
-
 
1125
      if (!(this_present_dealText && that_present_dealText))
-
 
1126
        return false;
-
 
1127
      if (!this.dealText.equals(that.dealText))
-
 
1128
        return false;
-
 
1129
    }
-
 
1130
 
1075
    return true;
1131
    return true;
1076
  }
1132
  }
1077
 
1133
 
1078
  @Override
1134
  @Override
1079
  public int hashCode() {
1135
  public int hashCode() {
Line 1246... Line 1302...
1246
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_number, typedOther.item_number);
1302
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_number, typedOther.item_number);
1247
      if (lastComparison != 0) {
1303
      if (lastComparison != 0) {
1248
        return lastComparison;
1304
        return lastComparison;
1249
      }
1305
      }
1250
    }
1306
    }
-
 
1307
    lastComparison = Boolean.valueOf(isSetDealText()).compareTo(typedOther.isSetDealText());
-
 
1308
    if (lastComparison != 0) {
-
 
1309
      return lastComparison;
-
 
1310
    }
-
 
1311
    if (isSetDealText()) {
-
 
1312
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealText, typedOther.dealText);
-
 
1313
      if (lastComparison != 0) {
-
 
1314
        return lastComparison;
-
 
1315
      }
-
 
1316
    }
1251
    return 0;
1317
    return 0;
1252
  }
1318
  }
1253
 
1319
 
1254
  public _Fields fieldForId(int fieldId) {
1320
  public _Fields fieldForId(int fieldId) {
1255
    return _Fields.findByThriftId(fieldId);
1321
    return _Fields.findByThriftId(fieldId);
Line 1384... Line 1450...
1384
            this.item_number = iprot.readString();
1450
            this.item_number = iprot.readString();
1385
          } else { 
1451
          } else { 
1386
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1452
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1387
          }
1453
          }
1388
          break;
1454
          break;
-
 
1455
        case 17: // DEAL_TEXT
-
 
1456
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1457
            this.dealText = iprot.readString();
-
 
1458
          } else { 
-
 
1459
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1460
          }
-
 
1461
          break;
1389
        default:
1462
        default:
1390
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1463
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1391
      }
1464
      }
1392
      iprot.readFieldEnd();
1465
      iprot.readFieldEnd();
1393
    }
1466
    }
Line 1463... Line 1536...
1463
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
1536
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
1464
        oprot.writeString(this.item_number);
1537
        oprot.writeString(this.item_number);
1465
        oprot.writeFieldEnd();
1538
        oprot.writeFieldEnd();
1466
      }
1539
      }
1467
    }
1540
    }
-
 
1541
    if (this.dealText != null) {
-
 
1542
      if (isSetDealText()) {
-
 
1543
        oprot.writeFieldBegin(DEAL_TEXT_FIELD_DESC);
-
 
1544
        oprot.writeString(this.dealText);
-
 
1545
        oprot.writeFieldEnd();
-
 
1546
      }
-
 
1547
    }
1468
    oprot.writeFieldStop();
1548
    oprot.writeFieldStop();
1469
    oprot.writeStructEnd();
1549
    oprot.writeStructEnd();
1470
  }
1550
  }
1471
 
1551
 
1472
  @Override
1552
  @Override
Line 1567... Line 1647...
1567
      } else {
1647
      } else {
1568
        sb.append(this.item_number);
1648
        sb.append(this.item_number);
1569
      }
1649
      }
1570
      first = false;
1650
      first = false;
1571
    }
1651
    }
-
 
1652
    if (isSetDealText()) {
-
 
1653
      if (!first) sb.append(", ");
-
 
1654
      sb.append("dealText:");
-
 
1655
      if (this.dealText == null) {
-
 
1656
        sb.append("null");
-
 
1657
      } else {
-
 
1658
        sb.append(this.dealText);
-
 
1659
      }
-
 
1660
      first = false;
-
 
1661
    }
1572
    sb.append(")");
1662
    sb.append(")");
1573
    return sb.toString();
1663
    return sb.toString();
1574
  }
1664
  }
1575
 
1665
 
1576
  public void validate() throws org.apache.thrift.TException {
1666
  public void validate() throws org.apache.thrift.TException {