Subversion Repositories SmartDukaan

Rev

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

Rev 21853 Rev 21858
Line 22... Line 22...
22
 
22
 
23
public class CategoryHsnCode implements org.apache.thrift.TBase<CategoryHsnCode, CategoryHsnCode._Fields>, java.io.Serializable, Cloneable {
23
public class CategoryHsnCode implements org.apache.thrift.TBase<CategoryHsnCode, CategoryHsnCode._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CategoryHsnCode");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CategoryHsnCode");
25
 
25
 
26
  private static final org.apache.thrift.protocol.TField CATEGORY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("categoryId", org.apache.thrift.protocol.TType.I64, (short)1);
26
  private static final org.apache.thrift.protocol.TField CATEGORY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("categoryId", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField HSNCODE_FIELD_DESC = new org.apache.thrift.protocol.TField("hsncode", org.apache.thrift.protocol.TType.STRING, (short)2);
27
  private static final org.apache.thrift.protocol.TField HSN_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("hsnCode", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)3);
28
  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)3);
29
 
29
 
30
  private long categoryId; // required
30
  private long categoryId; // required
31
  private String hsncode; // required
31
  private String hsnCode; // required
32
  private String description; // required
32
  private String description; // required
33
 
33
 
34
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
35
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
35
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
36
    CATEGORY_ID((short)1, "categoryId"),
36
    CATEGORY_ID((short)1, "categoryId"),
37
    HSNCODE((short)2, "hsncode"),
37
    HSN_CODE((short)2, "hsnCode"),
38
    DESCRIPTION((short)3, "description");
38
    DESCRIPTION((short)3, "description");
39
 
39
 
40
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
40
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
41
 
41
 
