Subversion Repositories SmartDukaan

Rev

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

Rev 19980 Rev 20818
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 ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("address", org.apache.thrift.protocol.TType.STRING, (short)2);
27
  private static final org.apache.thrift.protocol.TField ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("address", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField PIN_FIELD_DESC = new org.apache.thrift.protocol.TField("pin", org.apache.thrift.protocol.TType.STRING, (short)3);
28
  private static final org.apache.thrift.protocol.TField PIN_FIELD_DESC = new org.apache.thrift.protocol.TField("pin", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField STATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("state_id", org.apache.thrift.protocol.TType.I64, (short)4);
29
  private static final org.apache.thrift.protocol.TField STATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("state_id", org.apache.thrift.protocol.TType.I64, (short)4);
30
  private static final org.apache.thrift.protocol.TField CREATED_FIELD_DESC = new org.apache.thrift.protocol.TField("created", org.apache.thrift.protocol.TType.I64, (short)5);
30
  private static final org.apache.thrift.protocol.TField CREATED_FIELD_DESC = new org.apache.thrift.protocol.TField("created", org.apache.thrift.protocol.TType.I64, (short)5);
-
 
31
  private static final org.apache.thrift.protocol.TField CONTACT_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("contact_number", org.apache.thrift.protocol.TType.STRING, (short)6);
31
 
32
 
32
  private long id; // required
33
  private long id; // required
33
  private String address; // required
34
  private String address; // required
34
  private String pin; // required
35
  private String pin; // required
35
  private long state_id; // required
36
  private long state_id; // required
36
  private long created; // required
37
  private long created; // required
-
 
38
  private String contact_number; // 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
    ADDRESS((short)2, "address"),
43
    ADDRESS((short)2, "address"),
42
    PIN((short)3, "pin"),
44
    PIN((short)3, "pin"),
43
    STATE_ID((short)4, "state_id"),
45
    STATE_ID((short)4, "state_id"),
44
    CREATED((short)5, "created");
46
    CREATED((short)5, "created"),
-
 
47
    CONTACT_NUMBER((short)6, "contact_number");
45
 
48
 
46
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
49
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
47
 
50
 
48
    static {
51
    static {
49
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
52
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 64... Line 67...
64
          return PIN;
67
          return PIN;
65
        case 4: // STATE_ID
68
        case 4: // STATE_ID
66
          return STATE_ID;
69
          return STATE_ID;
67
        case 5: // CREATED
70
        case 5: // CREATED
68
          return CREATED;
71
          return CREATED;
-
 
72
        case 6: // CONTACT_NUMBER
-
 
73
          return CONTACT_NUMBER;
69
        default:
74
        default:
70
          return null;
75
          return null;
71
      }
76
      }
72
    }
77
    }
73
 
78
 
