Subversion Repositories SmartDukaan

Rev

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

Rev 6039 Rev 7672
Line 40... Line 40...
40
  private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("serial_number", org.apache.thrift.protocol.TType.STRING, (short)15);
40
  private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("serial_number", org.apache.thrift.protocol.TType.STRING, (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
  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);
43
  private static final org.apache.thrift.protocol.TField WARRANTRY_EXPIRY_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("warrantry_expiry_timestamp", org.apache.thrift.protocol.TType.I64, (short)18);
43
  private static final org.apache.thrift.protocol.TField WARRANTRY_EXPIRY_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("warrantry_expiry_timestamp", org.apache.thrift.protocol.TType.I64, (short)18);
44
  private static final org.apache.thrift.protocol.TField VAT_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("vatRate", org.apache.thrift.protocol.TType.DOUBLE, (short)19);
44
  private static final org.apache.thrift.protocol.TField VAT_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("vatRate", org.apache.thrift.protocol.TType.DOUBLE, (short)19);
-
 
45
  private static final org.apache.thrift.protocol.TField NLC_FIELD_DESC = new org.apache.thrift.protocol.TField("nlc", org.apache.thrift.protocol.TType.DOUBLE, (short)20);
45
 
46
 
46
  private long id; // required
47
  private long id; // required
47
  private long item_id; // required
48
  private long item_id; // required
48
  private String productGroup; // required
49
  private String productGroup; // required
49
  private String brand; // required
50
  private String brand; // required
Line 60... Line 61...
60
  private String serial_number; // required
61
  private String serial_number; // required
61
  private String item_number; // required
62
  private String item_number; // required
62
  private String dealText; // required
63
  private String dealText; // required
63
  private long warrantry_expiry_timestamp; // required
64
  private long warrantry_expiry_timestamp; // required
64
  private double vatRate; // required
65
  private double vatRate; // required
-
 
66
  private double nlc; // required
65
 
67
 
66
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
68
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
67
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
69
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
68
    ID((short)1, "id"),
70
    ID((short)1, "id"),
69
    ITEM_ID((short)2, "item_id"),
71
    ITEM_ID((short)2, "item_id"),
Line 81... Line 83...
81
    TOTAL_WEIGHT((short)14, "total_weight"),
83
    TOTAL_WEIGHT((short)14, "total_weight"),
82
    SERIAL_NUMBER((short)15, "serial_number"),
84
    SERIAL_NUMBER((short)15, "serial_number"),
83
    ITEM_NUMBER((short)16, "item_number"),
85
    ITEM_NUMBER((short)16, "item_number"),
84
    DEAL_TEXT((short)17, "dealText"),
86
    DEAL_TEXT((short)17, "dealText"),
85
    WARRANTRY_EXPIRY_TIMESTAMP((short)18, "warrantry_expiry_timestamp"),
87
    WARRANTRY_EXPIRY_TIMESTAMP((short)18, "warrantry_expiry_timestamp"),
86
    VAT_RATE((short)19, "vatRate");
88
    VAT_RATE((short)19, "vatRate"),
-
 
89
    NLC((short)20, "nlc");
87
 
90
 
88
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
91
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
89
 
92
 
90
    static {
93
    static {
91
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
94
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 134... Line 137...
134
          return DEAL_TEXT;
137
          return DEAL_TEXT;
135
        case 18: // WARRANTRY_EXPIRY_TIMESTAMP
138
        case 18: // WARRANTRY_EXPIRY_TIMESTAMP
136
          return WARRANTRY_EXPIRY_TIMESTAMP;
139
          return WARRANTRY_EXPIRY_TIMESTAMP;
137
        case 19: // VAT_RATE
140
        case 19: // VAT_RATE
138
          return VAT_RATE;
141
          return VAT_RATE;
-
 
142
        case 20: // NLC
-
 
143
          return NLC;
139
        default:
144
        default:
140
          return null;
145
          return null;
141
      }
146
      }
142
    }
147
    }
143
 
148
 
Line 184... Line 189...
184
  private static final int __TOTAL_PRICE_ISSET_ID = 5;
189
  private static final int __TOTAL_PRICE_ISSET_ID = 5;
185
  private static final int __TRANSFER_PRICE_ISSET_ID = 6;
190
  private static final int __TRANSFER_PRICE_ISSET_ID = 6;
186
  private static final int __TOTAL_WEIGHT_ISSET_ID = 7;
191
  private static final int __TOTAL_WEIGHT_ISSET_ID = 7;
