Subversion Repositories SmartDukaan

Rev

Rev 23400 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23400 Rev 25269
Line 44... Line 44...
44
  private static final org.apache.thrift.protocol.TField MRP_FIELD_DESC = new org.apache.thrift.protocol.TField("mrp", org.apache.thrift.protocol.TType.DOUBLE, (short)19);
44
  private static final org.apache.thrift.protocol.TField MRP_FIELD_DESC = new org.apache.thrift.protocol.TField("mrp", org.apache.thrift.protocol.TType.DOUBLE, (short)19);
45
  private static final org.apache.thrift.protocol.TField PURCHASE_COMMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseComments", org.apache.thrift.protocol.TType.STRING, (short)20);
45
  private static final org.apache.thrift.protocol.TField PURCHASE_COMMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseComments", org.apache.thrift.protocol.TType.STRING, (short)20);
46
  private static final org.apache.thrift.protocol.TField SGST_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("sgstRate", org.apache.thrift.protocol.TType.DOUBLE, (short)21);
46
  private static final org.apache.thrift.protocol.TField SGST_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("sgstRate", org.apache.thrift.protocol.TType.DOUBLE, (short)21);
47
  private static final org.apache.thrift.protocol.TField CGST_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("cgstRate", org.apache.thrift.protocol.TType.DOUBLE, (short)22);
47
  private static final org.apache.thrift.protocol.TField CGST_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("cgstRate", org.apache.thrift.protocol.TType.DOUBLE, (short)22);
48
  private static final org.apache.thrift.protocol.TField IGST_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("igstRate", org.apache.thrift.protocol.TType.DOUBLE, (short)23);
48
  private static final org.apache.thrift.protocol.TField IGST_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("igstRate", org.apache.thrift.protocol.TType.DOUBLE, (short)23);
-
 
49
  private static final org.apache.thrift.protocol.TField INVOICE_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("invoicePrice", org.apache.thrift.protocol.TType.DOUBLE, (short)24);
49
 
50
 
50
  private long purchaseOrderId; // required
51
  private long purchaseOrderId; // required
51
  private long poCreatedAt; // required
52
  private long poCreatedAt; // required
52
  private String supplierName; // required
53
  private String supplierName; // required
53
  private String invoiceNumbers; // required
54
  private String invoiceNumbers; // required
Line 68... Line 69...
68
  private double mrp; // required
69
  private double mrp; // required
69
  private String purchaseComments; // required
70
  private String purchaseComments; // required
70
  private double sgstRate; // required
71
  private double sgstRate; // required
71
  private double cgstRate; // required
72
  private double cgstRate; // required
72
  private double igstRate; // required
73
  private double igstRate; // required
-
 
74
  private double invoicePrice; // required
73
 
75
 
74
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
76
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
75
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
77
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
76
    PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
78
    PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
77
    PO_CREATED_AT((short)2, "poCreatedAt"),
79
    PO_CREATED_AT((short)2, "poCreatedAt"),
Line 93... Line 95...
93
    INVOICE_DATE((short)18, "invoiceDate"),
95
    INVOICE_DATE((short)18, "invoiceDate"),
94
    MRP((short)19, "mrp"),
96
    MRP((short)19, "mrp"),
95
    PURCHASE_COMMENTS((short)20, "purchaseComments"),
97
    PURCHASE_COMMENTS((short)20, "purchaseComments"),
96
    SGST_RATE((short)21, "sgstRate"),
98
    SGST_RATE((short)21, "sgstRate"),
97
    CGST_RATE((short)22, "cgstRate"),
99
    CGST_RATE((short)22, "cgstRate"),
98
    IGST_RATE((short)23, "igstRate");
100
    IGST_RATE((short)23, "igstRate"),
-
 
101
    INVOICE_PRICE((short)24, "invoicePrice");
99
 
102
 
100
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
103
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
101
 
104
 
102
    static {
105
    static {
103
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
106
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 154... Line 157...
154
          return SGST_RATE;
157
          return SGST_RATE;
155
        case 22: // CGST_RATE
158
        case 22: // CGST_RATE
156
          return CGST_RATE;
159
          return CGST_RATE;
157
        case 23: // IGST_RATE
160
        case 23: // IGST_RATE
158
          return IGST_RATE;
161
          return IGST_RATE;
-
 
162
        case 24: // INVOICE_PRICE
-
 
163
          return INVOICE_PRICE;
159
        default:
164
        default:
160
          return null;
165
          return null;
161
      }
166
      }
162
    }
167
    }
163
 
168
 
Line 209... Line 214...
209
  private static final int __INVOICEDATE_ISSET_ID = 10;
214
  private static final int __INVOICEDATE_ISSET_ID = 10;
210
  private static final int __MRP_ISSET_ID = 11;
