Subversion Repositories SmartDukaan

Rev

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

Rev 1013 Rev 1329
Line 34... Line 34...
34
  private static final TField LAST_CHECKED_ON_FIELD_DESC = new TField("lastCheckedOn", TType.I64, (short)6);
34
  private static final TField LAST_CHECKED_ON_FIELD_DESC = new TField("lastCheckedOn", TType.I64, (short)6);
35
  private static final TField TIN_NUMBER_FIELD_DESC = new TField("tinNumber", TType.STRING, (short)7);
35
  private static final TField TIN_NUMBER_FIELD_DESC = new TField("tinNumber", TType.STRING, (short)7);
36
  private static final TField PINCODE_FIELD_DESC = new TField("pincode", TType.STRING, (short)8);
36
  private static final TField PINCODE_FIELD_DESC = new TField("pincode", TType.STRING, (short)8);
37
  private static final TField VENDOR_STRING_FIELD_DESC = new TField("vendorString", TType.STRING, (short)9);
37
  private static final TField VENDOR_STRING_FIELD_DESC = new TField("vendorString", TType.STRING, (short)9);
38
  private static final TField LOGISTICS_LOCATION_FIELD_DESC = new TField("logisticsLocation", TType.I32, (short)10);
38
  private static final TField LOGISTICS_LOCATION_FIELD_DESC = new TField("logisticsLocation", TType.I32, (short)10);
-
 
39
  private static final TField VENDOR_FIELD_DESC = new TField("vendor", TType.STRING, (short)11);
39
 
40
 
40
  private long id;
41
  private long id;
41
  private String displayName;
42
  private String displayName;
42
  private String location;
43
  private String location;
43
  private status warehouseStatus;
44
  private status warehouseStatus;
Line 45... Line 46...
45
  private long lastCheckedOn;
46
  private long lastCheckedOn;
46
  private String tinNumber;
47
  private String tinNumber;
47
  private String pincode;
48
  private String pincode;
48
  private String vendorString;
49
  private String vendorString;
49
  private WarehouseLocation logisticsLocation;
50
  private WarehouseLocation logisticsLocation;
-
 
51
  private String vendor;
50
 
52
 
51
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
53
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
52
  public enum _Fields implements TFieldIdEnum {
54
  public enum _Fields implements TFieldIdEnum {
53
    ID((short)1, "id"),
55
    ID((short)1, "id"),
54
    DISPLAY_NAME((short)2, "displayName"),
56
    DISPLAY_NAME((short)2, "displayName"),
Line 65... Line 67...
65
    VENDOR_STRING((short)9, "vendorString"),
67
    VENDOR_STRING((short)9, "vendorString"),
66
    /**
68
    /**
67
     * 
69
     * 
68
     * @see WarehouseLocation
70
     * @see WarehouseLocation
69
     */
71
     */
70
    LOGISTICS_LOCATION((short)10, "logisticsLocation");
72
    LOGISTICS_LOCATION((short)10, "logisticsLocation"),
-
 
73
    VENDOR((short)11, "vendor");
71
 
74
 
72
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
75
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
73
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
76
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
74
 
77
 
75
    static {
78
    static {
Line 145... Line 148...
145
        new FieldValueMetaData(TType.STRING)));
148
        new FieldValueMetaData(TType.STRING)));
146
    put(_Fields.VENDOR_STRING, new FieldMetaData("vendorString", TFieldRequirementType.DEFAULT, 
149
    put(_Fields.VENDOR_STRING, new FieldMetaData("vendorString", TFieldRequirementType.DEFAULT, 
147
        new FieldValueMetaData(TType.STRING)));
150
        new FieldValueMetaData(TType.STRING)));
148
    put(_Fields.LOGISTICS_LOCATION, new FieldMetaData("logisticsLocation", TFieldRequirementType.DEFAULT, 
151
    put(_Fields.LOGISTICS_LOCATION, new FieldMetaData("logisticsLocation", TFieldRequirementType.DEFAULT, 
149
        new EnumMetaData(TType.ENUM, WarehouseLocation.class)));
152
        new EnumMetaData(TType.ENUM, WarehouseLocation.class)));
-
 
153
    put(_Fields.VENDOR, new FieldMetaData("vendor", TFieldRequirementType.DEFAULT, 
-
 
154
        new FieldValueMetaData(TType.STRING)));
150
  }});
155
  }});
151
 
156
 
152
  static {
157
  static {
153
    FieldMetaData.addStructMetaDataMap(Warehouse.class, metaDataMap);
158
    FieldMetaData.addStructMetaDataMap(Warehouse.class, metaDataMap);
154
  }
159
  }
Line 164... Line 169...
164
    long addedOn,
169
    long addedOn,
165
    long lastCheckedOn,
170
    long lastCheckedOn,
166
    String tinNumber,
171
    String tinNumber,
167
    String pincode,
172
    String pincode,
168
    String vendorString,
173
    String vendorString,
169
    WarehouseLocation logisticsLocation)
174
    WarehouseLocation logisticsLocation,
-
 
175
    String vendor)
