Subversion Repositories SmartDukaan

Rev

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

Rev 20818 Rev 21844
Line 27... Line 27...
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
  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);
-
 
32
  private static final org.apache.thrift.protocol.TField CONTACT_PERSON_FIELD_DESC = new org.apache.thrift.protocol.TField("contact_person", org.apache.thrift.protocol.TType.STRING, (short)7);
32
 
33
 
33
  private long id; // required
34
  private long id; // required
34
  private String address; // required
35
  private String address; // required
35
  private String pin; // required
36
  private String pin; // required
36
  private long state_id; // required
37
  private long state_id; // required
37
  private long created; // required
38
  private long created; // required
38
  private String contact_number; // required
39
  private String contact_number; // required
-
 
40
  private String contact_person; // required
39
 
41
 
40
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
42
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
41
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
43
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
42
    ID((short)1, "id"),
44
    ID((short)1, "id"),
43
    ADDRESS((short)2, "address"),
45
    ADDRESS((short)2, "address"),
44
    PIN((short)3, "pin"),
46
    PIN((short)3, "pin"),
45
    STATE_ID((short)4, "state_id"),
47
    STATE_ID((short)4, "state_id"),
46
    CREATED((short)5, "created"),
48
    CREATED((short)5, "created"),
47
    CONTACT_NUMBER((short)6, "contact_number");
49
    CONTACT_NUMBER((short)6, "contact_number"),
-
 
50
    CONTACT_PERSON((short)7, "contact_person");
48
 
51
 
49
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
52
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
50
 
53
 
51
    static {
54
    static {
52
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
55
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 69... Line 72...
69
          return STATE_ID;
72
          return STATE_ID;
70
        case 5: // CREATED
73
        case 5: // CREATED
71
          return CREATED;
74
          return CREATED;
72
        case 6: // CONTACT_NUMBER
75
        case 6: // CONTACT_NUMBER
73
          return CONTACT_NUMBER;
76
          return CONTACT_NUMBER;
-
 
77
        case 7: // CONTACT_PERSON
-
 
78
          return CONTACT_PERSON;
74
        default:
79
        default:
75
          return null;
80
          return null;
76
      }
81
      }
77
    }
82
    }
78
 
83
 
Line 129... Line 134...
129
        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)));
130
    tmpMap.put(_Fields.CREATED, new org.apache.thrift.meta_data.FieldMetaData("created", org.apache.thrift.TFieldRequirementType.DEFAULT, 
135
    tmpMap.put(_Fields.CREATED, new org.apache.thrift.meta_data.FieldMetaData("created", org.apache.thrift.TFieldRequirementType.DEFAULT, 
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
136
        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, 
137
    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)));
138
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
139
    tmpMap.put(_Fields.CONTACT_PERSON, new org.apache.thrift.meta_data.FieldMetaData("contact_person", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
140
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
134
    metaDataMap = Collections.unmodifiableMap(tmpMap);
141
    metaDataMap = Collections.unmodifiableMap(tmpMap);
135
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WarehouseAddress.class, metaDataMap);
142
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WarehouseAddress.class, metaDataMap);
136
  }
143
  }
137
 
144
 
138
  public WarehouseAddress() {
145
  public WarehouseAddress() {
Line 142... Line 149...
142
    long id,
149
    long id,
143
    String address,
150
    String address,
144
    String pin,
151
    String pin,
145
    long state_id,
152
    long state_id,
146
    long created,
153
    long created,
147
    String contact_number)
154
    String contact_number,
-
 
155
    String contact_person)
148
  {
156
  {
149
    this();
157
    this();
150
    this.id = id;
158
    this.id = id;
151
    setIdIsSet(true);
159
    setIdIsSet(true);
152
    this.address = address;
160
    this.address = address;
Line 154... Line 162...
154
    this.state_id = state_id;
162
    this.state_id = state_id;
155
    setState_idIsSet(true);
163
    setState_idIsSet(true);
156
    this.created = created;
164
    this.created = created;
157
    setCreatedIsSet(true);
165
    setCreatedIsSet(true);
158
    this.contact_number = contact_number;
166
    this.contact_number = contact_number;
-
 
167
    this.contact_person = contact_person;
159
  }
168
  }
160
 
169
 
161
  /**
170
  /**
162
   * Performs a deep copy on <i>other</i>.
171
   * Performs a deep copy on <i>other</i>.
163
   */
172
   */
Line 174... Line 183...
174
    this.state_id = other.state_id;
183
    this.state_id = other.state_id;