215
  private static final int __MRP_ISSET_ID = 11;
211
  private static final int __SGSTRATE_ISSET_ID = 12;
216
  private static final int __SGSTRATE_ISSET_ID = 12;
212
  private static final int __CGSTRATE_ISSET_ID = 13;
217
  private static final int __CGSTRATE_ISSET_ID = 13;
213
  private static final int __IGSTRATE_ISSET_ID = 14;
218
  private static final int __IGSTRATE_ISSET_ID = 14;
-
 
219
  private static final int __INVOICEPRICE_ISSET_ID = 15;
214
  private BitSet __isset_bit_vector = new BitSet(15);
220
  private BitSet __isset_bit_vector = new BitSet(16);
215
 
221
 
216
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
222
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
217
  static {
223
  static {
218
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
224
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
219
    tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
225
    tmpMap.put(_Fields.PURCHASE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 260... Line 266...
260
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
266
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
261
    tmpMap.put(_Fields.CGST_RATE, new org.apache.thrift.meta_data.FieldMetaData("cgstRate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
267
    tmpMap.put(_Fields.CGST_RATE, new org.apache.thrift.meta_data.FieldMetaData("cgstRate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
262
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
268
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
263
    tmpMap.put(_Fields.IGST_RATE, new org.apache.thrift.meta_data.FieldMetaData("igstRate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
269
    tmpMap.put(_Fields.IGST_RATE, new org.apache.thrift.meta_data.FieldMetaData("igstRate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
264
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
270
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
271
    tmpMap.put(_Fields.INVOICE_PRICE, new org.apache.thrift.meta_data.FieldMetaData("invoicePrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
272
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
265
    metaDataMap = Collections.unmodifiableMap(tmpMap);
273
    metaDataMap = Collections.unmodifiableMap(tmpMap);
266
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DetailedPurchaseScan.class, metaDataMap);
274
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DetailedPurchaseScan.class, metaDataMap);
267
  }
275
  }
268
 
276
 
269
  public DetailedPurchaseScan() {
277
  public DetailedPurchaseScan() {
Line 290... Line 298...
290
    long invoiceDate,
298
    long invoiceDate,
291
    double mrp,
299
    double mrp,
292
    String purchaseComments,
300
    String purchaseComments,
293
    double sgstRate,
301
    double sgstRate,
294
    double cgstRate,
302
    double cgstRate,
295
    double igstRate)
303
    double igstRate,
-
 
304
    double invoicePrice)
296
  {
305
  {
297
    this();
306
    this();
298
    this.purchaseOrderId = purchaseOrderId;
307
    this.purchaseOrderId = purchaseOrderId;
299
    setPurchaseOrderIdIsSet(true);
308
    setPurchaseOrderIdIsSet(true);
300
    this.poCreatedAt = poCreatedAt;
309
    this.poCreatedAt = poCreatedAt;
Line 331... Line 340...
331
    setSgstRateIsSet(true);
340
    setSgstRateIsSet(true);
332
    this.cgstRate = cgstRate;
341
    this.cgstRate = cgstRate;
333
    setCgstRateIsSet(true);
342
    setCgstRateIsSet(true);
334
    this.igstRate = igstRate;
343
    this.igstRate = igstRate;
335
    setIgstRateIsSet(true);
344
    setIgstRateIsSet(true);
-
 
345
    this.invoicePrice = invoicePrice;
-
 
346
    setInvoicePriceIsSet(true);
336
  }
347
  }
337
 
348
 
338
  /**
349
  /**
339
   * Performs a deep copy on <i>other</i>.
350
   * Performs a deep copy on <i>other</i>.
340
   */
351
   */
Line 378... Line 389...
378
      this.purchaseComments = other.purchaseComments;
389
      this.purchaseComments = other.purchaseComments;
379
    }
390
    }
380
    this.sgstRate = other.sgstRate;
391
    this.sgstRate = other.sgstRate;
381
    this.cgstRate = other.cgstRate;
392
    this.cgstRate = other.cgstRate;
382
    this.igstRate = other.igstRate;
393
    this.igstRate = other.igstRate;
-
 
394
    this.invoicePrice = other.invoicePrice;
383
  }
395
  }
384
 
396
 
385
  public DetailedPurchaseScan deepCopy() {
397
  public DetailedPurchaseScan deepCopy() {
386
    return new DetailedPurchaseScan(this);
398
    return new DetailedPurchaseScan(this);
387
  }
399
  }
Line 424... Line 436...
424
    this.sgstRate = 0.0;
436
    this.sgstRate = 0.0;
425
    setCgstRateIsSet(false);
437
    setCgstRateIsSet(false);
426
    this.cgstRate = 0.0;
438
    this.cgstRate = 0.0;
427
    setIgstRateIsSet(false);
439
    setIgstRateIsSet(false);
428
    this.igstRate = 0.0;
440
    this.igstRate = 0.0;
-
 
441
    setInvoicePriceIsSet(false);
-
 
442
    this.invoicePrice = 0.0;
429
  }
443
  }
430
 
444
 
431
  public long getPurchaseOrderId() {
445
  public long getPurchaseOrderId() {
432
    return this.purchaseOrderId;
446
    return this.purchaseOrderId;
433
  }
447
  }
Line 940... Line 954...
940
 
954
 
941
  public void setIgstRateIsSet(boolean value) {
955
  public void setIgstRateIsSet(boolean value) {
942
    __isset_bit_vector.set(__IGSTRATE_ISSET_ID, value);
956
    __isset_bit_vector.set(__IGSTRATE_ISSET_ID, value);
943
  }
957
  }
944
 
958
 
-
 
959
  public double getInvoicePrice() {
-
 
960
    return this.invoicePrice;
-
 
961
  }
-
 
962
 
-
 
963
  public void setInvoicePrice(double invoicePrice) {
-
 
964
    this.invoicePrice = invoicePrice;
-
 
965
    setInvoicePriceIsSet(true);
-
 
966
  }
-
 
967
 
-
 
968
  public void unsetInvoicePrice() {
-
 
969
    __isset_bit_vector.clear(__INVOICEPRICE_ISSET_ID);
-
 
970
  }
-
 
971
 
-
 
972
  /** Returns true if field invoicePrice is set (has been assigned a value) and false otherwise */
-
 
973
  public boolean isSetInvoicePrice() {
-
 
974
    return __isset_bit_vector.get(__INVOICEPRICE_ISSET_ID);
-
 
975
  }
-
 
976
 
-
 
977
  public void setInvoicePriceIsSet(boolean value) {
-
 
978
    __isset_bit_vector.set(__INVOICEPRICE_ISSET_ID, value);
-
 
979
  }
-
 
980
 
945
  public void setFieldValue(_Fields field, Object value) {
981
  public void setFieldValue(_Fields field, Object value) {
946
    switch (field) {
982
    switch (field) {
947
    case PURCHASE_ORDER_ID:
983
    case PURCHASE_ORDER_ID:
948
      if (value == null) {
984
      if (value == null) {
949
        unsetPurchaseOrderId();
985
        unsetPurchaseOrderId();
Line 1126... Line 1162...
1126
      } else {
1162
      } else {
1127
        setIgstRate((Double)value);
1163
        setIgstRate((Double)value);
1128
      }
1164
      }
1129
      break;
1165
      break;
1130
 
1166
 
-
 
1167
    case INVOICE_PRICE:
-
 
1168
      if (value == null) {
-
 
1169
        unsetInvoicePrice();
-
 
1170
      } else {
-
 
1171
        setInvoicePrice((Double)value);
-
 
1172
      }
-
 
1173
      break;
-
 
1174
 
1131
    }
1175
    }
1132
  }
1176
  }
1133
 
1177
 
1134
  public Object getFieldValue(_Fields field) {
1178
  public Object getFieldValue(_Fields field) {
1135
    switch (field) {
1179
    switch (field) {
Line 1200... Line 1244...
1200
      return Double.valueOf(getCgstRate());
1244
      return Double.valueOf(getCgstRate());
1201
 
1245
 
1202
    case IGST_RATE:
1246
    case IGST_RATE:
1203
      return Double.valueOf(getIgstRate());
1247
      return Double.valueOf(getIgstRate());
1204
 
1248
 
-
 
1249
    case INVOICE_PRICE:
-
 
1250
      return Double.valueOf(getInvoicePrice());
-
 
1251
 
1205
    }
1252
    }
1206
    throw new IllegalStateException();
1253
    throw new IllegalStateException();
1207
  }
1254
  }
1208
 
1255
 
1209
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1256
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1257... Line 1304...
1257
      return isSetSgstRate();
1304
      return isSetSgstRate();
1258
    case CGST_RATE:
1305
    case CGST_RATE:
1259
      return isSetCgstRate();
1306
      return isSetCgstRate();
1260
    case IGST_RATE:
1307
    case IGST_RATE:
1261
      return isSetIgstRate();
1308
      return isSetIgstRate();
-
 
1309
    case INVOICE_PRICE:
-
 
1310
      return isSetInvoicePrice();
1262
    }
1311
    }
1263
    throw new IllegalStateException();
1312
    throw new IllegalStateException();
1264
  }