170
  {
176
  {
171
    this();
177
    this();
172
    this.id = id;
178
    this.id = id;
173
    setIdIsSet(true);
179
    setIdIsSet(true);
174
    this.displayName = displayName;
180
    this.displayName = displayName;
Line 180... Line 186...
180
    setLastCheckedOnIsSet(true);
186
    setLastCheckedOnIsSet(true);
181
    this.tinNumber = tinNumber;
187
    this.tinNumber = tinNumber;
182
    this.pincode = pincode;
188
    this.pincode = pincode;
183
    this.vendorString = vendorString;
189
    this.vendorString = vendorString;
184
    this.logisticsLocation = logisticsLocation;
190
    this.logisticsLocation = logisticsLocation;
-
 
191
    this.vendor = vendor;
185
  }
192
  }
186
 
193
 
187
  /**
194
  /**
188
   * Performs a deep copy on <i>other</i>.
195
   * Performs a deep copy on <i>other</i>.
189
   */
196
   */
Line 212... Line 219...
212
      this.vendorString = other.vendorString;
219
      this.vendorString = other.vendorString;
213
    }
220
    }
214
    if (other.isSetLogisticsLocation()) {
221
    if (other.isSetLogisticsLocation()) {
215
      this.logisticsLocation = other.logisticsLocation;
222
      this.logisticsLocation = other.logisticsLocation;
216
    }
223
    }
-
 
224
    if (other.isSetVendor()) {
-
 
225
      this.vendor = other.vendor;
-
 
226
    }
217
  }
227
  }
218
 
228
 
219
  public Warehouse deepCopy() {
229
  public Warehouse deepCopy() {
220
    return new Warehouse(this);
230
    return new Warehouse(this);
221
  }
231
  }
Line 476... Line 486...
476
    if (!value) {
486
    if (!value) {
477
      this.logisticsLocation = null;
487
      this.logisticsLocation = null;
478
    }
488
    }
479
  }
489
  }
480
 
490
 
-
 
491
  public String getVendor() {
-
 
492
    return this.vendor;
-
 
493
  }
-
 
494
 
-
 
495
  public Warehouse setVendor(String vendor) {
-
 
496
    this.vendor = vendor;
-
 
497
    return this;
-
 
498
  }
-
 
499
 
-
 
500
  public void unsetVendor() {
-
 
501
    this.vendor = null;
-
 
502
  }
-
 
503
 
-
 
504
  /** Returns true if field vendor is set (has been asigned a value) and false otherwise */
-
 
505
  public boolean isSetVendor() {
-
 
506
    return this.vendor != null;
-
 
507
  }
-
 
508
 
-
 
509
  public void setVendorIsSet(boolean value) {
-
 
510
    if (!value) {
-
 
511
      this.vendor = null;
-
 
512
    }
-
 
513
  }
-
 
514
 
481
  public void setFieldValue(_Fields field, Object value) {
515
  public void setFieldValue(_Fields field, Object value) {
482
    switch (field) {
516
    switch (field) {
483
    case ID:
517
    case ID:
484
      if (value == null) {
518
      if (value == null) {
485
        unsetId();
519
        unsetId();
Line 558... Line 592...
558
      } else {
592
      } else {
559
        setLogisticsLocation((WarehouseLocation)value);
593
        setLogisticsLocation((WarehouseLocation)value);
560
      }
594
      }
561
      break;
595
      break;
562
 
596
 
-
 
597
    case VENDOR:
-
 
598
      if (value == null) {
-
 
599
        unsetVendor();
-
 
600
      } else {
-
 
601
        setVendor((String)value);
-
 
602
      }
-
 
603
      break;
-
 
604
 
563
    }
605
    }
564
  }
606
  }
565
 
607
 
566
  public void setFieldValue(int fieldID, Object value) {
608
  public void setFieldValue(int fieldID, Object value) {
567
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
609
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 597... Line 639...
597
      return getVendorString();
639
      return getVendorString();
598
 
640
 
599
    case LOGISTICS_LOCATION:
641
    case LOGISTICS_LOCATION:
600
      return getLogisticsLocation();
642
      return getLogisticsLocation();
601
 
643
 
-
 
644
    case VENDOR:
-
 
645
      return getVendor();
-
 
646
 
602
    }
647
    }
603
    throw new IllegalStateException();
648
    throw new IllegalStateException();
604
  }
649
  }
605
 
650
 
606
  public Object getFieldValue(int fieldId) {
651
  public Object getFieldValue(int fieldId) {
Line 628... Line 673...
628
      return isSetPincode();
673
      return isSetPincode();
629
    case VENDOR_STRING:
674
    case VENDOR_STRING:
630
      return isSetVendorString();
675
      return isSetVendorString();
631
    case LOGISTICS_LOCATION:
676
    case LOGISTICS_LOCATION:
632
      return isSetLogisticsLocation();
677
      return isSetLogisticsLocation();
-
 
678
    case VENDOR:
-
 
679
      return isSetVendor();
633
    }
680
    }
634
    throw new IllegalStateException();
681
    throw new IllegalStateException();
635
  }
682
  }
636
 
683
 
