Subversion Repositories SmartDukaan

Rev

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

Rev 2824 Rev 2841
Line 36... Line 36...
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
  private static final TField VENDOR_FIELD_DESC = new TField("vendor", TType.STRING, (short)11);
40
  private static final TField VENDOR_ID_FIELD_DESC = new TField("vendorId", TType.I64, (short)12);
40
  private static final TField VENDOR_ID_FIELD_DESC = new TField("vendorId", TType.I64, (short)12);
-
 
41
  private static final TField BILLING_TYPE_FIELD_DESC = new TField("billingType", TType.I32, (short)13);
41
 
42
 
42
  private long id;
43
  private long id;
43
  private String displayName;
44
  private String displayName;
44
  private String location;
45
  private String location;
45
  private status warehouseStatus;
46
  private status warehouseStatus;
Line 49... Line 50...
49
  private String pincode;
50
  private String pincode;
50
  private String vendorString;
51
  private String vendorString;
51
  private WarehouseLocation logisticsLocation;
52
  private WarehouseLocation logisticsLocation;
52
  private String vendor;
53
  private String vendor;
53
  private long vendorId;
54
  private long vendorId;
-
 
55
  private BillingType billingType;
54
 
56
 
55
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
57
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
56
  public enum _Fields implements TFieldIdEnum {
58
  public enum _Fields implements TFieldIdEnum {
57
    ID((short)1, "id"),
59
    ID((short)1, "id"),
58
    DISPLAY_NAME((short)2, "displayName"),
60
    DISPLAY_NAME((short)2, "displayName"),
Line 71... Line 73...
71
     * 
73
     * 
72
     * @see WarehouseLocation
74
     * @see WarehouseLocation
73
     */
75
     */
74
    LOGISTICS_LOCATION((short)10, "logisticsLocation"),
76
    LOGISTICS_LOCATION((short)10, "logisticsLocation"),
75
    VENDOR((short)11, "vendor"),
77
    VENDOR((short)11, "vendor"),
76
    VENDOR_ID((short)12, "vendorId");
78
    VENDOR_ID((short)12, "vendorId"),
-
 
79
    /**
-
 
80
     * 
-
 
81
     * @see BillingType
-
 
82
     */
-
 
83
    BILLING_TYPE((short)13, "billingType");
77
 
84
 
78
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
85
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
79
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
86
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
80
 
87
 
81
    static {
88
    static {
Line 156... Line 163...
156
        new EnumMetaData(TType.ENUM, WarehouseLocation.class)));
163
        new EnumMetaData(TType.ENUM, WarehouseLocation.class)));
157
    put(_Fields.VENDOR, new FieldMetaData("vendor", TFieldRequirementType.DEFAULT, 
164
    put(_Fields.VENDOR, new FieldMetaData("vendor", TFieldRequirementType.DEFAULT, 
158
        new FieldValueMetaData(TType.STRING)));
165
        new FieldValueMetaData(TType.STRING)));
159
    put(_Fields.VENDOR_ID, new FieldMetaData("vendorId", TFieldRequirementType.DEFAULT, 
166
    put(_Fields.VENDOR_ID, new FieldMetaData("vendorId", TFieldRequirementType.DEFAULT, 
160
        new FieldValueMetaData(TType.I64)));
167
        new FieldValueMetaData(TType.I64)));
-
 
168
    put(_Fields.BILLING_TYPE, new FieldMetaData("billingType", TFieldRequirementType.DEFAULT, 
-
 
169
        new EnumMetaData(TType.ENUM, BillingType.class)));
161
  }});
170
  }});
162
 
171
 
163
  static {
172
  static {
164
    FieldMetaData.addStructMetaDataMap(Warehouse.class, metaDataMap);
173
    FieldMetaData.addStructMetaDataMap(Warehouse.class, metaDataMap);
165
  }
174
  }
Line 177... Line 186...
177
    String tinNumber,
186
    String tinNumber,
178
    String pincode,
187
    String pincode,
179
    String vendorString,
188
    String vendorString,
180
    WarehouseLocation logisticsLocation,
189
    WarehouseLocation logisticsLocation,
181
    String vendor,
190
    String vendor,
182
    long vendorId)
191
    long vendorId,
-
 
192
    BillingType billingType)
183
  {
193
  {
184
    this();
194
    this();
185
    this.id = id;
195
    this.id = id;
186
    setIdIsSet(true);
196
    setIdIsSet(true);
187
    this.displayName = displayName;
197
    this.displayName = displayName;
Line 196... Line 206...
196
    this.vendorString = vendorString;
206
    this.vendorString = vendorString;
197
    this.logisticsLocation = logisticsLocation;
207
    this.logisticsLocation = logisticsLocation;
198
    this.vendor = vendor;
208
    this.vendor = vendor;
199
    this.vendorId = vendorId;
209
    this.vendorId = vendorId;
200
    setVendorIdIsSet(true);
210
    setVendorIdIsSet(true);
-
 
211
    this.billingType = billingType;
201
  }
212
  }
