Subversion Repositories SmartDukaan

Rev

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

Rev 7410 Rev 7672
Line 35... Line 35...
35
  private static final org.apache.thrift.protocol.TField TRANSFER_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("transferStatus", org.apache.thrift.protocol.TType.I32, (short)10);
35
  private static final org.apache.thrift.protocol.TField TRANSFER_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("transferStatus", org.apache.thrift.protocol.TType.I32, (short)10);
36
  private static final org.apache.thrift.protocol.TField SUPPLIER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("supplierId", org.apache.thrift.protocol.TType.I64, (short)11);
36
  private static final org.apache.thrift.protocol.TField SUPPLIER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("supplierId", org.apache.thrift.protocol.TType.I64, (short)11);
37
  private static final org.apache.thrift.protocol.TField UNIT_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("unitPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
37
  private static final org.apache.thrift.protocol.TField UNIT_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("unitPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
38
  private static final org.apache.thrift.protocol.TField CURRENT_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("currentWarehouseId", org.apache.thrift.protocol.TType.I64, (short)13);
38
  private static final org.apache.thrift.protocol.TField CURRENT_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("currentWarehouseId", org.apache.thrift.protocol.TType.I64, (short)13);
39
  private static final org.apache.thrift.protocol.TField LAST_SCAN_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("lastScanType", org.apache.thrift.protocol.TType.I32, (short)14);
39
  private static final org.apache.thrift.protocol.TField LAST_SCAN_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("lastScanType", org.apache.thrift.protocol.TType.I32, (short)14);
-
 
40
  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)15);
40
 
41
 
41
  private long id; // required
42
  private long id; // required
42
  private long itemId; // required
43
  private long itemId; // required
43
  private String itemNumber; // required
44
  private String itemNumber; // required
44
  private String serialNumber; // required
45
  private String serialNumber; // required
Line 50... Line 51...
50
  private TransferLotStatus transferStatus; // required
51
  private TransferLotStatus transferStatus; // required
51
  private long supplierId; // required
52
  private long supplierId; // required
52
  private double unitPrice; // required
53
  private double unitPrice; // required
53
  private long currentWarehouseId; // required
54
  private long currentWarehouseId; // required
54
  private ScanType lastScanType; // required
55
  private ScanType lastScanType; // required
-
 
56
  private double nlc; // required
55
 
57
 
56
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
58
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
57
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
59
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
58
    ID((short)1, "id"),
60
    ID((short)1, "id"),
59
    ITEM_ID((short)2, "itemId"),
61
    ITEM_ID((short)2, "itemId"),
Line 74... Line 76...
74
    CURRENT_WAREHOUSE_ID((short)13, "currentWarehouseId"),
76
    CURRENT_WAREHOUSE_ID((short)13, "currentWarehouseId"),
75
    /**
77
    /**
76
     * 
78
     * 
77
     * @see ScanType
79
     * @see ScanType
78
     */
80
     */
79
    LAST_SCAN_TYPE((short)14, "lastScanType");
81
    LAST_SCAN_TYPE((short)14, "lastScanType"),
-
 
82
    NLC((short)15, "nlc");
80
 
83
 
81
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
84
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
82
 
85
 
83
    static {
86
    static {
84
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
87
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 117... Line 120...
117
          return UNIT_PRICE;
120
          return UNIT_PRICE;
118
        case 13: // CURRENT_WAREHOUSE_ID
121
        case 13: // CURRENT_WAREHOUSE_ID
119
          return CURRENT_WAREHOUSE_ID;
122
          return CURRENT_WAREHOUSE_ID;
120
        case 14: // LAST_SCAN_TYPE
123
        case 14: // LAST_SCAN_TYPE
121
          return LAST_SCAN_TYPE;
124
          return LAST_SCAN_TYPE;
-
 
125
        case 15: // NLC
-
 
126
          return NLC;
122
        default:
127
        default:
123
          return null;
128
          return null;
124
      }
129
      }
125
    }
130
    }
126
 
131
 
Line 167... Line 172...
167
  private static final int __PURCHASERETURNID_ISSET_ID = 5;
172
  private static final int __PURCHASERETURNID_ISSET_ID = 5;
168
  private static final int __PHYSICALWAREHOUSEID_ISSET_ID = 6;
173
  private static final int __PHYSICALWAREHOUSEID_ISSET_ID = 6;
