Subversion Repositories SmartDukaan

Rev

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

Rev 305 Rev 483
Line 25... Line 25...
25
 
25
 
26
public class Alert implements TBase<Alert._Fields>, java.io.Serializable, Cloneable, Comparable<Alert> {
26
public class Alert implements TBase<Alert._Fields>, java.io.Serializable, Cloneable, Comparable<Alert> {
27
  private static final TStruct STRUCT_DESC = new TStruct("Alert");
27
  private static final TStruct STRUCT_DESC = new TStruct("Alert");
28
 
28
 
29
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
29
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
30
  private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transaction_id", TType.I64, (short)2);
30
  private static final TField ORDER_ID_FIELD_DESC = new TField("order_id", TType.I64, (short)2);
31
  private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
31
  private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
32
  private static final TField TIME_SET_FIELD_DESC = new TField("time_set", TType.I64, (short)4);
32
  private static final TField TIME_SET_FIELD_DESC = new TField("time_set", TType.I64, (short)4);
33
  private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)5);
33
  private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)5);
34
  private static final TField TIME_UNSET_FIELD_DESC = new TField("time_unset", TType.I64, (short)6);
34
  private static final TField TIME_UNSET_FIELD_DESC = new TField("time_unset", TType.I64, (short)6);
35
 
35
 
36
  private long id;
36
  private long id;
37
  private long transaction_id;
37
  private long order_id;
38
  private long type;
38
  private long type;
39
  private long time_set;
39
  private long time_set;
40
  private String comment;
40
  private String comment;
41
  private long time_unset;
41
  private long time_unset;
42
 
42
 
43
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
43
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
44
  public enum _Fields implements TFieldIdEnum {
44
  public enum _Fields implements TFieldIdEnum {
45
    ID((short)1, "id"),
45
    ID((short)1, "id"),
46
    TRANSACTION_ID((short)2, "transaction_id"),
46
    ORDER_ID((short)2, "order_id"),
47
    TYPE((short)3, "type"),
47
    TYPE((short)3, "type"),
48
    TIME_SET((short)4, "time_set"),
48
    TIME_SET((short)4, "time_set"),
49
    COMMENT((short)5, "comment"),
49
    COMMENT((short)5, "comment"),
50
    TIME_UNSET((short)6, "time_unset");
50
    TIME_UNSET((short)6, "time_unset");
51
 
51
 
Line 100... Line 100...
100
    }
100
    }
101
  }
101
  }
102
 
102
 
103
  // isset id assignments
103
  // isset id assignments
104
  private static final int __ID_ISSET_ID = 0;
104
  private static final int __ID_ISSET_ID = 0;
105
  private static final int __TRANSACTION_ID_ISSET_ID = 1;
105
  private static final int __ORDER_ID_ISSET_ID = 1;
106
  private static final int __TYPE_ISSET_ID = 2;
106
  private static final int __TYPE_ISSET_ID = 2;
107
  private static final int __TIME_SET_ISSET_ID = 3;
107
  private static final int __TIME_SET_ISSET_ID = 3;
108
  private static final int __TIME_UNSET_ISSET_ID = 4;
108
  private static final int __TIME_UNSET_ISSET_ID = 4;
109
  private BitSet __isset_bit_vector = new BitSet(5);
109
  private BitSet __isset_bit_vector = new BitSet(5);
110
 
110
 
111
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
111
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
112
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
112
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
113
        new FieldValueMetaData(TType.I64)));
113
        new FieldValueMetaData(TType.I64)));
114
    put(_Fields.TRANSACTION_ID, new FieldMetaData("transaction_id", TFieldRequirementType.DEFAULT, 
114
    put(_Fields.ORDER_ID, new FieldMetaData("order_id", TFieldRequirementType.DEFAULT, 
115
        new FieldValueMetaData(TType.I64)));
115
        new FieldValueMetaData(TType.I64)));