202
 
213
 
203
  /**
214
  /**
204
   * Performs a deep copy on <i>other</i>.
215
   * Performs a deep copy on <i>other</i>.
205
   */
216
   */
Line 232... Line 243...
232
    }
243
    }
233
    if (other.isSetVendor()) {
244
    if (other.isSetVendor()) {
234
      this.vendor = other.vendor;
245
      this.vendor = other.vendor;
235
    }
246
    }
236
    this.vendorId = other.vendorId;
247
    this.vendorId = other.vendorId;
-
 
248
    if (other.isSetBillingType()) {
-
 
249
      this.billingType = other.billingType;
-
 
250
    }
237
  }
251
  }
238
 
252
 
239
  public Warehouse deepCopy() {
253
  public Warehouse deepCopy() {
240
    return new Warehouse(this);
254
    return new Warehouse(this);
241
  }
255
  }
Line 543... Line 557...
543
 
557
 
544
  public void setVendorIdIsSet(boolean value) {
558
  public void setVendorIdIsSet(boolean value) {
545
    __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
559
    __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
546
  }
560
  }
547
 
561
 
-
 
562
  /**
-
 
563
   * 
-
 
564
   * @see BillingType
-
 
565
   */
-
 
566
  public BillingType getBillingType() {
-
 
567
    return this.billingType;
-
 
568
  }
-
 
569
 
-
 
570
  /**
-
 
571
   * 
-
 
572
   * @see BillingType
-
 
573
   */
-
 
574
  public Warehouse setBillingType(BillingType billingType) {
-
 
575
    this.billingType = billingType;
-
 
576
    return this;
-
 
577
  }
-
 
578
 
-
 
579
  public void unsetBillingType() {
-
 
580
    this.billingType = null;
-
 
581
  }
-
 
582
 
-
 
583
  /** Returns true if field billingType is set (has been asigned a value) and false otherwise */
-
 
584
  public boolean isSetBillingType() {
-
 
585
    return this.billingType != null;
-
 
586
  }
-
 
587
 
-
 
588
  public void setBillingTypeIsSet(boolean value) {
-
 
589
    if (!value) {
-
 
590
      this.billingType = null;
-
 
591
    }
-
 
592
  }
-
 
593
 
548
  public void setFieldValue(_Fields field, Object value) {
594
  public void setFieldValue(_Fields field, Object value) {
549
    switch (field) {
595
    switch (field) {
550
    case ID:
596
    case ID:
551
      if (value == null) {
597
      if (value == null) {
552
        unsetId();
598
        unsetId();
Line 641... Line 687...
641
      } else {
687
      } else {
642
        setVendorId((Long)value);
688
        setVendorId((Long)value);
643
      }
689
      }
644
      break;
690
      break;
645
 
691
 
-
 
692
    case BILLING_TYPE:
-
 
693
      if (value == null) {
-
 
694
        unsetBillingType();
-
 
695
      } else {
-
 
696
        setBillingType((BillingType)value);
-
 
697
      }
-
 
698
      break;
-
 
699
 
646
    }
700
    }
647
  }
701
  }
648
 
702
 
649
  public void setFieldValue(int fieldID, Object value) {
703
  public void setFieldValue(int fieldID, Object value) {
650
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
704
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
Line 686... Line 740...
686
      return getVendor();
740
      return getVendor();
687
 
741
 
688
    case VENDOR_ID:
742
    case VENDOR_ID:
689
      return new Long(getVendorId());
743
      return new Long(getVendorId());
690
 
744
 
-
 
745
    case BILLING_TYPE:
-
 
746
      return getBillingType();
-
 
747
 
691
    }
748
    }
692
    throw new IllegalStateException();
749
    throw new IllegalStateException();
693
  }
750
  }
694
 
751
 
695
  public Object getFieldValue(int fieldId) {
752
  public Object getFieldValue(int fieldId) {
Line 721... Line 778...
721
      return isSetLogisticsLocation();
778
      return isSetLogisticsLocation();
722
    case VENDOR:
779
    case VENDOR:
723
      return isSetVendor();
780
      return isSetVendor();
724
    case VENDOR_ID:
781
    case VENDOR_ID:
725
      return isSetVendorId();
782
      return isSetVendorId();
-
 
783
    case BILLING_TYPE:
-
 
784
      return isSetBillingType();
726
    }
785
    }
727
    throw new IllegalStateException();
786
    throw new IllegalStateException();
728
  }
787
  }
729
 
788
 
730
  public boolean isSet(int fieldID) {
789
  public boolean isSet(int fieldID) {
Line 850... Line 909...
850
        return false;
909
        return false;
851
      if (this.vendorId != that.vendorId)
910
      if (this.vendorId != that.vendorId)
852
        return false;
911
        return false;
853
    }
912
    }
854
 
913
 
-
 
914
    boolean this_present_billingType = true && this.isSetBillingType();