175
    this.created = other.created;
184
    this.created = other.created;
176
    if (other.isSetContact_number()) {
185
    if (other.isSetContact_number()) {
177
      this.contact_number = other.contact_number;
186
      this.contact_number = other.contact_number;
178
    }
187
    }
-
 
188
    if (other.isSetContact_person()) {
-
 
189
      this.contact_person = other.contact_person;
-
 
190
    }
179
  }
191
  }
180
 
192
 
181
  public WarehouseAddress deepCopy() {
193
  public WarehouseAddress deepCopy() {
182
    return new WarehouseAddress(this);
194
    return new WarehouseAddress(this);
183
  }
195
  }
Line 191... Line 203...
191
    setState_idIsSet(false);
203
    setState_idIsSet(false);
192
    this.state_id = 0;
204
    this.state_id = 0;
193
    setCreatedIsSet(false);
205
    setCreatedIsSet(false);
194
    this.created = 0;
206
    this.created = 0;
195
    this.contact_number = null;
207
    this.contact_number = null;
-
 
208
    this.contact_person = null;
196
  }
209
  }
197
 
210
 
198
  public long getId() {
211
  public long getId() {
199
    return this.id;
212
    return this.id;
200
  }
213
  }
Line 328... Line 341...
328
    if (!value) {
341
    if (!value) {
329
      this.contact_number = null;
342
      this.contact_number = null;
330
    }
343
    }
331
  }
344
  }
332
 
345
 
-
 
346
  public String getContact_person() {
-
 
347
    return this.contact_person;
-
 
348
  }
-
 
349
 
-
 
350
  public void setContact_person(String contact_person) {
-
 
351
    this.contact_person = contact_person;
-
 
352
  }
-
 
353
 
-
 
354
  public void unsetContact_person() {
-
 
355
    this.contact_person = null;
-
 
356
  }
-
 
357
 
-
 
358
  /** Returns true if field contact_person is set (has been assigned a value) and false otherwise */
-
 
359
  public boolean isSetContact_person() {
-
 
360
    return this.contact_person != null;
-
 
361
  }
-
 
362
 
-
 
363
  public void setContact_personIsSet(boolean value) {
-
 
364
    if (!value) {
-
 
365
      this.contact_person = null;
-
 
366
    }
-
 
367
  }
-
 
368
 
333
  public void setFieldValue(_Fields field, Object value) {
369
  public void setFieldValue(_Fields field, Object value) {
334
    switch (field) {
370
    switch (field) {
335
    case ID:
371
    case ID:
336
      if (value == null) {
372
      if (value == null) {
337
        unsetId();
373
        unsetId();
Line 378... Line 414...
378
      } else {
414
      } else {
379
        setContact_number((String)value);
415
        setContact_number((String)value);
380
      }
416
      }
381
      break;
417
      break;
382
 
418
 
-
 
419
    case CONTACT_PERSON:
-
 
420
      if (value == null) {
-
 
421
        unsetContact_person();
-
 
422
      } else {
-
 
423
        setContact_person((String)value);
-
 
424
      }
-
 
425
      break;
-
 
426
 
383
    }
427
    }
384
  }
428
  }
385
 
429
 
386
  public Object getFieldValue(_Fields field) {
430
  public Object getFieldValue(_Fields field) {
387
    switch (field) {
431
    switch (field) {
Line 401... Line 445...
401
      return Long.valueOf(getCreated());
445
      return Long.valueOf(getCreated());
402
 
446
 
403
    case CONTACT_NUMBER:
447
    case CONTACT_NUMBER:
404
      return getContact_number();
448
      return getContact_number();
405
 
449
 
-
 
450
    case CONTACT_PERSON:
-
 
451
      return getContact_person();
-
 
452
 
406
    }
453
    }
407
    throw new IllegalStateException();
454
    throw new IllegalStateException();
408
  }
455
  }
409
 
456
 
410
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
457
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 424... Line 471...
424
      return isSetState_id();
471
      return isSetState_id();
425
    case CREATED:
472
    case CREATED:
426
      return isSetCreated();
473
      return isSetCreated();
427
    case CONTACT_NUMBER:
474
    case CONTACT_NUMBER:
428
      return isSetContact_number();
475
      return isSetContact_number();
-
 
476
    case CONTACT_PERSON:
-
 
477
      return isSetContact_person();
429
    }
478
    }
430
    throw new IllegalStateException();
479
    throw new IllegalStateException();
431
  }
480
  }
432
 
481
 
433
  @Override
482
  @Override
