Subversion Repositories SmartDukaan

Rev

Rev 6849 | Rev 8915 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6849 Rev 8579
Line 25... Line 25...
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 IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)2);
27
  private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField LINK_FIELD_DESC = new org.apache.thrift.protocol.TField("link", org.apache.thrift.protocol.TType.STRING, (short)3);
28
  private static final org.apache.thrift.protocol.TField LINK_FIELD_DESC = new org.apache.thrift.protocol.TField("link", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField PRIORITY_FIELD_DESC = new org.apache.thrift.protocol.TField("priority", org.apache.thrift.protocol.TType.I64, (short)4);
29
  private static final org.apache.thrift.protocol.TField PRIORITY_FIELD_DESC = new org.apache.thrift.protocol.TField("priority", org.apache.thrift.protocol.TType.I64, (short)4);
30
  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)5);
-
 
31
  private static final org.apache.thrift.protocol.TField HAS_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("hasMap", org.apache.thrift.protocol.TType.BOOL, (short)6);
30
  private static final org.apache.thrift.protocol.TField HAS_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("hasMap", org.apache.thrift.protocol.TType.BOOL, (short)5);
32
 
31
 
33
  private String bannerName; // required
32
  private String bannerName; // required
34
  private String imageName; // required
33
  private String imageName; // required
35
  private String link; // required
34
  private String link; // required
36
  private long priority; // required
35
  private long priority; // required
37
  private boolean isActive; // required
-
 
38
  private boolean hasMap; // required
36
  private boolean hasMap; // required
39
 
37
 
40
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
38
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
41
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
39
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
42
    BANNER_NAME((short)1, "bannerName"),
40
    BANNER_NAME((short)1, "bannerName"),
43
    IMAGE_NAME((short)2, "imageName"),
41
    IMAGE_NAME((short)2, "imageName"),
44
    LINK((short)3, "link"),
42
    LINK((short)3, "link"),
45
    PRIORITY((short)4, "priority"),
43
    PRIORITY((short)4, "priority"),
46
    IS_ACTIVE((short)5, "isActive"),
-
 
47
    HAS_MAP((short)6, "hasMap");
44
    HAS_MAP((short)5, "hasMap");
48
 
45
 
49
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
46
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
50
 
47
 
51
    static {
48
    static {
52
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
49
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 65... Line 62...
65
          return IMAGE_NAME;
62
          return IMAGE_NAME;
66
        case 3: // LINK
63
        case 3: // LINK
67
          return LINK;
64
          return LINK;
68
        case 4: // PRIORITY
65
        case 4: // PRIORITY
69
          return PRIORITY;
66
          return PRIORITY;
70
        case 5: // IS_ACTIVE
-
 
71
          return IS_ACTIVE;
-
 
72
        case 6: // HAS_MAP
67
        case 5: // HAS_MAP
73
          return HAS_MAP;
68
          return HAS_MAP;
74
        default:
69
        default:
75
          return null;
70
          return null;
76
      }
71
      }
77
    }
72
    }
Line 110... Line 105...
110
    }
105
    }
111
  }
106
  }
112
 
107
 
113
  // isset id assignments
108
  // isset id assignments
114
  private static final int __PRIORITY_ISSET_ID = 0;
109
  private static final int __PRIORITY_ISSET_ID = 0;
115
  private static final int __ISACTIVE_ISSET_ID = 1;
-
 
116
  private static final int __HASMAP_ISSET_ID = 2;
110
  private static final int __HASMAP_ISSET_ID = 1;
117
  private BitSet __isset_bit_vector = new BitSet(3);
111
  private BitSet __isset_bit_vector = new BitSet(2);
118
 
112
 