42
    static {
42
    static {
Line 50... Line 50...
50
     */
50
     */
51
    public static _Fields findByThriftId(int fieldId) {
51
    public static _Fields findByThriftId(int fieldId) {
52
      switch(fieldId) {
52
      switch(fieldId) {
53
        case 1: // CATEGORY_ID
53
        case 1: // CATEGORY_ID
54
          return CATEGORY_ID;
54
          return CATEGORY_ID;
55
        case 2: // HSNCODE
55
        case 2: // HSN_CODE
56
          return HSNCODE;
56
          return HSN_CODE;
57
        case 3: // DESCRIPTION
57
        case 3: // DESCRIPTION
58
          return DESCRIPTION;
58
          return DESCRIPTION;
59
        default:
59
        default:
60
          return null;
60
          return null;
61
      }
61
      }
Line 102... Line 102...
102
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
102
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
103
  static {
103
  static {
104
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
104
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
105
    tmpMap.put(_Fields.CATEGORY_ID, new org.apache.thrift.meta_data.FieldMetaData("categoryId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
105
    tmpMap.put(_Fields.CATEGORY_ID, new org.apache.thrift.meta_data.FieldMetaData("categoryId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
106
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
106
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
107
    tmpMap.put(_Fields.HSNCODE, new org.apache.thrift.meta_data.FieldMetaData("hsncode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
107
    tmpMap.put(_Fields.HSN_CODE, new org.apache.thrift.meta_data.FieldMetaData("hsnCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
108
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
108
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
109
    tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, 
109
    tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, 
110
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
110
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
111
    metaDataMap = Collections.unmodifiableMap(tmpMap);
111
    metaDataMap = Collections.unmodifiableMap(tmpMap);
112
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CategoryHsnCode.class, metaDataMap);
112
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CategoryHsnCode.class, metaDataMap);
Line 115... Line 115...
115
  public CategoryHsnCode() {
115
  public CategoryHsnCode() {
116
  }
116
  }
117
 
117
 
118
  public CategoryHsnCode(
118
  public CategoryHsnCode(
119
    long categoryId,
119
    long categoryId,
120
    String hsncode,
120
    String hsnCode,
121
    String description)
121
    String description)
122
  {
122
  {
123
    this();
123
    this();
124
    this.categoryId = categoryId;
124
    this.categoryId = categoryId;
125
    setCategoryIdIsSet(true);
125
    setCategoryIdIsSet(true);
126
    this.hsncode = hsncode;
126
    this.hsnCode = hsnCode;
127
    this.description = description;
127
    this.description = description;
128
  }
128
  }
129
 
129
 
130
  /**
130
  /**
131
   * Performs a deep copy on <i>other</i>.
131
   * Performs a deep copy on <i>other</i>.
132
   */
132
   */
133
  public CategoryHsnCode(CategoryHsnCode other) {
133
  public CategoryHsnCode(CategoryHsnCode other) {
134
    __isset_bit_vector.clear();
134
    __isset_bit_vector.clear();
135
    __isset_bit_vector.or(other.__isset_bit_vector);
135
    __isset_bit_vector.or(other.__isset_bit_vector);
136
    this.categoryId = other.categoryId;
136
    this.categoryId = other.categoryId;
137
    if (other.isSetHsncode()) {
137
    if (other.isSetHsnCode()) {
138
      this.hsncode = other.hsncode;
138
      this.hsnCode = other.hsnCode;
139
    }
139
    }
140
    if (other.isSetDescription()) {
140
    if (other.isSetDescription()) {
141
      this.description = other.description;
141
      this.description = other.description;
142
    }
142
    }
143
  }
143
  }
Line 148... Line 148...
148
 
148
 
149
  @Override
149
  @Override
150
  public void clear() {
150
  public void clear() {
151
    setCategoryIdIsSet(false);
151
    setCategoryIdIsSet(false);
152
    this.categoryId = 0;
152
    this.categoryId = 0;
153
    this.hsncode = null;
153
    this.hsnCode = null;
154
    this.description = null;
154
    this.description = null;
155
  }
155
  }
156
 
156
 
157
  public long getCategoryId() {
157
  public long getCategoryId() {
158
    return this.categoryId;
158
    return this.categoryId;
Line 174... Line 174...
174
 
174
 
175
  public void setCategoryIdIsSet(boolean value) {
175
  public void setCategoryIdIsSet(boolean value) {
176
    __isset_bit_vector.set(__CATEGORYID_ISSET_ID, value);
176
    __isset_bit_vector.set(__CATEGORYID_ISSET_ID, value);
177
  }
177
  }
178
 
178
 
179
  public String getHsncode() {
179
  public String getHsnCode() {
180
    return this.hsncode;
180
    return this.hsnCode;
181
  }
181
  }
182
 
182
 
183
  public void setHsncode(String hsncode) {
183
  public void setHsnCode(String hsnCode) {
184
    this.hsncode = hsncode;
184
    this.hsnCode = hsnCode;
185
  }
185
  }
186
 
186
 
187
  public void unsetHsncode() {
187
  public void unsetHsnCode() {
188
    this.hsncode = null;
188
    this.hsnCode = null;
189
  }
189
  }
190
 
190
 
191
  /** Returns true if field hsncode is set (has been assigned a value) and false otherwise */
191
  /** Returns true if field hsnCode is set (has been assigned a value) and false otherwise */
192
  public boolean isSetHsncode() {
192
  public boolean isSetHsnCode() {
193
    return this.hsncode != null;
193
    return this.hsnCode != null;
194
  }
194
  }
195
 
195
 
196
  public void setHsncodeIsSet(boolean value) {
196
  public void setHsnCodeIsSet(boolean value) {
197
    if (!value) {
197
    if (!value) {
198
      this.hsncode = null;
198
      this.hsnCode = null;
199
    }
199
    }
200
  }
200
  }
201
 
201
 
202
  public String getDescription() {
202
  public String getDescription() {
203
    return this.description;
203
    return this.description;
Line 230... Line 230...
230
      } else {
230
      } else {
231
        setCategoryId((Long)value);
231
        setCategoryId((Long)value);
232
      }
232
      }
233
      break;
233
      break;
234
 
234
 
235
    case HSNCODE:
235
    case HSN_CODE:
236
      if (value == null) {
236
      if (value == null) {
237
        unsetHsncode();
237
        unsetHsnCode();
238
      } else {
238
      } else {
239
        setHsncode((String)value);
239
        setHsnCode((String)value);
240
      }
240
      }
241
      break;
241
      break;
242
 
242
 
243
    case DESCRIPTION:
243
    case DESCRIPTION:
244
      if (value == null) {
244
      if (value == null) {
Line 254... Line 254...
254
  public Object getFieldValue(_Fields field) {
254
  public Object getFieldValue(_Fields field) {
255
    switch (field) {
255
    switch (field) {
256
    case CATEGORY_ID:
256
    case CATEGORY_ID:
257
      return Long.valueOf(getCategoryId());
257
      return Long.valueOf(getCategoryId());
258
 
258
 
259
    case HSNCODE:
259
    case HSN_CODE:
260
      return getHsncode();
260
      return getHsnCode();
261
 
261
 
262
    case DESCRIPTION:
262
    case DESCRIPTION:
263
      return getDescription();
263
      return getDescription();
264
 
264
 
265
    }
265
    }
Line 273... Line 273...
273
    }
273
    }
274
 
274
 
275
    switch (field) {
275
    switch (field) {
276
    case CATEGORY_ID:
276
    case CATEGORY_ID:
277
      return isSetCategoryId();
277
      return isSetCategoryId();
278
    case HSNCODE:
278
    case HSN_CODE:
279
      return isSetHsncode();
279
      return isSetHsnCode();
280
    case DESCRIPTION:
280
    case DESCRIPTION:
281
      return isSetDescription();
281
      return isSetDescription();
282
    }
282
    }
283
    throw new IllegalStateException();
283
    throw new IllegalStateException();
284
  }
284
  }
Line 303... Line 303...
303
        return false;
303
        return false;
304
      if (this.categoryId != that.categoryId)
304
      if (this.categoryId != that.categoryId)
305
        return false;
305
        return false;
306
    }
306
    }
307
 
307
 
308
    boolean this_present_hsncode = true && this.isSetHsncode();
308
    boolean this_present_hsnCode = true && this.isSetHsnCode();
309
    boolean that_present_hsncode = true && that.isSetHsncode();
309
    boolean that_present_hsnCode = true && that.isSetHsnCode();
310
    if (this_present_hsncode || that_present_hsncode) {
310
    if (this_present_hsnCode || that_present_hsnCode) {
311
      if (!(this_present_hsncode && that_present_hsncode))
311
      if (!(this_present_hsnCode && that_present_hsnCode))
312
        return false;
312
        return false;
313
      if (!this.hsncode.equals(that.hsncode))
313
      if (!this.hsnCode.equals(that.hsnCode))
314
        return false;
314
        return false;
315
    }
315
    }
316
 
316
 
317
    boolean this_present_description = true && this.isSetDescription();
317
    boolean this_present_description = true && this.isSetDescription();
318
    boolean that_present_description = true && that.isSetDescription();
318
    boolean that_present_description = true && that.isSetDescription();
Line 347... Line 347...
347
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.categoryId, typedOther.categoryId);
347
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.categoryId, typedOther.categoryId);
348
      if (lastComparison != 0) {
348
      if (lastComparison != 0) {
349
        return lastComparison;
349
        return lastComparison;
350
      }
350
      }
351
    }
351
    }
352
    lastComparison = Boolean.valueOf(isSetHsncode()).compareTo(typedOther.isSetHsncode());
352
    lastComparison = Boolean.valueOf(isSetHsnCode()).compareTo(typedOther.isSetHsnCode());
353
    if (lastComparison != 0) {
353
    if (lastComparison != 0) {
354
      return lastComparison;
354
      return lastComparison;
355
    }
355
    }
356
    if (isSetHsncode()) {
356
    if (isSetHsnCode()) {
357
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hsncode, typedOther.hsncode);
357
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hsnCode, typedOther.hsnCode);
358
      if (lastComparison != 0) {
358
      if (lastComparison != 0) {
359
        return lastComparison;
359
        return lastComparison;
360
      }
360
      }
361
    }
361
    }
362
    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription());
362
    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription());
Line 392... Line 392...
392
            setCategoryIdIsSet(true);
392
            setCategoryIdIsSet(true);
393
          } else { 
393
          } else { 
394
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
394
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
395
          }
395
          }
396
          break;
396
          break;
397
        case 2: // HSNCODE
397
        case 2: // HSN_CODE
398
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
398
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
399
            this.hsncode = iprot.readString();
399
            this.hsnCode = iprot.readString();
400
          } else { 
400
          } else { 
401
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
401
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
402
          }
402
          }