1313
  }
1265
 
1314
 
1266
  @Override
1315
  @Override
Line 1481... Line 1530...
1481
        return false;
1530
        return false;
1482
      if (this.igstRate != that.igstRate)
1531
      if (this.igstRate != that.igstRate)
1483
        return false;
1532
        return false;
1484
    }
1533
    }
1485
 
1534
 
-
 
1535
    boolean this_present_invoicePrice = true;
-
 
1536
    boolean that_present_invoicePrice = true;
-
 
1537
    if (this_present_invoicePrice || that_present_invoicePrice) {
-
 
1538
      if (!(this_present_invoicePrice && that_present_invoicePrice))
-
 
1539
        return false;
-
 
1540
      if (this.invoicePrice != that.invoicePrice)
-
 
1541
        return false;
-
 
1542
    }
-
 
1543
 
1486
    return true;
1544
    return true;
1487
  }
1545
  }
1488
 
1546
 
1489
  @Override
1547
  @Override
1490
  public int hashCode() {
1548
  public int hashCode() {
Line 1727... Line 1785...
1727
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.igstRate, typedOther.igstRate);
1785
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.igstRate, typedOther.igstRate);
1728
      if (lastComparison != 0) {
1786
      if (lastComparison != 0) {
1729
        return lastComparison;
1787
        return lastComparison;
1730
      }
1788
      }