119
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
113
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
120
  static {
114
  static {
121
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
115
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
122
    tmpMap.put(_Fields.BANNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("bannerName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
116
    tmpMap.put(_Fields.BANNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("bannerName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 125... Line 119...
125
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
119
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
126
    tmpMap.put(_Fields.LINK, new org.apache.thrift.meta_data.FieldMetaData("link", org.apache.thrift.TFieldRequirementType.DEFAULT, 
120
    tmpMap.put(_Fields.LINK, new org.apache.thrift.meta_data.FieldMetaData("link", org.apache.thrift.TFieldRequirementType.DEFAULT, 
127
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
121
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
128
    tmpMap.put(_Fields.PRIORITY, new org.apache.thrift.meta_data.FieldMetaData("priority", org.apache.thrift.TFieldRequirementType.DEFAULT, 
122
    tmpMap.put(_Fields.PRIORITY, new org.apache.thrift.meta_data.FieldMetaData("priority", org.apache.thrift.TFieldRequirementType.DEFAULT, 
129
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
123
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
130
    tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
132
    tmpMap.put(_Fields.HAS_MAP, new org.apache.thrift.meta_data.FieldMetaData("hasMap", org.apache.thrift.TFieldRequirementType.DEFAULT, 
124
    tmpMap.put(_Fields.HAS_MAP, new org.apache.thrift.meta_data.FieldMetaData("hasMap", org.apache.thrift.TFieldRequirementType.DEFAULT, 
133
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
125
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
134
    metaDataMap = Collections.unmodifiableMap(tmpMap);
126
    metaDataMap = Collections.unmodifiableMap(tmpMap);
135
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Banner.class, metaDataMap);
127
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Banner.class, metaDataMap);
136
  }
128
  }
Line 141... Line 133...
141
  public Banner(
133
  public Banner(
142
    String bannerName,
134
    String bannerName,
143
    String imageName,
135
    String imageName,
144
    String link,
136
    String link,
145
    long priority,
137
    long priority,
146
    boolean isActive,
-
 
147
    boolean hasMap)
138
    boolean hasMap)
148
  {
139
  {
149
    this();
140
    this();
150
    this.bannerName = bannerName;
141
    this.bannerName = bannerName;
151
    this.imageName = imageName;
142
    this.imageName = imageName;
152
    this.link = link;
143
    this.link = link;
153
    this.priority = priority;
144
    this.priority = priority;
154
    setPriorityIsSet(true);
145
    setPriorityIsSet(true);
155
    this.isActive = isActive;
-
 
156
    setIsActiveIsSet(true);
-
 
157
    this.hasMap = hasMap;
146
    this.hasMap = hasMap;
158
    setHasMapIsSet(true);
147
    setHasMapIsSet(true);
159
  }
148
  }
160
 
149
 
161
  /**
150
  /**
Line 172... Line 161...
172
    }
161
    }
173
    if (other.isSetLink()) {
162
    if (other.isSetLink()) {
174
      this.link = other.link;
163
      this.link = other.link;
175
    }
164
    }
176
    this.priority = other.priority;
165
    this.priority = other.priority;
177
    this.isActive = other.isActive;
-
 
178
    this.hasMap = other.hasMap;
166
    this.hasMap = other.hasMap;
179
  }
167
  }
180
 
168
 
181
  public Banner deepCopy() {
169
  public Banner deepCopy() {
182
    return new Banner(this);
170
    return new Banner(this);
Line 187... Line 175...
187
    this.bannerName = null;
175
    this.bannerName = null;
188
    this.imageName = null;
176
    this.imageName = null;
189
    this.link = null;
177
    this.link = null;
190
    setPriorityIsSet(false);
178
    setPriorityIsSet(false);
191
    this.priority = 0;
179
    this.priority = 0;
192
    setIsActiveIsSet(false);
-
 
193
    this.isActive = false;
-
 
194
    setHasMapIsSet(false);
180
    setHasMapIsSet(false);
195
    this.hasMap = false;
181
    this.hasMap = false;
196
  }
182
  }
197
 
183
 
198
  public String getBannerName() {
184
  public String getBannerName() {
Line 284... Line 270...
284
 
270
 
285
  public void setPriorityIsSet(boolean value) {
271
  public void setPriorityIsSet(boolean value) {
286
    __isset_bit_vector.set(__PRIORITY_ISSET_ID, value);
272
    __isset_bit_vector.set(__PRIORITY_ISSET_ID, value);
287
  }
273
  }
288
 
274
 
289
  public boolean isIsActive() {
-
 
290
    return this.isActive;
-
 
291
  }
-
 
292
 
-
 
293
  public void setIsActive(boolean isActive) {
-
 
294
    this.isActive = isActive;
-
 
295
    setIsActiveIsSet(true);
-
 
296
  }
-
 
297
 
-
 
298
  public void unsetIsActive() {
-
 
299
    __isset_bit_vector.clear(__ISACTIVE_ISSET_ID);
-
 
300
  }
-
 
301
 
-
 
302
  /** Returns true if field isActive is set (has been assigned a value) and false otherwise */
-
 
303
  public boolean isSetIsActive() {
-
 
304
    return __isset_bit_vector.get(__ISACTIVE_ISSET_ID);
-
 
305
  }
-
 
306
 
-
 
307
  public void setIsActiveIsSet(boolean value) {
-
 
308
    __isset_bit_vector.set(__ISACTIVE_ISSET_ID, value);
-
 
309
  }
-
 
310
 
-
 
311
  public boolean isHasMap() {
275
  public boolean isHasMap() {
312
    return this.hasMap;
276
    return this.hasMap;
313
  }
277
  }
314
 
278
 
315
  public void setHasMap(boolean hasMap) {
279
  public void setHasMap(boolean hasMap) {
Line 362... Line 326...
362
      } else {
326
      } else {
363
        setPriority((Long)value);
327
        setPriority((Long)value);
364
      }
328
      }
365
      break;
329
      break;
366
 
330
 
367
    case IS_ACTIVE:
-
 
368
      if (value == null) {
-
 
369
        unsetIsActive();
-
 
370
      } else {
-
 
371
        setIsActive((Boolean)value);
-
 
372
      }
-
 
373
      break;
-
 
374
 
-
 
375
    case HAS_MAP:
331
    case HAS_MAP:
376
      if (value == null) {
332
      if (value == null) {
377
        unsetHasMap();
333
        unsetHasMap();
378
      } else {
334
      } else {
379
        setHasMap((Boolean)value);
335
        setHasMap((Boolean)value);
Line 395... Line 351...
395
      return getLink();
351
      return getLink();
396
 
352
 
397
    case PRIORITY:
353
    case PRIORITY:
398
      return Long.valueOf(getPriority());
354
      return Long.valueOf(getPriority());
399
 
355
 
400
    case IS_ACTIVE:
-
 
401
      return Boolean.valueOf(isIsActive());
-
 
402
 
-
 
403
    case HAS_MAP:
356
    case HAS_MAP:
404
      return Boolean.valueOf(isHasMap());
357
      return Boolean.valueOf(isHasMap());
405
 
358
 
406
    }
359
    }
407
    throw new IllegalStateException();
360
    throw new IllegalStateException();
Line 420... Line 373...
420
      return isSetImageName();
373
      return isSetImageName();
421
    case LINK:
374
    case LINK:
422
      return isSetLink();
375
      return isSetLink();
423
    case PRIORITY:
376
    case PRIORITY:
424
      return isSetPriority();
377
      return isSetPriority();
425
    case IS_ACTIVE:
-
 
426
      return isSetIsActive();
-
 
427
    case HAS_MAP:
378
    case HAS_MAP:
428
      return isSetHasMap();
379
      return isSetHasMap();
429
    }
380
    }
430
    throw new IllegalStateException();
381
    throw new IllegalStateException();
431
  }
382
  }
Line 477... Line 428...
477
        return false;
428
        return false;
478
      if (this.priority != that.priority)
429
      if (this.priority != that.priority)
479
        return false;
430
        return false;
480
    }
431
    }
481
 
432
 
482
    boolean this_present_isActive = true;
-
 
483
    boolean that_present_isActive = true;
-
 
484
    if (this_present_isActive || that_present_isActive) {
-
 
485
      if (!(this_present_isActive && that_present_isActive))
-
 
486
        return false;
-
 
487
      if (this.isActive != that.isActive)
-
 
488
        return false;
-
 
489
    }
-
 
490
 
-
 
491
    boolean this_present_hasMap = true;
433
    boolean this_present_hasMap = true;
492
    boolean that_present_hasMap = true;
434
    boolean that_present_hasMap = true;
493
    if (this_present_hasMap || that_present_hasMap) {
435
    if (this_present_hasMap || that_present_hasMap) {
494
      if (!(this_present_hasMap && that_present_hasMap))
436
      if (!(this_present_hasMap && that_present_hasMap))
495
        return false;
437
        return false;
Line 551... Line 493...
551
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.priority, typedOther.priority);
493
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.priority, typedOther.priority);
552
      if (lastComparison != 0) {
494
      if (lastComparison != 0) {
553
        return lastComparison;
495
        return lastComparison;
554
      }
496
      }
555
    }
497
    }
556
    lastComparison = Boolean.valueOf(isSetIsActive()).compareTo(typedOther.isSetIsActive());
-
 
557
    if (lastComparison != 0) {
-
 
558
      return lastComparison;
-
 
559
    }
-
 
560
    if (isSetIsActive()) {
-
 
561
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, typedOther.isActive);
-
 
562
      if (lastComparison != 0) {
-
 
563
        return lastComparison;
-
 
564
      }
-
 
565
    }
-
 
566
    lastComparison = Boolean.valueOf(isSetHasMap()).compareTo(typedOther.isSetHasMap());
498
    lastComparison = Boolean.valueOf(isSetHasMap()).compareTo(typedOther.isSetHasMap());
567
    if (lastComparison != 0) {
499
    if (lastComparison != 0) {
568
      return lastComparison;
500
      return lastComparison;
569
    }
501
    }
570
    if (isSetHasMap()) {
502
    if (isSetHasMap()) {
Line 617... Line 549...
617
            setPriorityIsSet(true);
549
            setPriorityIsSet(true);
618
          } else { 
550
          } else { 
619
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
551
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
620
          }
552
          }
621
          break;
553
          break;
622
        case 5: // IS_ACTIVE
-
 
623
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
624
            this.isActive = iprot.readBool();
-
 
625
            setIsActiveIsSet(true);
-
 
626
          } else { 
-
 
627
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
628
          }
-
 
629
          break;
-
 
630
        case 6: // HAS_MAP
554
        case 5: // HAS_MAP
631
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
555
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
632
            this.hasMap = iprot.readBool();
556
            this.hasMap = iprot.readBool();
633
            setHasMapIsSet(true);
557
            setHasMapIsSet(true);
634
          } else { 
558
          } else { 
635
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
559
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 664... Line 588...
664
      oprot.writeFieldEnd();
588
      oprot.writeFieldEnd();
665
    }
589
    }
666
    oprot.writeFieldBegin(PRIORITY_FIELD_DESC);
590
    oprot.writeFieldBegin(PRIORITY_FIELD_DESC);
667
    oprot.writeI64(this.priority);
591
    oprot.writeI64(this.priority);
668
    oprot.writeFieldEnd();
592
    oprot.writeFieldEnd();
669
    oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC);
-
 
670
    oprot.writeBool(this.isActive);
-
 
671
    oprot.writeFieldEnd();
-
 
672
    oprot.writeFieldBegin(HAS_MAP_FIELD_DESC);
593
    oprot.writeFieldBegin(HAS_MAP_FIELD_DESC);
673
    oprot.writeBool(this.hasMap);
594
    oprot.writeBool(this.hasMap);
674
    oprot.writeFieldEnd();
595
    oprot.writeFieldEnd();
675
    oprot.writeFieldStop();
596
    oprot.writeFieldStop();
676
    oprot.writeStructEnd();
597
    oprot.writeStructEnd();
Line 707... Line 628...
707
    if (!first) sb.append(", ");
628
    if (!first) sb.append(", ");
708
    sb.append("priority:");
629
    sb.append("priority:");
709
    sb.append(this.priority);
630
    sb.append(this.priority);
710
    first = false;
631
    first = false;
711
    if (!first) sb.append(", ");
632
    if (!first) sb.append(", ");
712
    sb.append("isActive:");
-
 
713
    sb.append(this.isActive);
-
 
714
    first = false;
-
 
715
    if (!first) sb.append(", ");
-
 
716
    sb.append("hasMap:");
633
    sb.append("hasMap:");
717
    sb.append(this.hasMap);
634
    sb.append(this.hasMap);
718
    first = false;
635
    first = false;
719
    sb.append(")");
636
    sb.append(")");
720
    return sb.toString();
637
    return sb.toString();