-
 
915
    boolean that_present_billingType = true && that.isSetBillingType();
-
 
916
    if (this_present_billingType || that_present_billingType) {
-
 
917
      if (!(this_present_billingType && that_present_billingType))
-
 
918
        return false;
-
 
919
      if (!this.billingType.equals(that.billingType))
-
 
920
        return false;
-
 
921
    }
-
 
922
 
855
    return true;
923
    return true;
856
  }
924
  }
857
 
925
 
858
  @Override
926
  @Override
859
  public int hashCode() {
927
  public int hashCode() {
Line 962... Line 1030...
962
    }
1030
    }
963
    lastComparison = TBaseHelper.compareTo(vendorId, typedOther.vendorId);
1031
    lastComparison = TBaseHelper.compareTo(vendorId, typedOther.vendorId);
964
    if (lastComparison != 0) {
1032
    if (lastComparison != 0) {
965
      return lastComparison;
1033
      return lastComparison;
966
    }
1034
    }
-
 
1035
    lastComparison = Boolean.valueOf(isSetBillingType()).compareTo(isSetBillingType());
-
 
1036
    if (lastComparison != 0) {
-
 
1037
      return lastComparison;
-
 
1038
    }
-
 
1039
    lastComparison = TBaseHelper.compareTo(billingType, typedOther.billingType);
-
 
1040
    if (lastComparison != 0) {
-
 
1041
      return lastComparison;
-
 
1042
    }
967
    return 0;
1043
    return 0;
968
  }
1044
  }
969
 
1045
 
970
  public void read(TProtocol iprot) throws TException {
1046
  public void read(TProtocol iprot) throws TException {
971
    TField field;
1047
    TField field;
Line 1067... Line 1143...
1067
              setVendorIdIsSet(true);
1143
              setVendorIdIsSet(true);
1068
            } else { 
1144
            } else { 
1069
              TProtocolUtil.skip(iprot, field.type);
1145
              TProtocolUtil.skip(iprot, field.type);
1070
            }
1146
            }
1071
            break;
1147
            break;
-
 
1148
          case BILLING_TYPE:
-
 
1149
            if (field.type == TType.I32) {
-
 
1150
              this.billingType = BillingType.findByValue(iprot.readI32());
-
 
1151
            } else { 
-
 
1152
              TProtocolUtil.skip(iprot, field.type);
-
 
1153
            }
-
 
1154
            break;
1072
        }
1155
        }
1073
        iprot.readFieldEnd();
1156
        iprot.readFieldEnd();
1074
      }
1157
      }
1075
    }
1158
    }
1076
    iprot.readStructEnd();
1159
    iprot.readStructEnd();
Line 1131... Line 1214...
1131
      oprot.writeFieldEnd();
1214
      oprot.writeFieldEnd();
1132
    }
1215
    }
1133
    oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
1216
    oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
1134
    oprot.writeI64(this.vendorId);
1217
    oprot.writeI64(this.vendorId);
1135
    oprot.writeFieldEnd();
1218
    oprot.writeFieldEnd();
-
 
1219
    if (this.billingType != null) {
-
 
1220
      oprot.writeFieldBegin(BILLING_TYPE_FIELD_DESC);
-
 
1221
      oprot.writeI32(this.billingType.getValue());
-
 
1222
      oprot.writeFieldEnd();
-
 
1223
    }
1136
    oprot.writeFieldStop();
1224
    oprot.writeFieldStop();
1137
    oprot.writeStructEnd();
1225
    oprot.writeStructEnd();
1138
  }
1226
  }
1139
 
1227
 
1140
  @Override
1228
  @Override
Line 1235... Line 1323...
1235
    first = false;
1323
    first = false;
1236
    if (!first) sb.append(", ");
1324
    if (!first) sb.append(", ");
1237
    sb.append("vendorId:");
1325
    sb.append("vendorId:");
1238
    sb.append(this.vendorId);
1326
    sb.append(this.vendorId);
1239
    first = false;
1327
    first = false;
-
 
1328
    if (!first) sb.append(", ");
-
 
1329
    sb.append("billingType:");
-
 
1330
    if (this.billingType == null) {
-
 
1331
      sb.append("null");
-
 
1332
    } else {
-
 
1333
      String billingType_name = billingType.name();
-
 
1334
      if (billingType_name != null) {
-
 
1335
        sb.append(billingType_name);
-
 
1336
        sb.append(" (");
-
 
1337
      }
-
 
1338
      sb.append(this.billingType);
-
 
1339
      if (billingType_name != null) {
-
 
1340
        sb.append(")");
-
 
1341
      }
-
 
1342
    }
-
 
1343
    first = false;
1240
    sb.append(")");
1344
    sb.append(")");
1241
    return sb.toString();
1345
    return sb.toString();
1242
  }
1346
  }
1243
 
1347
 
1244
  public void validate() throws TException {
1348
  public void validate() throws TException {