169
  private static final int __SUPPLIERID_ISSET_ID = 7;
174
  private static final int __SUPPLIERID_ISSET_ID = 7;
170
  private static final int __UNITPRICE_ISSET_ID = 8;
175
  private static final int __UNITPRICE_ISSET_ID = 8;
171
  private static final int __CURRENTWAREHOUSEID_ISSET_ID = 9;
176
  private static final int __CURRENTWAREHOUSEID_ISSET_ID = 9;
-
 
177
  private static final int __NLC_ISSET_ID = 10;
172
  private BitSet __isset_bit_vector = new BitSet(10);
178
  private BitSet __isset_bit_vector = new BitSet(11);
173
 
179
 
174
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
180
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
175
  static {
181
  static {
176
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
182
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
177
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
183
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 200... Line 206...
200
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
206
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
201
    tmpMap.put(_Fields.CURRENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("currentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
207
    tmpMap.put(_Fields.CURRENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("currentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
202
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
208
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
203
    tmpMap.put(_Fields.LAST_SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("lastScanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
209
    tmpMap.put(_Fields.LAST_SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("lastScanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
204
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
210
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
-
 
211
    tmpMap.put(_Fields.NLC, new org.apache.thrift.meta_data.FieldMetaData("nlc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
212
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
205
    metaDataMap = Collections.unmodifiableMap(tmpMap);
213
    metaDataMap = Collections.unmodifiableMap(tmpMap);
206
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InventoryItem.class, metaDataMap);
214
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InventoryItem.class, metaDataMap);
207
  }
215
  }
208
 
216
 
209
  public InventoryItem() {
217
  public InventoryItem() {
Line 221... Line 229...
221
    long physicalWarehouseId,
229
    long physicalWarehouseId,
222
    TransferLotStatus transferStatus,
230
    TransferLotStatus transferStatus,
223
    long supplierId,
231
    long supplierId,
224
    double unitPrice,
232
    double unitPrice,
225
    long currentWarehouseId,
233
    long currentWarehouseId,
226
    ScanType lastScanType)
234
    ScanType lastScanType,
-
 
235
    double nlc)
227
  {
236
  {
228
    this();
237
    this();
229
    this.id = id;
238
    this.id = id;
230
    setIdIsSet(true);
239
    setIdIsSet(true);
231
    this.itemId = itemId;
240
    this.itemId = itemId;
Line 248... Line 257...
248
    this.unitPrice = unitPrice;
257
    this.unitPrice = unitPrice;
249
    setUnitPriceIsSet(true);
258
    setUnitPriceIsSet(true);
250
    this.currentWarehouseId = currentWarehouseId;
259
    this.currentWarehouseId = currentWarehouseId;
251
    setCurrentWarehouseIdIsSet(true);
260
    setCurrentWarehouseIdIsSet(true);
252
    this.lastScanType = lastScanType;
261
    this.lastScanType = lastScanType;
-
 
262
    this.nlc = nlc;
-
 
263
    setNlcIsSet(true);
253
  }
264
  }
254
 
265
 
255
  /**
266
  /**
256
   * Performs a deep copy on <i>other</i>.
267
   * Performs a deep copy on <i>other</i>.
257
   */
268
   */
Line 278... Line 289...
278
    this.unitPrice = other.unitPrice;
289
    this.unitPrice = other.unitPrice;
279
    this.currentWarehouseId = other.currentWarehouseId;
290
    this.currentWarehouseId = other.currentWarehouseId;
280
    if (other.isSetLastScanType()) {
291
    if (other.isSetLastScanType()) {
281
      this.lastScanType = other.lastScanType;
292
      this.lastScanType = other.lastScanType;
282
    }
293
    }
-
 
294
    this.nlc = other.nlc;
283
  }
295
  }
284
 
296
 
285
  public InventoryItem deepCopy() {
297
  public InventoryItem deepCopy() {
286
    return new InventoryItem(this);
298
    return new InventoryItem(this);
287
  }
299
  }
Line 310... Line 322...
310
    setUnitPriceIsSet(false);
322
    setUnitPriceIsSet(false);
311
    this.unitPrice = 0.0;
323
    this.unitPrice = 0.0;
312
    setCurrentWarehouseIdIsSet(false);
324
    setCurrentWarehouseIdIsSet(false);
313
    this.currentWarehouseId = 0;
325
    this.currentWarehouseId = 0;
314
    this.lastScanType = null;
326
    this.lastScanType = null;
-
 
327
    setNlcIsSet(false);
-
 
328
    this.nlc = 0.0;
315
  }
329
  }
316
 
330
 
317
  public long getId() {
331
  public long getId() {
318
    return this.id;
332
    return this.id;
319
  }
333
  }
Line 640... Line 654...
640
    if (!value) {
654
    if (!value) {
641
      this.lastScanType = null;
655
      this.lastScanType = null;
642
    }
656
    }
643
  }
657
  }
644
 
658
 
-
 
659
  public double getNlc() {
-
 
660
    return this.nlc;
-
 
661
  }
-
 
662
 
-
 
663
  public void setNlc(double nlc) {
-
 
664
    this.nlc = nlc;
-
 
665
    setNlcIsSet(true);
-
 
666
  }
-
 
667
 
-
 
668
  public void unsetNlc() {
-
 
669
    __isset_bit_vector.clear(__NLC_ISSET_ID);
-
 
670
  }
-
 
671
 
-
 
672
  /** Returns true if field nlc is set (has been assigned a value) and false otherwise */
-
 
673
  public boolean isSetNlc() {
-
 
674
    return __isset_bit_vector.get(__NLC_ISSET_ID);
-
 
675
  }
-
 
676
 
-
 
677
  public void setNlcIsSet(boolean value) {
-
 
678
    __isset_bit_vector.set(__NLC_ISSET_ID, value);
-
 
679
  }
-
 
680
 
645
  public void setFieldValue(_Fields field, Object value) {
681
  public void setFieldValue(_Fields field, Object value) {
646
    switch (field) {
682
    switch (field) {
647
    case ID:
683
    case ID:
648
      if (value == null) {
684
      if (value == null) {
649
        unsetId();
685
        unsetId();
Line 754... Line 790...
754
      } else {
790
      } else {
755
        setLastScanType((ScanType)value);
791
        setLastScanType((ScanType)value);
756
      }
792
      }
757
      break;
793
      break;
758
 
794
 
-
 
795
    case NLC:
-
 
796
      if (value == null) {
-
 
797
        unsetNlc();
-
 
798
      } else {
-
 
799
        setNlc((Double)value);
-
 
800
      }
-
 
801
      break;
-
 
802
 
759
    }
803
    }
760
  }
804
  }
761
 
805
 
762
  public Object getFieldValue(_Fields field) {
806
  public Object getFieldValue(_Fields field) {
763
    switch (field) {
807
    switch (field) {
Line 801... Line 845...
801
      return Long.valueOf(getCurrentWarehouseId());
845
      return Long.valueOf(getCurrentWarehouseId());
802
 
846
 
803
    case LAST_SCAN_TYPE:
847
    case LAST_SCAN_TYPE:
804
      return getLastScanType();
848
      return getLastScanType();
805
 
849
 
-
 
850
    case NLC:
-
 
851
      return Double.valueOf(getNlc());
-
 
852
 
806
    }
853
    }
807
    throw new IllegalStateException();
854
    throw new IllegalStateException();
808
  }
855
  }
809
 
856
 
810
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
857
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 840... Line 887...
840
      return isSetUnitPrice();
887
      return isSetUnitPrice();
841
    case CURRENT_WAREHOUSE_ID:
888
    case CURRENT_WAREHOUSE_ID:
842
      return isSetCurrentWarehouseId();
889
      return isSetCurrentWarehouseId();
843
    case LAST_SCAN_TYPE:
890
    case LAST_SCAN_TYPE:
844
      return isSetLastScanType();
891
      return isSetLastScanType();
-
 
892
    case NLC:
-
 
893
      return isSetNlc();
845
    }
894
    }
