Subversion Repositories SmartDukaan

Rev

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

Rev 4393 Rev 4444
Line 26... Line 26...
26
  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
26
  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2);
27
  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2);
28
  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I64, (short)3);
28
  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I64, (short)3);
29
  private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4);
29
  private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4);
30
  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)5);
30
  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)5);
-
 
31
  private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)6);
31
 
32
 
32
  private long id; // required
33
  private long id; // required
33
  private AlertType type; // required
34
  private AlertType type; // required
34
  private long status; // required
35
  private long status; // required
35
  private long timestamp; // required
36
  private long timestamp; // required
36
  private String description; // required
37
  private String description; // required
-
 
38
  private long warehouseId; // required
37
 
39
 
38
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
40
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
39
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
41
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
40
    ID((short)1, "id"),
42
    ID((short)1, "id"),
41
    /**
43
    /**
Line 43... Line 45...
43
     * @see AlertType
45
     * @see AlertType
44
     */
46
     */
45
    TYPE((short)2, "type"),
47
    TYPE((short)2, "type"),
46
    STATUS((short)3, "status"),
48
    STATUS((short)3, "status"),
47
    TIMESTAMP((short)4, "timestamp"),
49
    TIMESTAMP((short)4, "timestamp"),
48
    DESCRIPTION((short)5, "description");
50
    DESCRIPTION((short)5, "description"),
-
 
51
    WAREHOUSE_ID((short)6, "warehouseId");
49
 
52
 
50
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
53
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
51
 
54
 
52
    static {
55
    static {
53
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
56
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 68... Line 71...
68
          return STATUS;
71
          return STATUS;
69
        case 4: // TIMESTAMP
72
        case 4: // TIMESTAMP
70
          return TIMESTAMP;
73
          return TIMESTAMP;
71
        case 5: // DESCRIPTION
74
        case 5: // DESCRIPTION
72
          return DESCRIPTION;
75
          return DESCRIPTION;
-
 
76
        case 6: // WAREHOUSE_ID
-
 
77
          return WAREHOUSE_ID;
73
        default:
78
        default:
74
          return null;
79
          return null;
75
      }
80
      }
76
    }
81
    }
77
 
82
 
Line 111... Line 116...
111
 
116
 
112
  // isset id assignments
117
  // isset id assignments
113
  private static final int __ID_ISSET_ID = 0;
118
  private static final int __ID_ISSET_ID = 0;
114
  private static final int __STATUS_ISSET_ID = 1;
119
  private static final int __STATUS_ISSET_ID = 1;
115
  private static final int __TIMESTAMP_ISSET_ID = 2;
120
  private static final int __TIMESTAMP_ISSET_ID = 2;
-
 
121
  private static final int __WAREHOUSEID_ISSET_ID = 3;
116
  private BitSet __isset_bit_vector = new BitSet(3);
122
  private BitSet __isset_bit_vector = new BitSet(4);
117
 
123
 
118
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
124
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
119
  static {
125
  static {
120
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
126
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
121
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
127
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 126... Line 132...
126
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
132
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
127
    tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
133
    tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
128
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
134
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
129
    tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, 
135
    tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, 
130
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
136
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
137
    tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
138
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
131
    metaDataMap = Collections.unmodifiableMap(tmpMap);
139
    metaDataMap = Collections.unmodifiableMap(tmpMap);
132
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Alert.class, metaDataMap);
140
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Alert.class, metaDataMap);
133
  }
141
  }
134
 
142
 
135
  public Alert() {
143
  public Alert() {
Line 138... Line 146...
138
  public Alert(
146
  public Alert(
139
    long id,
147
    long id,
140
    AlertType type,
148
    AlertType type,
141
    long status,
149
    long status,
142
    long timestamp,
150
    long timestamp,
143
    String description)
151
    String description,
-
 
152
    long warehouseId)
144
  {
153
  {
145
    this();
154
    this();
146
    this.id = id;
155
    this.id = id;
147
    setIdIsSet(true);
156
    setIdIsSet(true);
148
    this.type = type;
157
    this.type = type;
149
    this.status = status;
158
    this.status = status;
150
    setStatusIsSet(true);
159
    setStatusIsSet(true);
151
    this.timestamp = timestamp;
160
    this.timestamp = timestamp;
152
    setTimestampIsSet(true);
161
    setTimestampIsSet(true);
153
    this.description = description;
162
    this.description = description;
-
 
163
    this.warehouseId = warehouseId;
-
 
164
    setWarehouseIdIsSet(true);
154
  }
165
  }
155
 
166
 
156
  /**
167
  /**
157
   * Performs a deep copy on <i>other</i>.
168
   * Performs a deep copy on <i>other</i>.
158
   */
169
   */
Line 166... Line 177...
166
    this.status = other.status;
177
    this.status = other.status;
167
    this.timestamp = other.timestamp;
178
    this.timestamp = other.timestamp;
168
    if (other.isSetDescription()) {
179
    if (other.isSetDescription()) {
169
      this.description = other.description;
180
      this.description = other.description;
170
    }
181
    }
-
 
182
    this.warehouseId = other.warehouseId;
171
  }
183
  }
