Subversion Repositories SmartDukaan

Rev

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

Rev 8182 Rev 31223
Line 3... Line 3...
3
 *
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
5
 */
6
package in.shop2020.model.v1.inventory;
6
package in.shop2020.model.v1.inventory;
7
 
7
 
8
import java.util.List;
-
 
9
import java.util.ArrayList;
-
 
10
import java.util.Map;
8
import java.util.*;
11
import java.util.HashMap;
-
 
12
import java.util.EnumMap;
-
 
13
import java.util.Set;
-
 
14
import java.util.HashSet;
-
 
15
import java.util.EnumSet;
-
 
16
import java.util.Collections;
-
 
17
import java.util.BitSet;
-
 
18
import java.nio.ByteBuffer;
-
 
19
import java.util.Arrays;
-
 
20
import org.slf4j.Logger;
-
 
21
import org.slf4j.LoggerFactory;
-
 
22
 
9
 
23
public class HoldInventoryDetail implements org.apache.thrift.TBase<HoldInventoryDetail, HoldInventoryDetail._Fields>, java.io.Serializable, Cloneable {
10
public class HoldInventoryDetail implements org.apache.thrift.TBase<HoldInventoryDetail, HoldInventoryDetail._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HoldInventoryDetail");
11
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HoldInventoryDetail");
25
 
12
 
26
  private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);
13
  private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short) 1);
27
  private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_id", org.apache.thrift.protocol.TType.I64, (short)2);
14
  private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_id", org.apache.thrift.protocol.TType.I64, (short) 2);
28
  private static final org.apache.thrift.protocol.TField HELD_FIELD_DESC = new org.apache.thrift.protocol.TField("held", org.apache.thrift.protocol.TType.I64, (short)3);
15
  private static final org.apache.thrift.protocol.TField HELD_FIELD_DESC = new org.apache.thrift.protocol.TField("held", org.apache.thrift.protocol.TType.I64, (short) 3);
29
  private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.I64, (short)4);
16
  private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.I64, (short) 4);
30
 
17
 
31
  private long item_id; // required
18
  private long item_id; // required
32
  private long warehouse_id; // required
19
  private long warehouse_id; // required
33
  private long held; // required
20
  private long held; // required
34
  private long source; // required
21
  private long source; // required
35
 
22
 
-
 
23
  /**
36
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24
   * The set of fields this struct contains, along with convenience methods for finding and manipulating them.
-
 
25
   */
37
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
26
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
38
    ITEM_ID((short)1, "item_id"),
27
    ITEM_ID((short) 1, "item_id"),
39
    WAREHOUSE_ID((short)2, "warehouse_id"),
28
    WAREHOUSE_ID((short) 2, "warehouse_id"),
40
    HELD((short)3, "held"),
29
    HELD((short) 3, "held"),
41
    SOURCE((short)4, "source");
30
    SOURCE((short) 4, "source");
42
 
31
 
43
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
44
 
33
 