116
    put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
116
    put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
117
        new FieldValueMetaData(TType.I64)));
117
        new FieldValueMetaData(TType.I64)));
118
    put(_Fields.TIME_SET, new FieldMetaData("time_set", TFieldRequirementType.DEFAULT, 
118
    put(_Fields.TIME_SET, new FieldMetaData("time_set", TFieldRequirementType.DEFAULT, 
119
        new FieldValueMetaData(TType.I64)));
119
        new FieldValueMetaData(TType.I64)));
Line 130... Line 130...
130
  public Alert() {
130
  public Alert() {
131
  }
131
  }
132
 
132
 
133
  public Alert(
133
  public Alert(
134
    long id,
134
    long id,
135
    long transaction_id,
135
    long order_id,
136
    long type,
136
    long type,
137
    long time_set,
137
    long time_set,
138
    String comment,
138
    String comment,
139
    long time_unset)
139
    long time_unset)
140
  {
140
  {
141
    this();
141
    this();
142
    this.id = id;
142
    this.id = id;
143
    setIdIsSet(true);
143
    setIdIsSet(true);
144
    this.transaction_id = transaction_id;
144
    this.order_id = order_id;
145
    setTransaction_idIsSet(true);
145
    setOrder_idIsSet(true);
146
    this.type = type;
146
    this.type = type;
147
    setTypeIsSet(true);
147
    setTypeIsSet(true);
148
    this.time_set = time_set;
148
    this.time_set = time_set;
149
    setTime_setIsSet(true);
149
    setTime_setIsSet(true);
150
    this.comment = comment;
150
    this.comment = comment;
Line 157... Line 157...
157
   */
157
   */
158
  public Alert(Alert other) {
158
  public Alert(Alert other) {
159
    __isset_bit_vector.clear();
159
    __isset_bit_vector.clear();
160
    __isset_bit_vector.or(other.__isset_bit_vector);
160
    __isset_bit_vector.or(other.__isset_bit_vector);
161
    this.id = other.id;
161
    this.id = other.id;
162
    this.transaction_id = other.transaction_id;
162
    this.order_id = other.order_id;
163
    this.type = other.type;
163
    this.type = other.type;
164
    this.time_set = other.time_set;
164
    this.time_set = other.time_set;
165
    if (other.isSetComment()) {
165
    if (other.isSetComment()) {
166
      this.comment = other.comment;
166
      this.comment = other.comment;
167
    }
167
    }
Line 198... Line 198...
198
 
198
 
199
  public void setIdIsSet(boolean value) {
199
  public void setIdIsSet(boolean value) {
200
    __isset_bit_vector.set(__ID_ISSET_ID, value);
200
    __isset_bit_vector.set(__ID_ISSET_ID, value);
201
  }
201
  }
202
 
202
 
203
  public long getTransaction_id() {
203
  public long getOrder_id() {
204
    return this.transaction_id;
204
    return this.order_id;
205
  }
205
  }
206
 
206
 
207
  public Alert setTransaction_id(long transaction_id) {
207
  public Alert setOrder_id(long order_id) {
208
    this.transaction_id = transaction_id;
208
    this.order_id = order_id;
209
    setTransaction_idIsSet(true);
209
    setOrder_idIsSet(true);
210
    return this;
210
    return this;
211
  }
211
  }
212
 
212
 
213
  public void unsetTransaction_id() {
213
  public void unsetOrder_id() {
214
    __isset_bit_vector.clear(__TRANSACTION_ID_ISSET_ID);
214
    __isset_bit_vector.clear(__ORDER_ID_ISSET_ID);
215
  }
215
  }
216
 
216
 
217
  /** Returns true if field transaction_id is set (has been asigned a value) and false otherwise */
217
  /** Returns true if field order_id is set (has been asigned a value) and false otherwise */
218
  public boolean isSetTransaction_id() {
218
  public boolean isSetOrder_id() {
219
    return __isset_bit_vector.get(__TRANSACTION_ID_ISSET_ID);
219
    return __isset_bit_vector.get(__ORDER_ID_ISSET_ID);
220
  }
220
  }
221
 
221
 
222
  public void setTransaction_idIsSet(boolean value) {
222
  public void setOrder_idIsSet(boolean value) {
223
    __isset_bit_vector.set(__TRANSACTION_ID_ISSET_ID, value);
223
    __isset_bit_vector.set(__ORDER_ID_ISSET_ID, value);
224
  }
224
  }
225
 
225
 
226
  public long getType() {
226
  public long getType() {
227
    return this.type;
227
    return this.type;
228
  }
228
  }
Line 324... Line 324...
324
      } else {
324
      } else {
325
        setId((Long)value);
325
        setId((Long)value);
326
      }
326
      }
327
      break;
327
      break;
328
 
328
 
329
    case TRANSACTION_ID:
329
    case ORDER_ID:
330
      if (value == null) {
330
      if (value == null) {
331
        unsetTransaction_id();
331
        unsetOrder_id();
332
      } else {
332
      } else {
333
        setTransaction_id((Long)value);
333
        setOrder_id((Long)value);
334
      }
334
      }
335
      break;
335
      break;
336
 
336
 
337
    case TYPE:
337
    case TYPE:
338
      if (value == null) {
338
      if (value == null) {
Line 376... Line 376...
376
  public Object getFieldValue(_Fields field) {
376
  public Object getFieldValue(_Fields field) {
377
    switch (field) {
377
    switch (field) {
378
    case ID:
378
    case ID:
379
      return new Long(getId());
379
      return new Long(getId());
380
 
380
 
381
    case TRANSACTION_ID:
381
    case ORDER_ID:
382
      return new Long(getTransaction_id());
382
      return new Long(getOrder_id());
383
 
383
 
384
    case TYPE:
384
    case TYPE:
385
      return new Long(getType());
385
      return new Long(getType());
386
 
386
 
387
    case TIME_SET:
387
    case TIME_SET:
Line 404... Line 404...
404
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
404
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
405
  public boolean isSet(_Fields field) {
405
  public boolean isSet(_Fields field) {
406
    switch (field) {
406
    switch (field) {
407
    case ID:
407
    case ID:
408
      return isSetId();
408
      return isSetId();
409
    case TRANSACTION_ID:
409
    case ORDER_ID:
410
      return isSetTransaction_id();
410
      return isSetOrder_id();
411
    case TYPE:
411
    case TYPE:
412
      return isSetType();
412
      return isSetType();
413
    case TIME_SET:
413
    case TIME_SET:
414
      return isSetTime_set();
414
      return isSetTime_set();
415
    case COMMENT:
415
    case COMMENT:
Line 444... Line 444...
444
        return false;
444
        return false;
445
      if (this.id != that.id)
445
      if (this.id != that.id)
446
        return false;
446
        return false;
447
    }
447
    }
448
 
448
 
449
    boolean this_present_transaction_id = true;
449
    boolean this_present_order_id = true;
450
    boolean that_present_transaction_id = true;
450
    boolean that_present_order_id = true;
451
    if (this_present_transaction_id || that_present_transaction_id) {
451
    if (this_present_order_id || that_present_order_id) {
452
      if (!(this_present_transaction_id && that_present_transaction_id))
452
      if (!(this_present_order_id && that_present_order_id))
453
        return false;
453
        return false;
454
      if (this.transaction_id != that.transaction_id)
454
      if (this.order_id != that.order_id)
455
        return false;
455
        return false;
456
    }
456
    }
457
 
457
 
458
    boolean this_present_type = true;
458
    boolean this_present_type = true;
459
    boolean that_present_type = true;
459
    boolean that_present_type = true;
Line 513... Line 513...
513
    }
513
    }
514
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
514
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
515
    if (lastComparison != 0) {
515
    if (lastComparison != 0) {
516
      return lastComparison;
516
      return lastComparison;
517
    }
517
    }
518
    lastComparison = Boolean.valueOf(isSetTransaction_id()).compareTo(isSetTransaction_id());
518
    lastComparison = Boolean.valueOf(isSetOrder_id()).compareTo(isSetOrder_id());
519
    if (lastComparison != 0) {
519
    if (lastComparison != 0) {
520
      return lastComparison;
520
      return lastComparison;
521
    }
521
    }
522
    lastComparison = TBaseHelper.compareTo(transaction_id, typedOther.transaction_id);
522
    lastComparison = TBaseHelper.compareTo(order_id, typedOther.order_id);
523
    if (lastComparison != 0) {
523
    if (lastComparison != 0) {
524
      return lastComparison;
524
      return lastComparison;
525
    }
525
    }
526
    lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
526
    lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
527
    if (lastComparison != 0) {
527
    if (lastComparison != 0) {
Line 578... Line 578...
578
              setIdIsSet(true);
578
              setIdIsSet(true);
579
            } else { 
579
            } else { 
580
              TProtocolUtil.skip(iprot, field.type);
580
              TProtocolUtil.skip(iprot, field.type);
581
            }
581
            }
582
            break;
582
            break;
583
          case TRANSACTION_ID:
583
          case ORDER_ID:
584
            if (field.type == TType.I64) {
584
            if (field.type == TType.I64) {
585
              this.transaction_id = iprot.readI64();
585
              this.order_id = iprot.readI64();
586
              setTransaction_idIsSet(true);
586
              setOrder_idIsSet(true);
587
            } else { 
587
            } else { 
588
              TProtocolUtil.skip(iprot, field.type);
588
              TProtocolUtil.skip(iprot, field.type);
589
            }
589
            }
590
            break;
590
            break;
591
          case TYPE:
591
          case TYPE:
Line 632... Line 632...
632
 
632
 
633
    oprot.writeStructBegin(STRUCT_DESC);
633
    oprot.writeStructBegin(STRUCT_DESC);
634
    oprot.writeFieldBegin(ID_FIELD_DESC);
634
    oprot.writeFieldBegin(ID_FIELD_DESC);
635
    oprot.writeI64(this.id);
635
    oprot.writeI64(this.id);
636
    oprot.writeFieldEnd();
636
    oprot.writeFieldEnd();
637
    oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
637
    oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
638
    oprot.writeI64(this.transaction_id);
638
    oprot.writeI64(this.order_id);
639
    oprot.writeFieldEnd();
639
    oprot.writeFieldEnd();
640
    oprot.writeFieldBegin(TYPE_FIELD_DESC);
640
    oprot.writeFieldBegin(TYPE_FIELD_DESC);
641
    oprot.writeI64(this.type);
641
    oprot.writeI64(this.type);
642
    oprot.writeFieldEnd();
642
    oprot.writeFieldEnd();
643
    oprot.writeFieldBegin(TIME_SET_FIELD_DESC);
643
    oprot.writeFieldBegin(TIME_SET_FIELD_DESC);
Line 662... Line 662...
662
 
662
 
663
    sb.append("id:");
663
    sb.append("id:");
664
    sb.append(this.id);
664
    sb.append(this.id);
665
    first = false;
665
    first = false;
666
    if (!first) sb.append(", ");
666
    if (!first) sb.append(", ");
667
    sb.append("transaction_id:");
667
    sb.append("order_id:");
668
    sb.append(this.transaction_id);
668
    sb.append(this.order_id);
669
    first = false;
669
    first = false;
670
    if (!first) sb.append(", ");
670
    if (!first) sb.append(", ");
671
    sb.append("type:");
671
    sb.append("type:");
672
    sb.append(this.type);
672
    sb.append(this.type);
673
    first = false;
673
    first = false;