172
 
184
 
173
  public Alert deepCopy() {
185
  public Alert deepCopy() {
174
    return new Alert(this);
186
    return new Alert(this);
175
  }
187
  }
Line 182... Line 194...
182
    setStatusIsSet(false);
194
    setStatusIsSet(false);
183
    this.status = 0;
195
    this.status = 0;
184
    setTimestampIsSet(false);
196
    setTimestampIsSet(false);
185
    this.timestamp = 0;
197
    this.timestamp = 0;
186
    this.description = null;
198
    this.description = null;
-
 
199
    setWarehouseIdIsSet(false);
-
 
200
    this.warehouseId = 0;
187
  }
201
  }
188
 
202
 
189
  public long getId() {
203
  public long getId() {
190
    return this.id;
204
    return this.id;
191
  }
205
  }
Line 304... Line 318...
304
    if (!value) {
318
    if (!value) {
305
      this.description = null;
319
      this.description = null;
306
    }
320
    }
307
  }
321
  }
308
 
322
 
-
 
323
  public long getWarehouseId() {
-
 
324
    return this.warehouseId;
-
 
325
  }
-
 
326
 
-
 
327
  public void setWarehouseId(long warehouseId) {
-
 
328
    this.warehouseId = warehouseId;
-
 
329
    setWarehouseIdIsSet(true);
-
 
330
  }
-
 
331
 
-
 
332
  public void unsetWarehouseId() {
-
 
333
    __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
-
 
334
  }
-
 
335
 
-
 
336
  /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
-
 
337
  public boolean isSetWarehouseId() {
-
 
338
    return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
-
 
339
  }
-
 
340
 
-
 
341
  public void setWarehouseIdIsSet(boolean value) {
-
 
342
    __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
-
 
343
  }
-
 
344
 
309
  public void setFieldValue(_Fields field, Object value) {
345
  public void setFieldValue(_Fields field, Object value) {
310
    switch (field) {
346
    switch (field) {
311
    case ID:
347
    case ID:
312
      if (value == null) {
348
      if (value == null) {
313
        unsetId();
349
        unsetId();
Line 346... Line 382...
346
      } else {
382
      } else {
347
        setDescription((String)value);
383
        setDescription((String)value);
348
      }
384
      }
349
      break;
385
      break;
350
 
386
 
-
 
387
    case WAREHOUSE_ID:
-
 
388
      if (value == null) {
-
 
389
        unsetWarehouseId();
-
 
390
      } else {
-
 
391
        setWarehouseId((Long)value);
-
 
392
      }
-
 
393
      break;
-
 
394
 
351
    }
395
    }
352
  }
396
  }
353
 
397
 
354
  public Object getFieldValue(_Fields field) {
398
  public Object getFieldValue(_Fields field) {
355
    switch (field) {
399
    switch (field) {
Line 366... Line 410...
366
      return Long.valueOf(getTimestamp());
410
      return Long.valueOf(getTimestamp());
367
 
411
 
368
    case DESCRIPTION:
412
    case DESCRIPTION:
369
      return getDescription();
413
      return getDescription();
370
 
414
 
-
 
415
    case WAREHOUSE_ID:
-
 
416
      return Long.valueOf(getWarehouseId());
-
 
417
 
371
    }
418
    }
372
    throw new IllegalStateException();
419
    throw new IllegalStateException();
373
  }
420
  }
374
 
421
 
375
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
422
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 387... Line 434...
387
      return isSetStatus();
434
      return isSetStatus();
388
    case TIMESTAMP:
435
    case TIMESTAMP:
389
      return isSetTimestamp();
436
      return isSetTimestamp();
390
    case DESCRIPTION:
437
    case DESCRIPTION:
391
      return isSetDescription();
438
      return isSetDescription();
-
 
439
    case WAREHOUSE_ID:
-
 
440
      return isSetWarehouseId();
392
    }
441
    }
393
    throw new IllegalStateException();
442
    throw new IllegalStateException();
394
  }
443
  }
395
 
444
 
396
  @Override
445
  @Override
Line 449... Line 498...
449
        return false;
498
        return false;
450
      if (!this.description.equals(that.description))
499
      if (!this.description.equals(that.description))
451
        return false;
500
        return false;
452
    }
501
    }
453
 
502
 
-
 
503
    boolean this_present_warehouseId = true;
-
 
504
    boolean that_present_warehouseId = true;
-
 
505
    if (this_present_warehouseId || that_present_warehouseId) {
-
 
506
      if (!(this_present_warehouseId && that_present_warehouseId))
-
 
507
        return false;
-
 
508
      if (this.warehouseId != that.warehouseId)
-
 
509
        return false;
-
 
510
    }
-
 
511
 
454
    return true;
512
    return true;
455
  }
513
  }
456
 
514
 
457
  @Override
515
  @Override
458
  public int hashCode() {
516
  public int hashCode() {
Line 515... Line 573...
515
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description);
573
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description);
516
      if (lastComparison != 0) {
574
      if (lastComparison != 0) {
517
        return lastComparison;
575
        return lastComparison;
518
      }
576
      }
519
    }
577
    }
-
 
578
    lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
-
 
579
    if (lastComparison != 0) {
-
 
580
      return lastComparison;
-
 
581
    }
-
 
582
    if (isSetWarehouseId()) {
-
 
583
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
-
 
584
      if (lastComparison != 0) {
-
 
585
        return lastComparison;
-
 
586
      }
-
 
587
    }
520
    return 0;
588
    return 0;
521
  }
589
  }
522
 
590
 
523
  public _Fields fieldForId(int fieldId) {
591
  public _Fields fieldForId(int fieldId) {
524
    return _Fields.findByThriftId(fieldId);
592
    return _Fields.findByThriftId(fieldId);
Line 570... Line 638...
570
            this.description = iprot.readString();
638
            this.description = iprot.readString();
571
          } else { 
639
          } else { 
572
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
640
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
573
          }
641
          }
574
          break;
642
          break;
-
 
643
        case 6: // WAREHOUSE_ID
-
 
644
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
645
            this.warehouseId = iprot.readI64();
-
 
646
            setWarehouseIdIsSet(true);
-
 
647
          } else { 
-
 
648
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
649
          }
-
 
650
          break;
575
        default:
651
        default:
576
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
652
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
577
      }
653
      }
578
      iprot.readFieldEnd();
654
      iprot.readFieldEnd();
579
    }
655
    }
Line 602... Line 678...
602
    if (this.description != null) {
678
    if (this.description != null) {
603
      oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
679
      oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
604
      oprot.writeString(this.description);
680
      oprot.writeString(this.description);
605
      oprot.writeFieldEnd();
681
      oprot.writeFieldEnd();
606
    }
682
    }
-
 
683
    oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
-
 
684
    oprot.writeI64(this.warehouseId);
-
 
685
    oprot.writeFieldEnd();
607
    oprot.writeFieldStop();
686
    oprot.writeFieldStop();
608
    oprot.writeStructEnd();
687
    oprot.writeStructEnd();
609
  }
688
  }
610
 
689
 
611
  @Override
690
  @Override
Line 638... Line 717...
638
      sb.append("null");
717
      sb.append("null");
639
    } else {
718
    } else {
640
      sb.append(this.description);
719
      sb.append(this.description);
641
    }
720
    }
642
    first = false;
721
    first = false;
-
 
722
    if (!first) sb.append(", ");
-
 
723
    sb.append("warehouseId:");
-
 
724
    sb.append(this.warehouseId);
-
 
725
    first = false;
643
    sb.append(")");
726
    sb.append(")");
644
    return sb.toString();
727
    return sb.toString();
645
  }
728
  }
646
 
729
 
647
  public void validate() throws org.apache.thrift.TException {
730
  public void validate() throws org.apache.thrift.TException {