187
  private static final int __WARRANTRY_EXPIRY_TIMESTAMP_ISSET_ID = 8;
192
  private static final int __WARRANTRY_EXPIRY_TIMESTAMP_ISSET_ID = 8;
188
  private static final int __VATRATE_ISSET_ID = 9;
193
  private static final int __VATRATE_ISSET_ID = 9;
-
 
194
  private static final int __NLC_ISSET_ID = 10;
189
  private BitSet __isset_bit_vector = new BitSet(10);
195
  private BitSet __isset_bit_vector = new BitSet(11);
190
 
196
 
191
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
197
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
192
  static {
198
  static {
193
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
199
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
194
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
200
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 227... Line 233...
227
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
233
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
228
    tmpMap.put(_Fields.WARRANTRY_EXPIRY_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("warrantry_expiry_timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
234
    tmpMap.put(_Fields.WARRANTRY_EXPIRY_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("warrantry_expiry_timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
229
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
235
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
230
    tmpMap.put(_Fields.VAT_RATE, new org.apache.thrift.meta_data.FieldMetaData("vatRate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
236
    tmpMap.put(_Fields.VAT_RATE, new org.apache.thrift.meta_data.FieldMetaData("vatRate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
231
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
237
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
238
    tmpMap.put(_Fields.NLC, new org.apache.thrift.meta_data.FieldMetaData("nlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
239
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
232
    metaDataMap = Collections.unmodifiableMap(tmpMap);
240
    metaDataMap = Collections.unmodifiableMap(tmpMap);
233
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LineItem.class, metaDataMap);
241
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LineItem.class, metaDataMap);
234
  }
242
  }
235
 
243
 
236
  public LineItem() {
244
  public LineItem() {
Line 250... Line 258...
250
    double unit_weight,
258
    double unit_weight,
251
    double total_price,
259
    double total_price,
252
    double transfer_price,
260
    double transfer_price,
253
    double total_weight,
261
    double total_weight,
254
    long warrantry_expiry_timestamp,
262
    long warrantry_expiry_timestamp,
255
    double vatRate)
263
    double vatRate,
-
 
264
    double nlc)
256
  {
265
  {
257
    this();
266
    this();
258
    this.id = id;
267
    this.id = id;
259
    setIdIsSet(true);
268
    setIdIsSet(true);
260
    this.item_id = item_id;
269
    this.item_id = item_id;
Line 279... Line 288...
279
    setTotal_weightIsSet(true);
288
    setTotal_weightIsSet(true);
280
    this.warrantry_expiry_timestamp = warrantry_expiry_timestamp;
289
    this.warrantry_expiry_timestamp = warrantry_expiry_timestamp;
281
    setWarrantry_expiry_timestampIsSet(true);
290
    setWarrantry_expiry_timestampIsSet(true);
282
    this.vatRate = vatRate;
291
    this.vatRate = vatRate;
283
    setVatRateIsSet(true);
292
    setVatRateIsSet(true);
-
 
293
    this.nlc = nlc;
-
 
294
    setNlcIsSet(true);
284
  }
295
  }
285
 
296
 
286
  /**
297
  /**
287
   * Performs a deep copy on <i>other</i>.
298
   * Performs a deep copy on <i>other</i>.
288
   */
299
   */
Line 324... Line 335...
324
    if (other.isSetDealText()) {
335
    if (other.isSetDealText()) {
325
      this.dealText = other.dealText;
336
      this.dealText = other.dealText;
326
    }
337
    }
327
    this.warrantry_expiry_timestamp = other.warrantry_expiry_timestamp;
338
    this.warrantry_expiry_timestamp = other.warrantry_expiry_timestamp;
328
    this.vatRate = other.vatRate;
339
    this.vatRate = other.vatRate;
-
 
340
    this.nlc = other.nlc;
329
  }
341
  }
330
 
342
 
331
  public LineItem deepCopy() {
343
  public LineItem deepCopy() {
332
    return new LineItem(this);
344
    return new LineItem(this);
333
  }
345
  }
Line 361... Line 373...
361
    this.dealText = null;
373
    this.dealText = null;
362
    setWarrantry_expiry_timestampIsSet(false);
374
    setWarrantry_expiry_timestampIsSet(false);
363
    this.warrantry_expiry_timestamp = 0;
375
    this.warrantry_expiry_timestamp = 0;
364
    setVatRateIsSet(false);
376
    setVatRateIsSet(false);
365
    this.vatRate = 0.0;
377
    this.vatRate = 0.0;
-
 
378
    setNlcIsSet(false);
-
 
379
    this.nlc = 0.0;
366
  }
380
  }
367
 
381
 
368
  public long getId() {
382
  public long getId() {
369
    return this.id;
383
    return this.id;
370
  }
384
  }
Line 790... Line 804...
790
 
804
 
791
  public void setVatRateIsSet(boolean value) {
805
  public void setVatRateIsSet(boolean value) {
792
    __isset_bit_vector.set(__VATRATE_ISSET_ID, value);
806
    __isset_bit_vector.set(__VATRATE_ISSET_ID, value);
793
  }
807
  }
794
 
808
 
-
 
809
  public double getNlc() {
-
 
810
    return this.nlc;
-
 
811
  }
-
 
812
 
-
 
813
  public void setNlc(double nlc) {
-
 
814
    this.nlc = nlc;
-
 
815
    setNlcIsSet(true);
-
 
816
  }
-
 
817
 
-
 
818
  public void unsetNlc() {
-
 
819
    __isset_bit_vector.clear(__NLC_ISSET_ID);
-
 
820
  }
-
 
821
 
-
 
822
  /** Returns true if field nlc is set (has been assigned a value) and false otherwise */
-
 
823
  public boolean isSetNlc() {
-
 
824
    return __isset_bit_vector.get(__NLC_ISSET_ID);
-
 
825
  }
-
 
826
 
-
 
827
  public void setNlcIsSet(boolean value) {
-
 
828
    __isset_bit_vector.set(__NLC_ISSET_ID, value);
-
 
829
  }
-
 
830
 
795
  public void setFieldValue(_Fields field, Object value) {
831
  public void setFieldValue(_Fields field, Object value) {
796
    switch (field) {
832
    switch (field) {
797
    case ID:
833
    case ID:
798
      if (value == null) {
834
      if (value == null) {
799
        unsetId();
835
        unsetId();
Line 944... Line 980...
944
      } else {
980
      } else {
945
        setVatRate((Double)value);
981
        setVatRate((Double)value);
946
      }
982
      }
947
      break;
983
      break;
948
 
984
 
-
 
985
    case NLC:
-
 
986
      if (value == null) {
-
 
987
        unsetNlc();
-
 
988
      } else {
-
 
989
        setNlc((Double)value);
-
 
990
      }
-
 
991
      break;
-
 
992
 
949
    }
993
    }
950
  }
994
  }
951
 
995
 
952
  public Object getFieldValue(_Fields field) {
996
  public Object getFieldValue(_Fields field) {
953
    switch (field) {
997
    switch (field) {
Line 1006... Line 1050...
1006
      return Long.valueOf(getWarrantry_expiry_timestamp());
1050
      return Long.valueOf(getWarrantry_expiry_timestamp());
1007
 
1051
 
1008
    case VAT_RATE:
1052
    case VAT_RATE:
1009
      return Double.valueOf(getVatRate());
1053
      return Double.valueOf(getVatRate());
1010
 
1054
 
-
 
1055
    case NLC:
-
 
1056
      return Double.valueOf(getNlc());
-
 
1057
 
1011
    }
1058
    }
1012
    throw new IllegalStateException();
1059
    throw new IllegalStateException();
1013
  }
1060
  }
1014
 
1061
 
1015
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1062
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1055... Line 1102...
1055
      return isSetDealText();
1102
      return isSetDealText();
1056
    case WARRANTRY_EXPIRY_TIMESTAMP:
1103
    case WARRANTRY_EXPIRY_TIMESTAMP:
1057
      return isSetWarrantry_expiry_timestamp();
1104
      return isSetWarrantry_expiry_timestamp();
1058
    case VAT_RATE:
1105
    case VAT_RATE:
1059
      return isSetVatRate();
1106
      return isSetVatRate();
-
 
1107
    case NLC:
-
 
1108
      return isSetNlc();
1060
    }
1109
    }
1061
    throw new IllegalStateException();
1110
    throw new IllegalStateException();
1062
  }
1111
  }
