Subversion Repositories SmartDukaan

Rev

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

Rev 8579 Rev 10097
Line 24... Line 24...
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BannerUriMapping");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BannerUriMapping");
25
 
25
 
26
  private static final org.apache.thrift.protocol.TField BANNER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("bannerName", org.apache.thrift.protocol.TType.STRING, (short)1);
26
  private static final org.apache.thrift.protocol.TField BANNER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("bannerName", org.apache.thrift.protocol.TType.STRING, (short)1);
27
  private static final org.apache.thrift.protocol.TField URI_FIELD_DESC = new org.apache.thrift.protocol.TField("uri", org.apache.thrift.protocol.TType.STRING, (short)2);
27
  private static final org.apache.thrift.protocol.TField URI_FIELD_DESC = new org.apache.thrift.protocol.TField("uri", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)3);
28
  private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)3);
-
 
29
  private static final org.apache.thrift.protocol.TField TARGET_FIELD_DESC = new org.apache.thrift.protocol.TField("target", org.apache.thrift.protocol.TType.BOOL, (short)4);
29
 
30
 
30
  private String bannerName; // required
31
  private String bannerName; // required
31
  private String uri; // required
32
  private String uri; // required
32
  private boolean isActive; // required
33
  private boolean isActive; // required
-
 
34
  private boolean target; // required
33
 
35
 
34
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
36
  /** 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 {
37
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
36
    BANNER_NAME((short)1, "bannerName"),
38
    BANNER_NAME((short)1, "bannerName"),
37
    URI((short)2, "uri"),
39
    URI((short)2, "uri"),
38
    IS_ACTIVE((short)3, "isActive");
40
    IS_ACTIVE((short)3, "isActive"),
-
 
41
    TARGET((short)4, "target");
39
 
42
 
40
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
43
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
41
 
44
 
42
    static {
45
    static {
43
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
46
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 54... Line 57...
54
          return BANNER_NAME;
57
          return BANNER_NAME;
55
        case 2: // URI
58
        case 2: // URI
56
          return URI;
59
          return URI;
57
        case 3: // IS_ACTIVE
60
        case 3: // IS_ACTIVE
58
          return IS_ACTIVE;
61
          return IS_ACTIVE;
-
 
62
        case 4: // TARGET
-
 
63
          return TARGET;
59
        default:
64
        default:
60
          return null;
65
          return null;
61
      }
66
      }
62
    }
67
    }
63
 
68
 
Line 95... Line 100...
95
    }
100
    }
96
  }
101
  }
97
 
102
 
98
  // isset id assignments
103
  // isset id assignments
99
  private static final int __ISACTIVE_ISSET_ID = 0;
104
  private static final int __ISACTIVE_ISSET_ID = 0;
-
 
105
  private static final int __TARGET_ISSET_ID = 1;
100
  private BitSet __isset_bit_vector = new BitSet(1);
106
  private BitSet __isset_bit_vector = new BitSet(2);
101
 
107
 
102
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
108
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
103
  static {
109
  static {
104
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
110
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
105
    tmpMap.put(_Fields.BANNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("bannerName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
111
    tmpMap.put(_Fields.BANNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("bannerName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
106
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
112
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
107
    tmpMap.put(_Fields.URI, new org.apache.thrift.meta_data.FieldMetaData("uri", org.apache.thrift.TFieldRequirementType.DEFAULT, 
113
    tmpMap.put(_Fields.URI, new org.apache.thrift.meta_data.FieldMetaData("uri", org.apache.thrift.TFieldRequirementType.DEFAULT, 
108
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
114
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
109
    tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT, 
115
    tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT, 
110
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
116
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
117
    tmpMap.put(_Fields.TARGET, new org.apache.thrift.meta_data.FieldMetaData("target", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
118
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
111
    metaDataMap = Collections.unmodifiableMap(tmpMap);
119
    metaDataMap = Collections.unmodifiableMap(tmpMap);
112
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BannerUriMapping.class, metaDataMap);
120
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BannerUriMapping.class, metaDataMap);
113
  }
121
  }
114
 
122
 
115
  public BannerUriMapping() {
123
  public BannerUriMapping() {
116
  }
124
  }
117
 
125
 
118
  public BannerUriMapping(
126
  public BannerUriMapping(
119
    String bannerName,
127
    String bannerName,
120
    String uri,
128
    String uri,
121
    boolean isActive)
129
    boolean isActive,
-
 
130
    boolean target)
122
  {
131
  {
123
    this();
132
    this();
124
    this.bannerName = bannerName;
133
    this.bannerName = bannerName;
125
    this.uri = uri;
134
    this.uri = uri;
126
    this.isActive = isActive;
135
    this.isActive = isActive;
127
    setIsActiveIsSet(true);
136
    setIsActiveIsSet(true);
-
 
137
    this.target = target;
-
 
138
    setTargetIsSet(true);
128
  }
139
  }
129
 
140
 
130
  /**
141
  /**
131
   * Performs a deep copy on <i>other</i>.
142
   * Performs a deep copy on <i>other</i>.
132
   */