403
          break;
403
          break;
404
        case 3: // DESCRIPTION
404
        case 3: // DESCRIPTION
Line 422... Line 422...
422
 
422
 
423
    oprot.writeStructBegin(STRUCT_DESC);
423
    oprot.writeStructBegin(STRUCT_DESC);
424
    oprot.writeFieldBegin(CATEGORY_ID_FIELD_DESC);
424
    oprot.writeFieldBegin(CATEGORY_ID_FIELD_DESC);
425
    oprot.writeI64(this.categoryId);
425
    oprot.writeI64(this.categoryId);
426
    oprot.writeFieldEnd();
426
    oprot.writeFieldEnd();
427
    if (this.hsncode != null) {
427
    if (this.hsnCode != null) {
428
      oprot.writeFieldBegin(HSNCODE_FIELD_DESC);
428
      oprot.writeFieldBegin(HSN_CODE_FIELD_DESC);
429
      oprot.writeString(this.hsncode);
429
      oprot.writeString(this.hsnCode);
430
      oprot.writeFieldEnd();
430
      oprot.writeFieldEnd();
431
    }
431
    }
432
    if (this.description != null) {
432
    if (this.description != null) {
433
      oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
433
      oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
434
      oprot.writeString(this.description);
434
      oprot.writeString(this.description);
Line 445... Line 445...
445
 
445
 
446
    sb.append("categoryId:");
446
    sb.append("categoryId:");
447
    sb.append(this.categoryId);
447
    sb.append(this.categoryId);
448
    first = false;
448
    first = false;
449
    if (!first) sb.append(", ");
449
    if (!first) sb.append(", ");
450
    sb.append("hsncode:");
450
    sb.append("hsnCode:");
451
    if (this.hsncode == null) {
451
    if (this.hsnCode == null) {
452
      sb.append("null");
452
      sb.append("null");
453
    } else {
453
    } else {
454
      sb.append(this.hsncode);
454
      sb.append(this.hsnCode);
455
    }
455
    }
456
    first = false;
456
    first = false;
457
    if (!first) sb.append(", ");
457
    if (!first) sb.append(", ");
458
    sb.append("description:");
458
    sb.append("description:");
459
    if (this.description == null) {
459
    if (this.description == null) {