1063
 
1112
 
1064
  @Override
1113
  @Override
Line 1243... Line 1292...
1243
        return false;
1292
        return false;
1244
      if (this.vatRate != that.vatRate)
1293
      if (this.vatRate != that.vatRate)
1245
        return false;
1294
        return false;
1246
    }
1295
    }
1247
 
1296
 
-
 
1297
    boolean this_present_nlc = true;
-
 
1298
    boolean that_present_nlc = true;
-
 
1299
    if (this_present_nlc || that_present_nlc) {
-
 
1300
      if (!(this_present_nlc && that_present_nlc))
-
 
1301
        return false;
-
 
1302
      if (this.nlc != that.nlc)
-
 
1303
        return false;
-
 
1304
    }
-
 
1305
 
1248
    return true;
1306
    return true;
1249
  }
1307
  }
1250
 
1308
 
1251
  @Override
1309
  @Override
1252
  public int hashCode() {
1310
  public int hashCode() {
Line 1449... Line 1507...
1449
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vatRate, typedOther.vatRate);
1507
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vatRate, typedOther.vatRate);
1450
      if (lastComparison != 0) {
1508
      if (lastComparison != 0) {
1451
        return lastComparison;
1509
        return lastComparison;
1452
      }
1510
      }
1453
    }
1511
    }