143
   */
Line 138... Line 149...
138
    }
149
    }
139
    if (other.isSetUri()) {
150
    if (other.isSetUri()) {
140
      this.uri = other.uri;
151
      this.uri = other.uri;
141
    }
152
    }
142
    this.isActive = other.isActive;
153
    this.isActive = other.isActive;
-
 
154
    this.target = other.target;
143
  }
155
  }
144
 
156
 
145
  public BannerUriMapping deepCopy() {
157
  public BannerUriMapping deepCopy() {
146
    return new BannerUriMapping(this);
158
    return new BannerUriMapping(this);
147
  }
159
  }
Line 150... Line 162...
150
  public void clear() {
162
  public void clear() {
151
    this.bannerName = null;
163
    this.bannerName = null;
152
    this.uri = null;
164
    this.uri = null;
153
    setIsActiveIsSet(false);
165
    setIsActiveIsSet(false);
154
    this.isActive = false;
166
    this.isActive = false;
-
 
167
    setTargetIsSet(false);
-
 
168
    this.target = false;
155
  }
169
  }
156
 
170
 
157
  public String getBannerName() {
171
  public String getBannerName() {
158
    return this.bannerName;
172
    return this.bannerName;
159
  }
173
  }
Line 220... Line 234...
220
 
234
 
221
  public void setIsActiveIsSet(boolean value) {
235
  public void setIsActiveIsSet(boolean value) {
222
    __isset_bit_vector.set(__ISACTIVE_ISSET_ID, value);
236
    __isset_bit_vector.set(__ISACTIVE_ISSET_ID, value);
223
  }
237
  }
224
 
238
 
-
 
239
  public boolean isTarget() {
-
 
240
    return this.target;
-
 
241
  }
-
 
242
 
-
 
243
  public void setTarget(boolean target) {
-
 
244
    this.target = target;
-
 
245
    setTargetIsSet(true);
-
 
246
  }
-
 
247
 
-
 
248
  public void unsetTarget() {
-
 
249
    __isset_bit_vector.clear(__TARGET_ISSET_ID);
-
 
250
  }
-
 
251
 
-
 
252
  /** Returns true if field target is set (has been assigned a value) and false otherwise */
-
 
253
  public boolean isSetTarget() {
-
 
254
    return __isset_bit_vector.get(__TARGET_ISSET_ID);
-
 
255
  }
-
 
256
 
-
 
257
  public void setTargetIsSet(boolean value) {
-
 
258
    __isset_bit_vector.set(__TARGET_ISSET_ID, value);
-
 
259
  }
-
 
260
 
225
  public void setFieldValue(_Fields field, Object value) {
261
  public void setFieldValue(_Fields field, Object value) {
226
    switch (field) {
262
    switch (field) {
227
    case BANNER_NAME:
263
    case BANNER_NAME:
228
      if (value == null) {
264
      if (value == null) {
229
        unsetBannerName();
265
        unsetBannerName();
Line 246... Line 282...
246
      } else {
282
      } else {
247
        setIsActive((Boolean)value);
283
        setIsActive((Boolean)value);
248
      }
284
      }
249
      break;
285
      break;
250
 
286
 
-
 
287
    case TARGET:
-
 
288
      if (value == null) {
-
 
289
        unsetTarget();
-
 
290
      } else {
-
 
291
        setTarget((Boolean)value);
-
 
292
      }
-
 
293
      break;
-
 
294
 
251
    }
295
    }
252
  }
296
  }
253
 
297
 
254
  public Object getFieldValue(_Fields field) {
298
  public Object getFieldValue(_Fields field) {
255
    switch (field) {
299
    switch (field) {
Line 260... Line 304...
260
      return getUri();
304
      return getUri();
261
 
305
 
262
    case IS_ACTIVE:
306
    case IS_ACTIVE:
263
      return Boolean.valueOf(isIsActive());
307
      return Boolean.valueOf(isIsActive());
264
 
308
 
-
 
309
    case TARGET:
-
 
310
      return Boolean.valueOf(isTarget());
-
 
311
 
265
    }
312
    }
266
    throw new IllegalStateException();
313
    throw new IllegalStateException();
267
  }
314
  }
268
 
315
 