846
    throw new IllegalStateException();
895
    throw new IllegalStateException();
847
  }
896
  }
848
 
897
 
849
  @Override
898
  @Override
Line 983... Line 1032...
983
        return false;
1032
        return false;
984
      if (!this.lastScanType.equals(that.lastScanType))
1033
      if (!this.lastScanType.equals(that.lastScanType))
985
        return false;
1034
        return false;
986
    }
1035
    }
987
 
1036
 
-
 
1037
    boolean this_present_nlc = true;
-
 
1038
    boolean that_present_nlc = true;
-
 
1039
    if (this_present_nlc || that_present_nlc) {
-
 
1040
      if (!(this_present_nlc && that_present_nlc))
-
 
1041
        return false;
-
 
1042
      if (this.nlc != that.nlc)
-
 
1043
        return false;
-
 
1044
    }
-
 
1045
 
988
    return true;
1046
    return true;
989
  }
1047
  }
990
 
1048
 
991
  @Override
1049
  @Override
992
  public int hashCode() {
1050
  public int hashCode() {
Line 1139... Line 1197...
1139
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastScanType, typedOther.lastScanType);
1197
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastScanType, typedOther.lastScanType);
1140
      if (lastComparison != 0) {
1198
      if (lastComparison != 0) {
1141
        return lastComparison;
1199
        return lastComparison;
1142
      }
1200
      }