-
 
1512
    lastComparison = Boolean.valueOf(isSetNlc()).compareTo(typedOther.isSetNlc());
-
 
1513
    if (lastComparison != 0) {
-
 
1514
      return lastComparison;
-
 
1515
    }
-
 
1516
    if (isSetNlc()) {
-
 
1517
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nlc, typedOther.nlc);
-
 
1518
      if (lastComparison != 0) {
-
 
1519
        return lastComparison;
-
 
1520
      }
-
 
1521
    }
1454
    return 0;
1522
    return 0;
1455
  }
1523
  }
1456
 
1524
 
1457
  public _Fields fieldForId(int fieldId) {
1525
  public _Fields fieldForId(int fieldId) {
1458
    return _Fields.findByThriftId(fieldId);
1526
    return _Fields.findByThriftId(fieldId);
Line 1609... Line 1677...
1609
            setVatRateIsSet(true);
1677
            setVatRateIsSet(true);
1610
          } else { 
1678
          } else { 
1611
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1679
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1612
          }
1680
          }
1613
          break;
1681
          break;
-
 
1682
        case 20: // NLC
-
 
1683
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
1684
            this.nlc = iprot.readDouble();
-
 
1685
            setNlcIsSet(true);
-
 
1686
          } else { 
-
 
1687
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1688
          }
-
 
1689
          break;
1614
        default:
1690
        default:
1615
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1691
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1616
      }
1692
      }
1617
      iprot.readFieldEnd();
1693
      iprot.readFieldEnd();
1618
    }
1694
    }
Line 1703... Line 1779...
1703
    oprot.writeI64(this.warrantry_expiry_timestamp);
1779
    oprot.writeI64(this.warrantry_expiry_timestamp);
1704
    oprot.writeFieldEnd();
1780
    oprot.writeFieldEnd();
1705
    oprot.writeFieldBegin(VAT_RATE_FIELD_DESC);
1781
    oprot.writeFieldBegin(VAT_RATE_FIELD_DESC);
1706
    oprot.writeDouble(this.vatRate);
1782
    oprot.writeDouble(this.vatRate);
1707
    oprot.writeFieldEnd();
1783
    oprot.writeFieldEnd();
-
 
1784
    oprot.writeFieldBegin(NLC_FIELD_DESC);
-
 
1785
    oprot.writeDouble(this.nlc);
-
 
1786
    oprot.writeFieldEnd();
1708
    oprot.writeFieldStop();
1787
    oprot.writeFieldStop();
1709
    oprot.writeStructEnd();
1788
    oprot.writeStructEnd();
1710
  }
1789
  }
1711
 
1790
 
1712
  @Override
1791
  @Override
Line 1829... Line 1908...
1829
    first = false;
1908
    first = false;
1830
    if (!first) sb.append(", ");
1909
    if (!first) sb.append(", ");
1831
    sb.append("vatRate:");
1910
    sb.append("vatRate:");
1832
    sb.append(this.vatRate);
1911
    sb.append(this.vatRate);
1833
    first = false;
1912
    first = false;
-
 
1913
    if (!first) sb.append(", ");
-
 
1914
    sb.append("nlc:");
-
 
1915
    sb.append(this.nlc);
-
 
1916
    first = false;
1834
    sb.append(")");
1917
    sb.append(")");
1835
    return sb.toString();
1918
    return sb.toString();
1836
  }
1919
  }
1837
 
1920
 
1838
  public void validate() throws org.apache.thrift.TException {
1921
  public void validate() throws org.apache.thrift.TException {