Line 122... Line 127...
122
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
127
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
123
    tmpMap.put(_Fields.STATE_ID, new org.apache.thrift.meta_data.FieldMetaData("state_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
128
    tmpMap.put(_Fields.STATE_ID, new org.apache.thrift.meta_data.FieldMetaData("state_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
124
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
129
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
125
    tmpMap.put(_Fields.CREATED, new org.apache.thrift.meta_data.FieldMetaData("created", org.apache.thrift.TFieldRequirementType.DEFAULT, 
130
    tmpMap.put(_Fields.CREATED, new org.apache.thrift.meta_data.FieldMetaData("created", org.apache.thrift.TFieldRequirementType.DEFAULT, 
126
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
132
    tmpMap.put(_Fields.CONTACT_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("contact_number", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
133
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
127
    metaDataMap = Collections.unmodifiableMap(tmpMap);
134
    metaDataMap = Collections.unmodifiableMap(tmpMap);
128
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WarehouseAddress.class, metaDataMap);
135
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WarehouseAddress.class, metaDataMap);
129
  }
136
  }
130
 
137
 
131
  public WarehouseAddress() {
138
  public WarehouseAddress() {
Line 134... Line 141...
134
  public WarehouseAddress(
141
  public WarehouseAddress(
135
    long id,
142
    long id,
136
    String address,
143
    String address,
137
    String pin,
144
    String pin,
138
    long state_id,
145
    long state_id,
139
    long created)
146
    long created,
-
 
147
    String contact_number)
140
  {
148
  {
141
    this();
149
    this();
142
    this.id = id;
150
    this.id = id;
143
    setIdIsSet(true);
151
    setIdIsSet(true);
144
    this.address = address;
152
    this.address = address;
145
    this.pin = pin;
153
    this.pin = pin;
146
    this.state_id = state_id;
154
    this.state_id = state_id;
147
    setState_idIsSet(true);
155
    setState_idIsSet(true);
148
    this.created = created;
156
    this.created = created;
149
    setCreatedIsSet(true);
157
    setCreatedIsSet(true);
-
 
158
    this.contact_number = contact_number;
150
  }
159
  }
151
 
160
 
152
  /**
161
  /**
153
   * Performs a deep copy on <i>other</i>.
162
   * Performs a deep copy on <i>other</i>.
154
   */
163
   */
Line 162... Line 171...
162
    if (other.isSetPin()) {
171
    if (other.isSetPin()) {
163
      this.pin = other.pin;
172
      this.pin = other.pin;
164
    }
173
    }
165
    this.state_id = other.state_id;
174
    this.state_id = other.state_id;
166
    this.created = other.created;
175
    this.created = other.created;
-
 
176
    if (other.isSetContact_number()) {
-
 
177
      this.contact_number = other.contact_number;
-
 
178
    }
167
  }
179
  }
168
 
180
 
169
  public WarehouseAddress deepCopy() {
181
  public WarehouseAddress deepCopy() {
170
    return new WarehouseAddress(this);
182
    return new WarehouseAddress(this);
171
  }
183
  }
Line 178... Line 190...
178
    this.pin = null;
190
    this.pin = null;
179
    setState_idIsSet(false);
191
    setState_idIsSet(false);
180
    this.state_id = 0;
192
    this.state_id = 0;
181
    setCreatedIsSet(false);
193
    setCreatedIsSet(false);
182
    this.created = 0;
194
    this.created = 0;
-
 
195
    this.contact_number = null;
183
  }
196
  }
184
 
197
 
185
  public long getId() {
198
  public long getId() {
186
    return this.id;
199
    return this.id;
187
  }
200
  }
Line 292... Line 305...
292
 
305
 
293
  public void setCreatedIsSet(boolean value) {
306
  public void setCreatedIsSet(boolean value) {
294
    __isset_bit_vector.set(__CREATED_ISSET_ID, value);
307
    __isset_bit_vector.set(__CREATED_ISSET_ID, value);
295
  }
308
  }
296
 
309
 
-
 
310
  public String getContact_number() {
-
 
311
    return this.contact_number;
-
 
312
  }
-
 
313
 
-
 
314
  public void setContact_number(String contact_number) {
-
 
315
    this.contact_number = contact_number;
-
 
316
  }
-
 
317
 
-
 
318
  public void unsetContact_number() {
-
 
319
    this.contact_number = null;
-
 
320
  }
-
 
321
 
-
 
322
  /** Returns true if field contact_number is set (has been assigned a value) and false otherwise */
-
 
323
  public boolean isSetContact_number() {
-
 
324
    return this.contact_number != null;
-
 
325
  }
-
 
326
 
-
 
327
  public void setContact_numberIsSet(boolean value) {
-
 
328
    if (!value) {
-
 
329
      this.contact_number = null;
-
 
330
    }
-
 
331
  }
-
 
332
 
297
  public void setFieldValue(_Fields field, Object value) {
333
  public void setFieldValue(_Fields field, Object value) {
298
    switch (field) {
334
    switch (field) {
299
    case ID:
335
    case ID:
300
      if (value == null) {
336
      if (value == null) {
301
        unsetId();
337
        unsetId();
Line 334... Line 370...
334
      } else {
370
      } else {
335
        setCreated((Long)value);
371
        setCreated((Long)value);
336
      }
372
      }
337
      break;
373
      break;
338
 
374
 
-
 
375
    case CONTACT_NUMBER:
-
 
376
      if (value == null) {
-
 
377
        unsetContact_number();
-
 
378
      } else {
-
 
379
        setContact_number((String)value);
-
 
380
      }
-
 
381
      break;
-
 
382
 
339
    }
383
    }
340
  }
384
  }
341
 
385
 
342
  public Object getFieldValue(_Fields field) {
386
  public Object getFieldValue(_Fields field) {
343
    switch (field) {
387
    switch (field) {
Line 354... Line 398...
354
      return Long.valueOf(getState_id());
398
      return Long.valueOf(getState_id());
355
 
399
 
356
    case CREATED:
400
    case CREATED:
357
      return Long.valueOf(getCreated());
401
      return Long.valueOf(getCreated());
358
 
402
 
-
 
403
    case CONTACT_NUMBER:
-
 
404
      return getContact_number();
-
 
405
 
359
    }
406
    }
360
    throw new IllegalStateException();
407
    throw new IllegalStateException();
361
  }
408
  }
362
 
409
 
363
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
410
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 375... Line 422...
375
      return isSetPin();
422
      return isSetPin();
376
    case STATE_ID:
423
    case STATE_ID:
377
      return isSetState_id();
424
      return isSetState_id();
378
    case CREATED:
425
    case CREATED:
379
      return isSetCreated();
426
      return isSetCreated();
-
 
427
    case CONTACT_NUMBER:
-
 
428
      return isSetContact_number();
380
    }
429
    }
381
    throw new IllegalStateException();
430
    throw new IllegalStateException();
382
  }
431
  }