Line 495... Line 544...
495
        return false;
544
        return false;
496
      if (!this.contact_number.equals(that.contact_number))
545
      if (!this.contact_number.equals(that.contact_number))
497
        return false;
546
        return false;
498
    }
547
    }
499
 
548
 
-
 
549
    boolean this_present_contact_person = true && this.isSetContact_person();
-
 
550
    boolean that_present_contact_person = true && that.isSetContact_person();
-
 
551
    if (this_present_contact_person || that_present_contact_person) {
-
 
552
      if (!(this_present_contact_person && that_present_contact_person))
-
 
553
        return false;
-
 
554
      if (!this.contact_person.equals(that.contact_person))
-
 
555
        return false;
-
 
556
    }
-
 
557
 
500
    return true;
558
    return true;
501
  }
559
  }
502
 
560
 
503
  @Override
561
  @Override
504
  public int hashCode() {
562
  public int hashCode() {
Line 571... Line 629...
571
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.contact_number, typedOther.contact_number);
629
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.contact_number, typedOther.contact_number);
572
      if (lastComparison != 0) {
630
      if (lastComparison != 0) {
573
        return lastComparison;
631
        return lastComparison;
574
      }
632
      }
575
    }
633
    }
-
 
634
    lastComparison = Boolean.valueOf(isSetContact_person()).compareTo(typedOther.isSetContact_person());
-
 
635
    if (lastComparison != 0) {
-
 
636
      return lastComparison;
-
 
637
    }
-
 
638
    if (isSetContact_person()) {
-
 
639
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.contact_person, typedOther.contact_person);
-
 
640
      if (lastComparison != 0) {
-
 
641
        return lastComparison;
-
 
642
      }
-
 
643
    }
576
    return 0;
644
    return 0;
577
  }
645
  }
578
 
646
 
579
  public _Fields fieldForId(int fieldId) {
647
  public _Fields fieldForId(int fieldId) {
580
    return _Fields.findByThriftId(fieldId);
648
    return _Fields.findByThriftId(fieldId);
Line 633... Line 701...
633
            this.contact_number = iprot.readString();
701
            this.contact_number = iprot.readString();
634
          } else { 
702
          } else { 
635
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
703
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
636
          }
704
          }
637
          break;
705
          break;
-
 
706
        case 7: // CONTACT_PERSON
-
 
707
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
708
            this.contact_person = iprot.readString();
-
 
709
          } else { 
-
 
710
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
711
          }
-
 
712
          break;
638
        default:
713
        default:
639
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
714
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
640
      }
715
      }
641
      iprot.readFieldEnd();
716
      iprot.readFieldEnd();
642
    }
717
    }
Line 670... Line 745...
670
    if (this.contact_number != null) {
745
    if (this.contact_number != null) {
671
      oprot.writeFieldBegin(CONTACT_NUMBER_FIELD_DESC);
746
      oprot.writeFieldBegin(CONTACT_NUMBER_FIELD_DESC);
672
      oprot.writeString(this.contact_number);
747
      oprot.writeString(this.contact_number);
673
      oprot.writeFieldEnd();
748
      oprot.writeFieldEnd();
674
    }
749
    }
-
 
750
    if (this.contact_person != null) {
-
 
751
      oprot.writeFieldBegin(CONTACT_PERSON_FIELD_DESC);
-
 
752
      oprot.writeString(this.contact_person);
-
 
753
      oprot.writeFieldEnd();
-
 
754
    }
675
    oprot.writeFieldStop();
755
    oprot.writeFieldStop();
676
    oprot.writeStructEnd();
756
    oprot.writeStructEnd();
677
  }
757
  }
678
 
758
 
679
  @Override
759
  @Override
Line 714... Line 794...
714
      sb.append("null");
794
      sb.append("null");
715
    } else {
795
    } else {
716
      sb.append(this.contact_number);
796
      sb.append(this.contact_number);
717
    }
797
    }
718
    first = false;
798
    first = false;
-
 
799
    if (!first) sb.append(", ");
-
 
800
    sb.append("contact_person:");
-
 
801
    if (this.contact_person == null) {
-
 
802
      sb.append("null");
-
 
803
    } else {
-
 
804
      sb.append(this.contact_person);
-
 
805
    }
-
 
806
    first = false;
719
    sb.append(")");
807
    sb.append(")");
720
    return sb.toString();
808
    return sb.toString();
721
  }
809
  }
722
 
810
 
723
  public void validate() throws org.apache.thrift.TException {
811
  public void validate() throws org.apache.thrift.TException {