1731
    }
1789
    }
-
 
1790
    lastComparison = Boolean.valueOf(isSetInvoicePrice()).compareTo(typedOther.isSetInvoicePrice());
-
 
1791
    if (lastComparison != 0) {
-
 
1792
      return lastComparison;
-
 
1793
    }
-
 
1794
    if (isSetInvoicePrice()) {
-
 
1795
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoicePrice, typedOther.invoicePrice);
-
 
1796
      if (lastComparison != 0) {
-
 
1797
        return lastComparison;
-
 
1798
      }
-
 
1799
    }
1732
    return 0;
1800
    return 0;
1733
  }
1801
  }
1734
 
1802
 
1735
  public _Fields fieldForId(int fieldId) {
1803
  public _Fields fieldForId(int fieldId) {
1736
    return _Fields.findByThriftId(fieldId);
1804
    return _Fields.findByThriftId(fieldId);
Line 1920... Line 1988...
1920
            setIgstRateIsSet(true);
1988
            setIgstRateIsSet(true);
1921
          } else { 
1989
          } else { 
1922
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1990
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1923
          }
1991
          }
1924
          break;
1992
          break;
-
 
1993
        case 24: // INVOICE_PRICE
-
 
1994
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
1995
            this.invoicePrice = iprot.readDouble();
-
 
1996
            setInvoicePriceIsSet(true);
-
 
1997
          } else { 
-
 
1998
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1999
          }
-
 
2000
          break;
1925
        default:
2001
        default:
1926
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2002
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1927
      }
2003
      }
1928
      iprot.readFieldEnd();
2004
      iprot.readFieldEnd();
1929
    }
2005
    }
Line 2018... Line 2094...
2018
    oprot.writeDouble(this.cgstRate);
2094
    oprot.writeDouble(this.cgstRate);
2019
    oprot.writeFieldEnd();
2095
    oprot.writeFieldEnd();
2020
    oprot.writeFieldBegin(IGST_RATE_FIELD_DESC);
2096
    oprot.writeFieldBegin(IGST_RATE_FIELD_DESC);
2021
    oprot.writeDouble(this.igstRate);
2097
    oprot.writeDouble(this.igstRate);
2022
    oprot.writeFieldEnd();
2098
    oprot.writeFieldEnd();
-
 
2099
    oprot.writeFieldBegin(INVOICE_PRICE_FIELD_DESC);
-
 
2100
    oprot.writeDouble(this.invoicePrice);
-
 
2101
    oprot.writeFieldEnd();
2023
    oprot.writeFieldStop();
2102
    oprot.writeFieldStop();
2024
    oprot.writeStructEnd();
2103
    oprot.writeStructEnd();
2025
  }
2104
  }
2026
 
2105
 
2027
  @Override
2106
  @Override
Line 2150... Line 2229...
2150
    first = false;
2229
    first = false;
2151
    if (!first) sb.append(", ");
2230
    if (!first) sb.append(", ");
2152
    sb.append("igstRate:");
2231
    sb.append("igstRate:");
2153
    sb.append(this.igstRate);
2232
    sb.append(this.igstRate);
2154
    first = false;
2233
    first = false;
-
 
2234
    if (!first) sb.append(", ");
-
 
2235
    sb.append("invoicePrice:");
-
 
2236
    sb.append(this.invoicePrice);
-
 
2237
    first = false;
2155
    sb.append(")");
2238
    sb.append(")");
2156
    return sb.toString();
2239
    return sb.toString();
2157
  }
2240
  }
2158
 
2241
 
2159
  public void validate() throws org.apache.thrift.TException {
2242
  public void validate() throws org.apache.thrift.TException {