269
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
316
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 277... Line 324...
277
      return isSetBannerName();
324
      return isSetBannerName();
278
    case URI:
325
    case URI:
279
      return isSetUri();
326
      return isSetUri();
280
    case IS_ACTIVE:
327
    case IS_ACTIVE:
281
      return isSetIsActive();
328
      return isSetIsActive();
-
 
329
    case TARGET:
-
 
330
      return isSetTarget();
282
    }
331
    }
283
    throw new IllegalStateException();
332
    throw new IllegalStateException();
284
  }
333
  }
285
 
334
 
286
  @Override
335
  @Override
Line 321... Line 370...
321
        return false;
370
        return false;
322
      if (this.isActive != that.isActive)
371
      if (this.isActive != that.isActive)
323
        return false;
372
        return false;
324
    }
373
    }
325
 
374
 
-
 
375
    boolean this_present_target = true;
-
 
376
    boolean that_present_target = true;
-
 
377
    if (this_present_target || that_present_target) {
-
 
378
      if (!(this_present_target && that_present_target))
-
 
379
        return false;
-
 
380
      if (this.target != that.target)
-
 
381
        return false;
-
 
382
    }
-
 
383
 
326
    return true;
384
    return true;
327
  }
385
  }
328
 
386
 
329
  @Override
387
  @Override
330
  public int hashCode() {
388
  public int hashCode() {
Line 367... Line 425...
367
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, typedOther.isActive);
425
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, typedOther.isActive);
368
      if (lastComparison != 0) {
426
      if (lastComparison != 0) {
369
        return lastComparison;
427
        return lastComparison;
370
      }
428
      }
371
    }
429
    }
-
 
430
    lastComparison = Boolean.valueOf(isSetTarget()).compareTo(typedOther.isSetTarget());
-
 
431
    if (lastComparison != 0) {
-
 
432
      return lastComparison;
-
 
433
    }
-
 
434
    if (isSetTarget()) {
-
 
435
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.target, typedOther.target);
-
 
436
      if (lastComparison != 0) {
-
 
437
        return lastComparison;
-
 
438
      }
-
 
439
    }
372
    return 0;
440
    return 0;
373
  }
441
  }
374
 
442
 
375
  public _Fields fieldForId(int fieldId) {
443
  public _Fields fieldForId(int fieldId) {
376
    return _Fields.findByThriftId(fieldId);
444
    return _Fields.findByThriftId(fieldId);
Line 406... Line 474...
406
            setIsActiveIsSet(true);
474
            setIsActiveIsSet(true);
407
          } else { 
475
          } else { 
408
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
476
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
409
          }
477
          }
410
          break;
478
          break;
-
 
479
        case 4: // TARGET
-
 
480
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
481
            this.target = iprot.readBool();
-
 
482
            setTargetIsSet(true);
-
 
483
          } else { 
-
 
484
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
485
          }
-
 
486
          break;
411
        default:
487
        default:
412
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
488
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
413
      }
489
      }
414
      iprot.readFieldEnd();
490
      iprot.readFieldEnd();
415
    }
491
    }
Line 432... Line 508...
432
      oprot.writeFieldEnd();
508
      oprot.writeFieldEnd();
433
    }
509
    }
434
    oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC);
510
    oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC);
435
    oprot.writeBool(this.isActive);
511
    oprot.writeBool(this.isActive);
436
    oprot.writeFieldEnd();
512
    oprot.writeFieldEnd();
-
 
513
    oprot.writeFieldBegin(TARGET_FIELD_DESC);
-
 
514
    oprot.writeBool(this.target);
-
 
515
    oprot.writeFieldEnd();
437
    oprot.writeFieldStop();
516
    oprot.writeFieldStop();
438
    oprot.writeStructEnd();
517
    oprot.writeStructEnd();
439
  }
518
  }
440
 
519
 
441
  @Override
520
  @Override
Line 460... Line 539...
460
    first = false;
539
    first = false;
461
    if (!first) sb.append(", ");
540
    if (!first) sb.append(", ");
462
    sb.append("isActive:");
541
    sb.append("isActive:");
463
    sb.append(this.isActive);
542
    sb.append(this.isActive);
464
    first = false;
543
    first = false;
-
 
544
    if (!first) sb.append(", ");
-
 
545
    sb.append("target:");
-
 
546
    sb.append(this.target);
-
 
547
    first = false;
465
    sb.append(")");
548
    sb.append(")");
466
    return sb.toString();
549
    return sb.toString();
467
  }
550
  }
468
 
551
 
469
  public void validate() throws org.apache.thrift.TException {
552
  public void validate() throws org.apache.thrift.TException {