Subversion Repositories SmartDukaan

Rev

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

Rev 6310 Rev 6336
Line 22... Line 22...
22
 
22
 
23
public class DeviceNumberInfo implements org.apache.thrift.TBase<DeviceNumberInfo, DeviceNumberInfo._Fields>, java.io.Serializable, Cloneable {
23
public class DeviceNumberInfo implements org.apache.thrift.TBase<DeviceNumberInfo, DeviceNumberInfo._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DeviceNumberInfo");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DeviceNumberInfo");
25
 
25
 
26
  private static final org.apache.thrift.protocol.TField OPERATOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("operatorId", org.apache.thrift.protocol.TType.I64, (short)1);
26
  private static final org.apache.thrift.protocol.TField OPERATOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("operatorId", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField CIRCLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("circleName", org.apache.thrift.protocol.TType.STRING, (short)2);
27
  private static final org.apache.thrift.protocol.TField CIRCLE_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("circleCode", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField OPERATOR_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("operatorName", org.apache.thrift.protocol.TType.STRING, (short)3);
28
  private static final org.apache.thrift.protocol.TField OPERATOR_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("operatorName", org.apache.thrift.protocol.TType.STRING, (short)3);
29
 
29
 
30
  private long operatorId; // required
30
  private long operatorId; // required
31
  private String circleName; // required
31
  private String circleCode; // required
32
  private String operatorName; // required
32
  private String operatorName; // 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
    OPERATOR_ID((short)1, "operatorId"),
36
    OPERATOR_ID((short)1, "operatorId"),
37
    CIRCLE_NAME((short)2, "circleName"),
37
    CIRCLE_CODE((short)2, "circleCode"),
38
    OPERATOR_NAME((short)3, "operatorName");
38
    OPERATOR_NAME((short)3, "operatorName");
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: // OPERATOR_ID
53
        case 1: // OPERATOR_ID
54
          return OPERATOR_ID;
54
          return OPERATOR_ID;
55
        case 2: // CIRCLE_NAME
55
        case 2: // CIRCLE_CODE
56
          return CIRCLE_NAME;
56
          return CIRCLE_CODE;
57
        case 3: // OPERATOR_NAME
57
        case 3: // OPERATOR_NAME
58
          return OPERATOR_NAME;
58
          return OPERATOR_NAME;
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.OPERATOR_ID, new org.apache.thrift.meta_data.FieldMetaData("operatorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
105
    tmpMap.put(_Fields.OPERATOR_ID, new org.apache.thrift.meta_data.FieldMetaData("operatorId", 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.CIRCLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("circleName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
107
    tmpMap.put(_Fields.CIRCLE_CODE, new org.apache.thrift.meta_data.FieldMetaData("circleCode", 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.OPERATOR_NAME, new org.apache.thrift.meta_data.FieldMetaData("operatorName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
109
    tmpMap.put(_Fields.OPERATOR_NAME, new org.apache.thrift.meta_data.FieldMetaData("operatorName", 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(DeviceNumberInfo.class, metaDataMap);
112
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DeviceNumberInfo.class, metaDataMap);
Line 115... Line 115...
115
  public DeviceNumberInfo() {
115
  public DeviceNumberInfo() {
116
  }
116
  }
117
 
117
 
118
  public DeviceNumberInfo(
118
  public DeviceNumberInfo(
119
    long operatorId,
119
    long operatorId,
120
    String circleName,
120
    String circleCode,
121
    String operatorName)
121
    String operatorName)
122
  {
122
  {
123
    this();
123
    this();
124
    this.operatorId = operatorId;
124
    this.operatorId = operatorId;
125
    setOperatorIdIsSet(true);
125
    setOperatorIdIsSet(true);
126
    this.circleName = circleName;
126
    this.circleCode = circleCode;
127
    this.operatorName = operatorName;
127
    this.operatorName = operatorName;
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 DeviceNumberInfo(DeviceNumberInfo other) {
133
  public DeviceNumberInfo(DeviceNumberInfo 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.operatorId = other.operatorId;
136
    this.operatorId = other.operatorId;
137
    if (other.isSetCircleName()) {
137
    if (other.isSetCircleCode()) {
138
      this.circleName = other.circleName;
138
      this.circleCode = other.circleCode;
139
    }
139
    }
140
    if (other.isSetOperatorName()) {
140
    if (other.isSetOperatorName()) {
141
      this.operatorName = other.operatorName;
141
      this.operatorName = other.operatorName;
142
    }
142
    }
143
  }
143
  }
Line 148... Line 148...
148
 
148
 
149
  @Override
149
  @Override
150
  public void clear() {
150
  public void clear() {
151
    setOperatorIdIsSet(false);
151
    setOperatorIdIsSet(false);
152
    this.operatorId = 0;
152
    this.operatorId = 0;
153
    this.circleName = null;
153
    this.circleCode = null;
154
    this.operatorName = null;
154
    this.operatorName = null;
155
  }
155
  }
156
 
156
 
157
  public long getOperatorId() {
157
  public long getOperatorId() {
158
    return this.operatorId;
158
    return this.operatorId;
Line 174... Line 174...
174
 
174
 
175
  public void setOperatorIdIsSet(boolean value) {
175
  public void setOperatorIdIsSet(boolean value) {
176
    __isset_bit_vector.set(__OPERATORID_ISSET_ID, value);
176
    __isset_bit_vector.set(__OPERATORID_ISSET_ID, value);
177
  }
177
  }
178
 
178
 
179
  public String getCircleName() {
179
  public String getCircleCode() {
180
    return this.circleName;
180
    return this.circleCode;
181
  }
181
  }
182
 
182
 
183
  public void setCircleName(String circleName) {
183
  public void setCircleCode(String circleCode) {
184
    this.circleName = circleName;
184
    this.circleCode = circleCode;
185
  }
185
  }
186
 
186
 
187
  public void unsetCircleName() {
187
  public void unsetCircleCode() {
188
    this.circleName = null;
188
    this.circleCode = null;
189
  }
189
  }
190
 
190
 
191
  /** Returns true if field circleName is set (has been assigned a value) and false otherwise */
191
  /** Returns true if field circleCode is set (has been assigned a value) and false otherwise */
192
  public boolean isSetCircleName() {
192
  public boolean isSetCircleCode() {
193
    return this.circleName != null;
193
    return this.circleCode != null;
194
  }
194
  }
195
 
195
 
196
  public void setCircleNameIsSet(boolean value) {
196
  public void setCircleCodeIsSet(boolean value) {
197
    if (!value) {
197
    if (!value) {
198
      this.circleName = null;
198
      this.circleCode = null;
199
    }
199
    }
200
  }
200
  }
201
 
201
 
202
  public String getOperatorName() {
202
  public String getOperatorName() {
203
    return this.operatorName;
203
    return this.operatorName;
Line 230... Line 230...
230
      } else {
230
      } else {
231
        setOperatorId((Long)value);
231
        setOperatorId((Long)value);
232
      }
232
      }
233
      break;
233
      break;
234
 
234
 
235
    case CIRCLE_NAME:
235
    case CIRCLE_CODE:
236
      if (value == null) {
236
      if (value == null) {
237
        unsetCircleName();
237
        unsetCircleCode();
238
      } else {
238
      } else {
239
        setCircleName((String)value);
239
        setCircleCode((String)value);
240
      }
240
      }
241
      break;
241
      break;
242
 
242
 
243
    case OPERATOR_NAME:
243
    case OPERATOR_NAME:
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 OPERATOR_ID:
256
    case OPERATOR_ID:
257
      return Long.valueOf(getOperatorId());
257
      return Long.valueOf(getOperatorId());
258
 
258
 
259
    case CIRCLE_NAME:
259
    case CIRCLE_CODE:
260
      return getCircleName();
260
      return getCircleCode();
261
 
261
 
262
    case OPERATOR_NAME:
262
    case OPERATOR_NAME:
263
      return getOperatorName();
263
      return getOperatorName();
264
 
264
 
265
    }
265
    }
Line 273... Line 273...
273
    }
273
    }
274
 
274
 
275
    switch (field) {
275
    switch (field) {
276
    case OPERATOR_ID:
276
    case OPERATOR_ID:
277
      return isSetOperatorId();
277
      return isSetOperatorId();
278
    case CIRCLE_NAME:
278
    case CIRCLE_CODE:
279
      return isSetCircleName();
279
      return isSetCircleCode();
280
    case OPERATOR_NAME:
280
    case OPERATOR_NAME:
281
      return isSetOperatorName();
281
      return isSetOperatorName();
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.operatorId != that.operatorId)
304
      if (this.operatorId != that.operatorId)
305
        return false;
305
        return false;
306
    }
306
    }
307
 
307
 
308
    boolean this_present_circleName = true && this.isSetCircleName();
308
    boolean this_present_circleCode = true && this.isSetCircleCode();
309
    boolean that_present_circleName = true && that.isSetCircleName();
309
    boolean that_present_circleCode = true && that.isSetCircleCode();
310
    if (this_present_circleName || that_present_circleName) {
310
    if (this_present_circleCode || that_present_circleCode) {
311
      if (!(this_present_circleName && that_present_circleName))
311
      if (!(this_present_circleCode && that_present_circleCode))
312
        return false;
312
        return false;
313
      if (!this.circleName.equals(that.circleName))
313
      if (!this.circleCode.equals(that.circleCode))
314
        return false;
314
        return false;
315
    }
315
    }
316
 
316
 
317
    boolean this_present_operatorName = true && this.isSetOperatorName();
317
    boolean this_present_operatorName = true && this.isSetOperatorName();
318
    boolean that_present_operatorName = true && that.isSetOperatorName();
318
    boolean that_present_operatorName = true && that.isSetOperatorName();
Line 347... Line 347...
347
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatorId, typedOther.operatorId);
347
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatorId, typedOther.operatorId);
348
      if (lastComparison != 0) {
348
      if (lastComparison != 0) {
349
        return lastComparison;
349
        return lastComparison;
350
      }
350
      }
351
    }
351
    }
352
    lastComparison = Boolean.valueOf(isSetCircleName()).compareTo(typedOther.isSetCircleName());
352
    lastComparison = Boolean.valueOf(isSetCircleCode()).compareTo(typedOther.isSetCircleCode());
353
    if (lastComparison != 0) {
353
    if (lastComparison != 0) {
354
      return lastComparison;
354
      return lastComparison;
355
    }
355
    }
356
    if (isSetCircleName()) {
356
    if (isSetCircleCode()) {
357
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.circleName, typedOther.circleName);
357
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.circleCode, typedOther.circleCode);
358
      if (lastComparison != 0) {
358
      if (lastComparison != 0) {
359
        return lastComparison;
359
        return lastComparison;
360
      }
360
      }
361
    }
361
    }
362
    lastComparison = Boolean.valueOf(isSetOperatorName()).compareTo(typedOther.isSetOperatorName());
362
    lastComparison = Boolean.valueOf(isSetOperatorName()).compareTo(typedOther.isSetOperatorName());
Line 392... Line 392...
392
            setOperatorIdIsSet(true);
392
            setOperatorIdIsSet(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: // CIRCLE_NAME
397
        case 2: // CIRCLE_CODE
398
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
398
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
399
            this.circleName = iprot.readString();
399
            this.circleCode = 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: // OPERATOR_NAME
404
        case 3: // OPERATOR_NAME
Line 422... Line 422...
422
 
422
 
423
    oprot.writeStructBegin(STRUCT_DESC);
423
    oprot.writeStructBegin(STRUCT_DESC);
424
    oprot.writeFieldBegin(OPERATOR_ID_FIELD_DESC);
424
    oprot.writeFieldBegin(OPERATOR_ID_FIELD_DESC);
425
    oprot.writeI64(this.operatorId);
425
    oprot.writeI64(this.operatorId);
426
    oprot.writeFieldEnd();
426
    oprot.writeFieldEnd();
427
    if (this.circleName != null) {
427
    if (this.circleCode != null) {
428
      oprot.writeFieldBegin(CIRCLE_NAME_FIELD_DESC);
428
      oprot.writeFieldBegin(CIRCLE_CODE_FIELD_DESC);
429
      oprot.writeString(this.circleName);
429
      oprot.writeString(this.circleCode);
430
      oprot.writeFieldEnd();
430
      oprot.writeFieldEnd();
431
    }
431
    }
432
    if (this.operatorName != null) {
432
    if (this.operatorName != null) {
433
      oprot.writeFieldBegin(OPERATOR_NAME_FIELD_DESC);
433
      oprot.writeFieldBegin(OPERATOR_NAME_FIELD_DESC);
434
      oprot.writeString(this.operatorName);
434
      oprot.writeString(this.operatorName);
Line 445... Line 445...
445
 
445
 
446
    sb.append("operatorId:");
446
    sb.append("operatorId:");
447
    sb.append(this.operatorId);
447
    sb.append(this.operatorId);
448
    first = false;
448
    first = false;
449
    if (!first) sb.append(", ");
449
    if (!first) sb.append(", ");
450
    sb.append("circleName:");
450
    sb.append("circleCode:");
451
    if (this.circleName == null) {
451
    if (this.circleCode == null) {
452
      sb.append("null");
452
      sb.append("null");
453
    } else {
453
    } else {
454
      sb.append(this.circleName);
454
      sb.append(this.circleCode);
455
    }
455
    }
456
    first = false;
456
    first = false;
457
    if (!first) sb.append(", ");
457
    if (!first) sb.append(", ");
458
    sb.append("operatorName:");
458
    sb.append("operatorName:");
459
    if (this.operatorName == null) {
459
    if (this.operatorName == null) {