637
  public boolean isSet(int fieldID) {
684
  public boolean isSet(int fieldID) {
Line 739... Line 786...
739
        return false;
786
        return false;
740
      if (!this.logisticsLocation.equals(that.logisticsLocation))
787
      if (!this.logisticsLocation.equals(that.logisticsLocation))
741
        return false;
788
        return false;
742
    }
789
    }
743
 
790
 
-
 
791
    boolean this_present_vendor = true && this.isSetVendor();
-
 
792
    boolean that_present_vendor = true && that.isSetVendor();
-
 
793
    if (this_present_vendor || that_present_vendor) {
-
 
794
      if (!(this_present_vendor && that_present_vendor))
-
 
795
        return false;
-
 
796
      if (!this.vendor.equals(that.vendor))
-
 
797
        return false;
-
 
798
    }
-
 
799
 
744
    return true;
800
    return true;
745
  }
801
  }
746
 
802
 
747
  @Override
803
  @Override
748
  public int hashCode() {
804
  public int hashCode() {
Line 835... Line 891...
835
    }
891
    }
836
    lastComparison = TBaseHelper.compareTo(logisticsLocation, typedOther.logisticsLocation);
892
    lastComparison = TBaseHelper.compareTo(logisticsLocation, typedOther.logisticsLocation);
837
    if (lastComparison != 0) {
893
    if (lastComparison != 0) {
838
      return lastComparison;
894
      return lastComparison;
839
    }
895
    }
-
 
896
    lastComparison = Boolean.valueOf(isSetVendor()).compareTo(isSetVendor());
-
 
897
    if (lastComparison != 0) {
-
 
898
      return lastComparison;
-
 
899
    }
-
 
900
    lastComparison = TBaseHelper.compareTo(vendor, typedOther.vendor);
-
 
901
    if (lastComparison != 0) {
-
 
902
      return lastComparison;
-
 
903
    }
840
    return 0;
904
    return 0;
841
  }
905
  }
842
 
906
 
843
  public void read(TProtocol iprot) throws TException {
907
  public void read(TProtocol iprot) throws TException {
844
    TField field;
908
    TField field;
Line 925... Line 989...
925
              this.logisticsLocation = WarehouseLocation.findByValue(iprot.readI32());
989
              this.logisticsLocation = WarehouseLocation.findByValue(iprot.readI32());
926
            } else { 
990
            } else { 
927
              TProtocolUtil.skip(iprot, field.type);
991
              TProtocolUtil.skip(iprot, field.type);
928
            }
992
            }
929
            break;
993
            break;
-
 
994
          case VENDOR:
-
 
995
            if (field.type == TType.STRING) {
-
 
996
              this.vendor = iprot.readString();
-
 
997
            } else { 
-
 
998
              TProtocolUtil.skip(iprot, field.type);
-
 
999
            }
-
 
1000
            break;
930
        }
1001
        }
931
        iprot.readFieldEnd();
1002
        iprot.readFieldEnd();
932
      }
1003
      }
933
    }
1004
    }
934
    iprot.readStructEnd();
1005
    iprot.readStructEnd();
Line 981... Line 1052...
981
    if (this.logisticsLocation != null) {
1052
    if (this.logisticsLocation != null) {
982
      oprot.writeFieldBegin(LOGISTICS_LOCATION_FIELD_DESC);
1053
      oprot.writeFieldBegin(LOGISTICS_LOCATION_FIELD_DESC);
983
      oprot.writeI32(this.logisticsLocation.getValue());
1054
      oprot.writeI32(this.logisticsLocation.getValue());
984
      oprot.writeFieldEnd();
1055
      oprot.writeFieldEnd();
985
    }
1056
    }
-
 
1057
    if (this.vendor != null) {
-
 
1058
      oprot.writeFieldBegin(VENDOR_FIELD_DESC);
-
 
1059
      oprot.writeString(this.vendor);
-
 
1060
      oprot.writeFieldEnd();
-
 
1061
    }
986
    oprot.writeFieldStop();
1062
    oprot.writeFieldStop();
987
    oprot.writeStructEnd();
1063
    oprot.writeStructEnd();
988
  }
1064
  }
989
 
1065
 
990
  @Override
1066
  @Override
Line 1073... Line 1149...
1073
      if (logisticsLocation_name != null) {
1149
      if (logisticsLocation_name != null) {
1074
        sb.append(")");
1150
        sb.append(")");
1075
      }
1151
      }
1076
    }
1152
    }
1077
    first = false;
1153
    first = false;
-
 
1154
    if (!first) sb.append(", ");
-
 
1155
    sb.append("vendor:");
-
 
1156
    if (this.vendor == null) {
-
 
1157
      sb.append("null");
-
 
1158
    } else {
-
 
1159
      sb.append(this.vendor);
-
 
1160
    }
-
 
1161
    first = false;
1078
    sb.append(")");
1162
    sb.append(")");
1079
    return sb.toString();
1163
    return sb.toString();
1080
  }
1164
  }
1081
 
1165
 
1082
  public void validate() throws TException {
1166
  public void validate() throws TException {