383
 
432
 
384
  @Override
433
  @Override
Line 437... Line 486...
437
        return false;
486
        return false;
438
      if (this.created != that.created)
487
      if (this.created != that.created)
439
        return false;
488
        return false;
440
    }
489
    }
441
 
490
 
-
 
491
    boolean this_present_contact_number = true && this.isSetContact_number();
-
 
492
    boolean that_present_contact_number = true && that.isSetContact_number();
-
 
493
    if (this_present_contact_number || that_present_contact_number) {
-
 
494
      if (!(this_present_contact_number && that_present_contact_number))
-
 
495
        return false;
-
 
496
      if (!this.contact_number.equals(that.contact_number))
-
 
497
        return false;
-
 
498
    }
-
 
499
 
442
    return true;
500
    return true;
443
  }
501
  }
444
 
502
 
445
  @Override
503
  @Override
446
  public int hashCode() {
504
  public int hashCode() {
Line 503... Line 561...
503
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.created, typedOther.created);
561
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.created, typedOther.created);
504
      if (lastComparison != 0) {
562
      if (lastComparison != 0) {
505
        return lastComparison;
563
        return lastComparison;
506
      }
564
      }
507
    }
565
    }
-
 
566
    lastComparison = Boolean.valueOf(isSetContact_number()).compareTo(typedOther.isSetContact_number());
-
 
567
    if (lastComparison != 0) {
-
 
568
      return lastComparison;
-
 
569
    }
-
 
570
    if (isSetContact_number()) {
-
 
571
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.contact_number, typedOther.contact_number);
-
 
572
      if (lastComparison != 0) {
-
 
573
        return lastComparison;
-
 
574
      }
-
 
575
    }
508
    return 0;
576
    return 0;
509
  }
577
  }
510
 
578
 
511
  public _Fields fieldForId(int fieldId) {
579
  public _Fields fieldForId(int fieldId) {
512
    return _Fields.findByThriftId(fieldId);
580
    return _Fields.findByThriftId(fieldId);
Line 558... Line 626...
558
            setCreatedIsSet(true);
626
            setCreatedIsSet(true);
559
          } else { 
627
          } else { 
560
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
628
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
561
          }
629
          }
562
          break;
630
          break;
-
 
631
        case 6: // CONTACT_NUMBER
-
 
632
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
633
            this.contact_number = iprot.readString();
-
 
634
          } else { 
-
 
635
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
636
          }
-
 
637
          break;
563
        default:
638
        default:
564
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
639
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
565
      }
640
      }
566
      iprot.readFieldEnd();
641
      iprot.readFieldEnd();
567
    }
642
    }
Line 590... Line 665...
590
    oprot.writeI64(this.state_id);
665
    oprot.writeI64(this.state_id);
591
    oprot.writeFieldEnd();
666
    oprot.writeFieldEnd();
592
    oprot.writeFieldBegin(CREATED_FIELD_DESC);
667
    oprot.writeFieldBegin(CREATED_FIELD_DESC);
593
    oprot.writeI64(this.created);
668
    oprot.writeI64(this.created);
594
    oprot.writeFieldEnd();
669
    oprot.writeFieldEnd();
-
 
670
    if (this.contact_number != null) {
-
 
671
      oprot.writeFieldBegin(CONTACT_NUMBER_FIELD_DESC);
-
 
672
      oprot.writeString(this.contact_number);
-
 
673
      oprot.writeFieldEnd();
-
 
674
    }
595
    oprot.writeFieldStop();
675
    oprot.writeFieldStop();
596
    oprot.writeStructEnd();
676
    oprot.writeStructEnd();
597
  }
677
  }
598
 
678
 
599
  @Override
679
  @Override
Line 626... Line 706...
626
    first = false;
706
    first = false;
627
    if (!first) sb.append(", ");
707
    if (!first) sb.append(", ");
628
    sb.append("created:");
708
    sb.append("created:");
629
    sb.append(this.created);
709
    sb.append(this.created);
630
    first = false;
710
    first = false;
-
 
711
    if (!first) sb.append(", ");
-
 
712
    sb.append("contact_number:");
-
 
713
    if (this.contact_number == null) {
-
 
714
      sb.append("null");
-
 
715
    } else {
-
 
716
      sb.append(this.contact_number);
-
 
717
    }
-
 
718
    first = false;
631
    sb.append(")");
719
    sb.append(")");
632
    return sb.toString();
720
    return sb.toString();
633
  }
721
  }
634
 
722
 
635
  public void validate() throws org.apache.thrift.TException {
723
  public void validate() throws org.apache.thrift.TException {