1143
    }
1201
    }
-
 
1202
    lastComparison = Boolean.valueOf(isSetNlc()).compareTo(typedOther.isSetNlc());
-
 
1203
    if (lastComparison != 0) {
-
 
1204
      return lastComparison;
-
 
1205
    }
-
 
1206
    if (isSetNlc()) {
-
 
1207
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nlc, typedOther.nlc);
-
 
1208
      if (lastComparison != 0) {
-
 
1209
        return lastComparison;
-
 
1210
      }
-
 
1211
    }
1144
    return 0;
1212
    return 0;
1145
  }
1213
  }
1146
 
1214
 
1147
  public _Fields fieldForId(int fieldId) {
1215
  public _Fields fieldForId(int fieldId) {
1148
    return _Fields.findByThriftId(fieldId);
1216
    return _Fields.findByThriftId(fieldId);
Line 1264... Line 1332...
1264
            this.lastScanType = ScanType.findByValue(iprot.readI32());
1332
            this.lastScanType = ScanType.findByValue(iprot.readI32());
1265
          } else { 
1333
          } else { 
1266
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1334
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1267
          }
1335
          }
1268
          break;
1336
          break;
-
 
1337
        case 15: // NLC
-
 
1338
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
1339
            this.nlc = iprot.readDouble();
-
 
1340
            setNlcIsSet(true);
-
 
1341
          } else { 
-
 
1342
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1343
          }
-
 
1344
          break;
1269
        default:
1345
        default:
1270
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1346
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1271
      }
1347
      }
1272
      iprot.readFieldEnd();
1348
      iprot.readFieldEnd();
1273
    }
1349
    }
Line 1327... Line 1403...
1327
    if (this.lastScanType != null) {
1403
    if (this.lastScanType != null) {
1328
      oprot.writeFieldBegin(LAST_SCAN_TYPE_FIELD_DESC);
1404
      oprot.writeFieldBegin(LAST_SCAN_TYPE_FIELD_DESC);
1329
      oprot.writeI32(this.lastScanType.getValue());
1405
      oprot.writeI32(this.lastScanType.getValue());
1330
      oprot.writeFieldEnd();
1406
      oprot.writeFieldEnd();
1331
    }
1407
    }
-
 
1408
    oprot.writeFieldBegin(NLC_FIELD_DESC);
-
 
1409
    oprot.writeDouble(this.nlc);
-
 
1410
    oprot.writeFieldEnd();
1332
    oprot.writeFieldStop();
1411
    oprot.writeFieldStop();
1333
    oprot.writeStructEnd();
1412
    oprot.writeStructEnd();
1334
  }
1413
  }
1335
 
1414
 
1336
  @Override
1415
  @Override
Line 1407... Line 1486...
1407
      sb.append("null");
1486
      sb.append("null");
1408
    } else {
1487
    } else {
1409
      sb.append(this.lastScanType);
1488
      sb.append(this.lastScanType);
1410
    }
1489
    }
1411
    first = false;
1490
    first = false;
-
 
1491
    if (!first) sb.append(", ");
-
 
1492
    sb.append("nlc:");
-
 
1493
    sb.append(this.nlc);
-
 
1494
    first = false;
1412
    sb.append(")");
1495
    sb.append(")");
1413
    return sb.toString();
1496
    return sb.toString();
1414
  }
1497
  }
1415
 
1498
 
1416
  public void validate() throws org.apache.thrift.TException {
1499
  public void validate() throws org.apache.thrift.TException {