45
    static {
34
    static {
46
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
35
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 50... Line 39...
50
 
39
 
51
    /**
40
    /**
52
     * Find the _Fields constant that matches fieldId, or null if its not found.
41
     * Find the _Fields constant that matches fieldId, or null if its not found.
53
     */
42
     */
54
    public static _Fields findByThriftId(int fieldId) {
43
    public static _Fields findByThriftId(int fieldId) {
55
      switch(fieldId) {
44
      switch (fieldId) {
56
        case 1: // ITEM_ID
45
        case 1: // ITEM_ID
57
          return ITEM_ID;
46
          return ITEM_ID;
58
        case 2: // WAREHOUSE_ID
47
        case 2: // WAREHOUSE_ID
59
          return WAREHOUSE_ID;
48
          return WAREHOUSE_ID;
60
        case 3: // HELD
49
        case 3: // HELD
Line 106... Line 95...
106
  private static final int __HELD_ISSET_ID = 2;
95
  private static final int __HELD_ISSET_ID = 2;
107
  private static final int __SOURCE_ISSET_ID = 3;
96
  private static final int __SOURCE_ISSET_ID = 3;
108
  private BitSet __isset_bit_vector = new BitSet(4);
97
  private BitSet __isset_bit_vector = new BitSet(4);
109
 
98
 
110
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
99
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
100
 
111
  static {
101
  static {
112
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
102
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
113
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
103
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT,
114
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
104
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
115
    tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouse_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
105
    tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouse_id", org.apache.thrift.TFieldRequirementType.DEFAULT,
116
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
106
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
117
    tmpMap.put(_Fields.HELD, new org.apache.thrift.meta_data.FieldMetaData("held", org.apache.thrift.TFieldRequirementType.DEFAULT, 
107
    tmpMap.put(_Fields.HELD, new org.apache.thrift.meta_data.FieldMetaData("held", org.apache.thrift.TFieldRequirementType.DEFAULT,
118
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
108
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
119
    tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.DEFAULT, 
109
    tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.DEFAULT,
120
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
110
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
121
    metaDataMap = Collections.unmodifiableMap(tmpMap);
111
    metaDataMap = Collections.unmodifiableMap(tmpMap);
122
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HoldInventoryDetail.class, metaDataMap);
112
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HoldInventoryDetail.class, metaDataMap);
123
  }
113
  }
124
 
114
 
125
  public HoldInventoryDetail() {
115
  public HoldInventoryDetail() {
126
  }
116
  }
127
 
117
 
128
  public HoldInventoryDetail(
118
  public HoldInventoryDetail(
129
    long item_id,
119
          long item_id,
130
    long warehouse_id,
120
          long warehouse_id,
131
    long held,
121
          long held,
132
    long source)
122
          long source) {
133
  {
-
 
134
    this();
123
    this();
135
    this.item_id = item_id;
124
    this.item_id = item_id;
136
    setItem_idIsSet(true);
125
    setItem_idIsSet(true);
137
    this.warehouse_id = warehouse_id;
126
    this.warehouse_id = warehouse_id;
138
    setWarehouse_idIsSet(true);
127
    setWarehouse_idIsSet(true);
Line 181... Line 170...
181
 
170
 
182
  public void unsetItem_id() {
171
  public void unsetItem_id() {
183
    __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
172
    __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
184
  }
173
  }
185
 
174
 
-
 
175
  /**
186
  /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
176
   * Returns true if field item_id is set (has been assigned a value) and false otherwise
-
 
177
   */
187
  public boolean isSetItem_id() {
178
  public boolean isSetItem_id() {
188
    return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
179
    return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
189
  }
180
  }
190
 
181
 
191
  public void setItem_idIsSet(boolean value) {
182
  public void setItem_idIsSet(boolean value) {
Line 203... Line 194...
203
 
194
 
204
  public void unsetWarehouse_id() {
195
  public void unsetWarehouse_id() {
205
    __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
196
    __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
206
  }
197
  }
207
 
198
 
-
 
199
  /**
208
  /** Returns true if field warehouse_id is set (has been assigned a value) and false otherwise */
200
   * Returns true if field warehouse_id is set (has been assigned a value) and false otherwise
-
 
201
   */
209
  public boolean isSetWarehouse_id() {
202
  public boolean isSetWarehouse_id() {
210
    return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
203
    return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
211
  }
204
  }
212
 
205
 
213
  public void setWarehouse_idIsSet(boolean value) {
206
  public void setWarehouse_idIsSet(boolean value) {
Line 225... Line 218...
225
 
218
 
226
  public void unsetHeld() {
219
  public void unsetHeld() {
227
    __isset_bit_vector.clear(__HELD_ISSET_ID);
220
    __isset_bit_vector.clear(__HELD_ISSET_ID);
228
  }
221
  }
229
 
222
 
-
 
223
  /**
230
  /** Returns true if field held is set (has been assigned a value) and false otherwise */
224
   * Returns true if field held is set (has been assigned a value) and false otherwise
-
 
225
   */
231
  public boolean isSetHeld() {
226
  public boolean isSetHeld() {
232
    return __isset_bit_vector.get(__HELD_ISSET_ID);
227
    return __isset_bit_vector.get(__HELD_ISSET_ID);
233
  }
228
  }
234
 
229
 
235
  public void setHeldIsSet(boolean value) {
230
  public void setHeldIsSet(boolean value) {
Line 258... Line 253...
258
    __isset_bit_vector.set(__SOURCE_ISSET_ID, value);
253
    __isset_bit_vector.set(__SOURCE_ISSET_ID, value);
259
  }
254
  }
260
 
255
 
261
  public void setFieldValue(_Fields field, Object value) {
256
  public void setFieldValue(_Fields field, Object value) {
262
    switch (field) {
257
    switch (field) {
263
    case ITEM_ID:
258
      case ITEM_ID:
264
      if (value == null) {
259
        if (value == null) {
265
        unsetItem_id();
260
          unsetItem_id();
266
      } else {
261
        } else {
267
        setItem_id((Long)value);
262
          setItem_id((Long) value);
268
      }
263
        }
269
      break;
264
        break;
270
 
265
 
271
    case WAREHOUSE_ID:
266
      case WAREHOUSE_ID:
272
      if (value == null) {
267
        if (value == null) {
273
        unsetWarehouse_id();
268
          unsetWarehouse_id();
274
      } else {
269
        } else {
275
        setWarehouse_id((Long)value);
270
          setWarehouse_id((Long) value);
276
      }
271
        }
277
      break;
272
        break;
278
 
273
 
279
    case HELD:
274
      case HELD:
280
      if (value == null) {
275
        if (value == null) {
281
        unsetHeld();
276
          unsetHeld();
282
      } else {
277
        } else {
283
        setHeld((Long)value);
278
          setHeld((Long) value);
284
      }
279
        }
285
      break;
280
        break;
286
 
281
 
287
    case SOURCE:
282
      case SOURCE:
288
      if (value == null) {
283
        if (value == null) {
289
        unsetSource();
284
          unsetSource();
290
      } else {
285
        } else {
291
        setSource((Long)value);
286
          setSource((Long) value);
292
      }
287
        }
293
      break;
288
      break;
294
 
289
 
295
    }
290
    }
296
  }
291
  }
297
 
292
 
298
  public Object getFieldValue(_Fields field) {
293
  public Object getFieldValue(_Fields field) {
299
    switch (field) {
294
    switch (field) {
300
    case ITEM_ID:
295
      case ITEM_ID:
301
      return Long.valueOf(getItem_id());
296
        return Long.valueOf(getItem_id());
302
 
297
 
303
    case WAREHOUSE_ID:
298
      case WAREHOUSE_ID:
304
      return Long.valueOf(getWarehouse_id());
299
        return Long.valueOf(getWarehouse_id());
305
 
300
 
306
    case HELD:
301
      case HELD:
307
      return Long.valueOf(getHeld());
302
        return Long.valueOf(getHeld());
308
 
303
 
309
    case SOURCE:
304
      case SOURCE:
310
      return Long.valueOf(getSource());
305
        return Long.valueOf(getSource());
311
 
306
 
312
    }
307
    }
313
    throw new IllegalStateException();
308
    throw new IllegalStateException();
314
  }
309
  }
315
 
310
 
Line 318... Line 313...
318
    if (field == null) {
313
    if (field == null) {
319
      throw new IllegalArgumentException();
314
      throw new IllegalArgumentException();
320
    }
315
    }
321
 
316
 
322
    switch (field) {
317
    switch (field) {
323
    case ITEM_ID:
318
      case ITEM_ID:
324
      return isSetItem_id();
319
        return isSetItem_id();
325
    case WAREHOUSE_ID:
320
      case WAREHOUSE_ID:
326
      return isSetWarehouse_id();
321
        return isSetWarehouse_id();
327
    case HELD:
322
      case HELD:
328
      return isSetHeld();
323
        return isSetHeld();
329
    case SOURCE:
324
      case SOURCE:
330
      return isSetSource();
325
        return isSetSource();
331
    }
326
    }
332
    throw new IllegalStateException();
327
    throw new IllegalStateException();
333
  }
328
  }
334
 
329
 
335
  @Override
330
  @Override
336
  public boolean equals(Object that) {
331
  public boolean equals(Object that) {
337
    if (that == null)
332
    if (that == null)
338
      return false;
333
      return false;
339
    if (that instanceof HoldInventoryDetail)
334
    if (that instanceof HoldInventoryDetail)
340
      return this.equals((HoldInventoryDetail)that);
335
      return this.equals((HoldInventoryDetail) that);
341
    return false;
336
    return false;
342
  }
337
  }
343
 
338
 
344
  public boolean equals(HoldInventoryDetail that) {
339
  public boolean equals(HoldInventoryDetail that) {
345
    if (that == null)
340
    if (that == null)
Line 393... Line 388...
393
    if (!getClass().equals(other.getClass())) {
388
    if (!getClass().equals(other.getClass())) {
394
      return getClass().getName().compareTo(other.getClass().getName());
389
      return getClass().getName().compareTo(other.getClass().getName());
395
    }
390
    }
396
 
391
 
397
    int lastComparison = 0;
392
    int lastComparison = 0;
398
    HoldInventoryDetail typedOther = (HoldInventoryDetail)other;
393
    HoldInventoryDetail typedOther = (HoldInventoryDetail) other;
399
 
394
 
400
    lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
395
    lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
401
    if (lastComparison != 0) {
396
    if (lastComparison != 0) {
402
      return lastComparison;
397
      return lastComparison;
403
    }
398
    }
Line 448... Line 443...
448
    org.apache.thrift.protocol.TField field;
443
    org.apache.thrift.protocol.TField field;
449
    iprot.readStructBegin();
444
    iprot.readStructBegin();
450
    while (true)
445
    while (true)
451
    {
446
    {
452
      field = iprot.readFieldBegin();
447
      field = iprot.readFieldBegin();
453
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
448
      if (field.type == org.apache.thrift.protocol.TType.STOP) {
454
        break;
449
        break;
455
      }
450
      }
456
      switch (field.id) {
451
      switch (field.id) {
457
        case 1: // ITEM_ID
452
        case 1: // ITEM_ID
458
          if (field.type == org.apache.thrift.protocol.TType.I64) {
453
          if (field.type == org.apache.thrift.protocol.TType.I64) {
459
            this.item_id = iprot.readI64();
454
            this.item_id = iprot.readI64();
460
            setItem_idIsSet(true);
455
            setItem_idIsSet(true);
461
          } else { 
456
          } else {
462
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
457
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
463
          }
458
          }
464
          break;
459
          break;
465
        case 2: // WAREHOUSE_ID
460
        case 2: // WAREHOUSE_ID
466
          if (field.type == org.apache.thrift.protocol.TType.I64) {
461
          if (field.type == org.apache.thrift.protocol.TType.I64) {
467
            this.warehouse_id = iprot.readI64();
462
            this.warehouse_id = iprot.readI64();
468
            setWarehouse_idIsSet(true);
463
            setWarehouse_idIsSet(true);
469
          } else { 
464
          } else {
470
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
465
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
471
          }
466
          }
472
          break;
467
          break;
473
        case 3: // HELD
468
        case 3: // HELD
474
          if (field.type == org.apache.thrift.protocol.TType.I64) {
469
          if (field.type == org.apache.thrift.protocol.TType.I64) {
475
            this.held = iprot.readI64();
470
            this.held = iprot.readI64();
476
            setHeldIsSet(true);
471
            setHeldIsSet(true);
477
          } else { 
472
          } else {
478
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
473
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
479
          }
474
          }
480
          break;
475
          break;
481
        case 4: // SOURCE
476
        case 4: // SOURCE
482
          if (field.type == org.apache.thrift.protocol.TType.I64) {
477
          if (field.type == org.apache.thrift.protocol.TType.I64) {