Subversion Repositories SmartDukaan

Rev

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

Rev 9155 Rev 10097
Line 27... Line 27...
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 HAS_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("hasMap", org.apache.thrift.protocol.TType.BOOL, (short)4);
29
  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)4);
30
  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)5);
30
  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)5);
31
  private static final org.apache.thrift.protocol.TField BANNER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("bannerType", org.apache.thrift.protocol.TType.I32, (short)6);
31
  private static final org.apache.thrift.protocol.TField BANNER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("bannerType", org.apache.thrift.protocol.TType.I32, (short)6);
-
 
32
  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)7);
32
 
33
 
33
  private String bannerName; // required
34
  private String bannerName; // required
34
  private String imageName; // required
35
  private String imageName; // required
35
  private String link; // required
36
  private String link; // required
36
  private boolean hasMap; // required
37
  private boolean hasMap; // required
37
  private long priority; // required
38
  private long priority; // required
38
  private BannerType bannerType; // required
39
  private BannerType bannerType; // required
-
 
40
  private boolean target; // required
39
 
41
 
40
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
42
  /** 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 {
43
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
42
    BANNER_NAME((short)1, "bannerName"),
44
    BANNER_NAME((short)1, "bannerName"),
43
    IMAGE_NAME((short)2, "imageName"),
45
    IMAGE_NAME((short)2, "imageName"),
Line 46... Line 48...
46
    PRIORITY((short)5, "priority"),
48
    PRIORITY((short)5, "priority"),
47
    /**
49
    /**
48
     * 
50
     * 
49
     * @see BannerType
51
     * @see BannerType
50
     */
52
     */
51
    BANNER_TYPE((short)6, "bannerType");
53
    BANNER_TYPE((short)6, "bannerType"),
-
 
54
    TARGET((short)7, "target");
52
 
55
 
53
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
56
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
54
 
57
 
55
    static {
58
    static {
56
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
59
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 73... Line 76...
73
          return HAS_MAP;
76
          return HAS_MAP;
74
        case 5: // PRIORITY
77
        case 5: // PRIORITY
75
          return PRIORITY;
78
          return PRIORITY;
76
        case 6: // BANNER_TYPE
79
        case 6: // BANNER_TYPE
77
          return BANNER_TYPE;
80
          return BANNER_TYPE;
-
 
81
        case 7: // TARGET
-
 
82
          return TARGET;
78
        default:
83
        default:
79
          return null;
84
          return null;
80
      }
85
      }
81
    }
86
    }
82
 
87
 
Line 115... Line 120...
115
  }
120
  }
116
 
121
 
117
  // isset id assignments
122
  // isset id assignments
118
  private static final int __HASMAP_ISSET_ID = 0;
123
  private static final int __HASMAP_ISSET_ID = 0;
119
  private static final int __PRIORITY_ISSET_ID = 1;
124
  private static final int __PRIORITY_ISSET_ID = 1;
-
 
125
  private static final int __TARGET_ISSET_ID = 2;
120
  private BitSet __isset_bit_vector = new BitSet(2);
126
  private BitSet __isset_bit_vector = new BitSet(3);
121
 
127
 
122
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
128
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123
  static {
129
  static {
124
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
130
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
125
    tmpMap.put(_Fields.BANNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("bannerName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
131
    tmpMap.put(_Fields.BANNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("bannerName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 132... Line 138...
132
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
138
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
133
    tmpMap.put(_Fields.PRIORITY, new org.apache.thrift.meta_data.FieldMetaData("priority", org.apache.thrift.TFieldRequirementType.DEFAULT, 
139
    tmpMap.put(_Fields.PRIORITY, new org.apache.thrift.meta_data.FieldMetaData("priority", org.apache.thrift.TFieldRequirementType.DEFAULT, 
134
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
140
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
135
    tmpMap.put(_Fields.BANNER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("bannerType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
141
    tmpMap.put(_Fields.BANNER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("bannerType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
136
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, BannerType.class)));
142
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, BannerType.class)));
-
 
143
    tmpMap.put(_Fields.TARGET, new org.apache.thrift.meta_data.FieldMetaData("target", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
144
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
137
    metaDataMap = Collections.unmodifiableMap(tmpMap);
145
    metaDataMap = Collections.unmodifiableMap(tmpMap);
138
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Banner.class, metaDataMap);
146
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Banner.class, metaDataMap);
139
  }
147
  }
140
 
148
 
141
  public Banner() {
149
  public Banner() {
Line 145... Line 153...
145
    String bannerName,
153
    String bannerName,
146
    String imageName,
154
    String imageName,
147
    String link,
155
    String link,
148
    boolean hasMap,
156
    boolean hasMap,
149
    long priority,
157
    long priority,
150
    BannerType bannerType)
158
    BannerType bannerType,
-
 
159
    boolean target)
151
  {
160
  {
152
    this();
161
    this();
153
    this.bannerName = bannerName;
162
    this.bannerName = bannerName;
154
    this.imageName = imageName;
163
    this.imageName = imageName;
155
    this.link = link;
164
    this.link = link;
156
    this.hasMap = hasMap;
165
    this.hasMap = hasMap;
157
    setHasMapIsSet(true);
166
    setHasMapIsSet(true);
158
    this.priority = priority;
167
    this.priority = priority;
159
    setPriorityIsSet(true);
168
    setPriorityIsSet(true);
160
    this.bannerType = bannerType;
169
    this.bannerType = bannerType;
-
 
170
    this.target = target;
-
 
171
    setTargetIsSet(true);
161
  }
172
  }
162
 
173
 
163
  /**
174
  /**
164
   * Performs a deep copy on <i>other</i>.
175
   * Performs a deep copy on <i>other</i>.
165
   */
176
   */
Line 178... Line 189...
178
    this.hasMap = other.hasMap;
189
    this.hasMap = other.hasMap;
179
    this.priority = other.priority;
190
    this.priority = other.priority;
180
    if (other.isSetBannerType()) {
191
    if (other.isSetBannerType()) {
181
      this.bannerType = other.bannerType;
192
      this.bannerType = other.bannerType;
182
    }
193
    }
-
 
194
    this.target = other.target;
183
  }
195
  }
184
 
196
 
185
  public Banner deepCopy() {
197
  public Banner deepCopy() {
186
    return new Banner(this);
198
    return new Banner(this);
187
  }
199
  }
Line 194... Line 206...
194
    setHasMapIsSet(false);
206
    setHasMapIsSet(false);
195
    this.hasMap = false;
207
    this.hasMap = false;
196
    setPriorityIsSet(false);
208
    setPriorityIsSet(false);
197
    this.priority = 0;
209
    this.priority = 0;
198
    this.bannerType = null;
210
    this.bannerType = null;
-
 
211
    setTargetIsSet(false);
-
 
212
    this.target = false;
199
  }
213
  }
200
 
214
 
201
  public String getBannerName() {
215
  public String getBannerName() {
202
    return this.bannerName;
216
    return this.bannerName;
203
  }
217
  }
Line 340... Line 354...
340
    if (!value) {
354
    if (!value) {
341
      this.bannerType = null;
355
      this.bannerType = null;
342
    }
356
    }
343
  }
357
  }
344
 
358
 
-
 
359
  public boolean isTarget() {
-
 
360
    return this.target;
-
 
361
  }
-
 
362
 
-
 
363
  public void setTarget(boolean target) {
-
 
364
    this.target = target;
-
 
365
    setTargetIsSet(true);
-
 
366
  }
-
 
367
 
-
 
368
  public void unsetTarget() {
-
 
369
    __isset_bit_vector.clear(__TARGET_ISSET_ID);
-
 
370
  }
-
 
371
 
-
 
372
  /** Returns true if field target is set (has been assigned a value) and false otherwise */
-
 
373
  public boolean isSetTarget() {
-
 
374
    return __isset_bit_vector.get(__TARGET_ISSET_ID);
-
 
375
  }
-
 
376
 
-
 
377
  public void setTargetIsSet(boolean value) {
-
 
378
    __isset_bit_vector.set(__TARGET_ISSET_ID, value);
-
 
379
  }
-
 
380
 
345
  public void setFieldValue(_Fields field, Object value) {
381
  public void setFieldValue(_Fields field, Object value) {
346
    switch (field) {
382
    switch (field) {
347
    case BANNER_NAME:
383
    case BANNER_NAME:
348
      if (value == null) {
384
      if (value == null) {
349
        unsetBannerName();
385
        unsetBannerName();
Line 390... Line 426...
390
      } else {
426
      } else {
391
        setBannerType((BannerType)value);
427
        setBannerType((BannerType)value);
392
      }
428
      }
393
      break;
429
      break;
394
 
430
 
-
 
431
    case TARGET:
-
 
432
      if (value == null) {
-
 
433
        unsetTarget();
-
 
434
      } else {
-
 
435
        setTarget((Boolean)value);
-
 
436
      }
-
 
437
      break;
-
 
438
 
395
    }
439
    }
396
  }
440
  }
397
 
441
 
398
  public Object getFieldValue(_Fields field) {
442
  public Object getFieldValue(_Fields field) {
399
    switch (field) {
443
    switch (field) {
Line 413... Line 457...
413
      return Long.valueOf(getPriority());
457
      return Long.valueOf(getPriority());
414
 
458
 
415
    case BANNER_TYPE:
459
    case BANNER_TYPE:
416
      return getBannerType();
460
      return getBannerType();
417
 
461
 
-
 
462
    case TARGET:
-
 
463
      return Boolean.valueOf(isTarget());
-
 
464
 
418
    }
465
    }
419
    throw new IllegalStateException();
466
    throw new IllegalStateException();
420
  }
467
  }
421
 
468
 
422
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
469
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 436... Line 483...
436
      return isSetHasMap();
483
      return isSetHasMap();
437
    case PRIORITY:
484
    case PRIORITY:
438
      return isSetPriority();
485
      return isSetPriority();
439
    case BANNER_TYPE:
486
    case BANNER_TYPE:
440
      return isSetBannerType();
487
      return isSetBannerType();
-
 
488
    case TARGET:
-
 
489
      return isSetTarget();
441
    }
490
    }
442
    throw new IllegalStateException();
491
    throw new IllegalStateException();
443
  }
492
  }
444
 
493
 
445
  @Override
494
  @Override
Line 507... Line 556...
507
        return false;
556
        return false;
508
      if (!this.bannerType.equals(that.bannerType))
557
      if (!this.bannerType.equals(that.bannerType))
509
        return false;
558
        return false;
510
    }
559
    }
511
 
560
 
-
 
561
    boolean this_present_target = true;
-
 
562
    boolean that_present_target = true;
-
 
563
    if (this_present_target || that_present_target) {
-
 
564
      if (!(this_present_target && that_present_target))
-
 
565
        return false;
-
 
566
      if (this.target != that.target)
-
 
567
        return false;
-
 
568
    }
-
 
569
 
512
    return true;
570
    return true;
513
  }
571
  }
514
 
572
 
515
  @Override
573
  @Override
516
  public int hashCode() {
574
  public int hashCode() {
Line 583... Line 641...
583
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bannerType, typedOther.bannerType);
641
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bannerType, typedOther.bannerType);
584
      if (lastComparison != 0) {
642
      if (lastComparison != 0) {
585
        return lastComparison;
643
        return lastComparison;
586
      }
644
      }
587
    }
645
    }
-
 
646
    lastComparison = Boolean.valueOf(isSetTarget()).compareTo(typedOther.isSetTarget());
-
 
647
    if (lastComparison != 0) {
-
 
648
      return lastComparison;
-
 
649
    }
-
 
650
    if (isSetTarget()) {
-
 
651
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.target, typedOther.target);
-
 
652
      if (lastComparison != 0) {
-
 
653
        return lastComparison;
-
 
654
      }
-
 
655
    }
588
    return 0;
656
    return 0;
589
  }
657
  }
590
 
658
 
591
  public _Fields fieldForId(int fieldId) {
659
  public _Fields fieldForId(int fieldId) {
592
    return _Fields.findByThriftId(fieldId);
660
    return _Fields.findByThriftId(fieldId);
Line 644... Line 712...
644
            this.bannerType = BannerType.findByValue(iprot.readI32());
712
            this.bannerType = BannerType.findByValue(iprot.readI32());
645
          } else { 
713
          } else { 
646
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
714
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
647
          }
715
          }
648
          break;
716
          break;
-
 
717
        case 7: // TARGET
-
 
718
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
719
            this.target = iprot.readBool();
-
 
720
            setTargetIsSet(true);
-
 
721
          } else { 
-
 
722
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
723
          }
-
 
724
          break;
649
        default:
725
        default:
650
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
726
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
651
      }
727
      }
652
      iprot.readFieldEnd();
728
      iprot.readFieldEnd();
653
    }
729
    }
Line 683... Line 759...
683
    if (this.bannerType != null) {
759
    if (this.bannerType != null) {
684
      oprot.writeFieldBegin(BANNER_TYPE_FIELD_DESC);
760
      oprot.writeFieldBegin(BANNER_TYPE_FIELD_DESC);
685
      oprot.writeI32(this.bannerType.getValue());
761
      oprot.writeI32(this.bannerType.getValue());
686
      oprot.writeFieldEnd();
762
      oprot.writeFieldEnd();
687
    }
763
    }
-
 
764
    oprot.writeFieldBegin(TARGET_FIELD_DESC);
-
 
765
    oprot.writeBool(this.target);
-
 
766
    oprot.writeFieldEnd();
688
    oprot.writeFieldStop();
767
    oprot.writeFieldStop();
689
    oprot.writeStructEnd();
768
    oprot.writeStructEnd();
690
  }
769
  }
691
 
770
 
692
  @Override
771
  @Override
Line 731... Line 810...
731
      sb.append("null");
810
      sb.append("null");
732
    } else {
811
    } else {
733
      sb.append(this.bannerType);
812
      sb.append(this.bannerType);
734
    }
813
    }
735
    first = false;
814
    first = false;
-
 
815
    if (!first) sb.append(", ");
-
 
816
    sb.append("target:");
-
 
817
    sb.append(this.target);
-
 
818
    first = false;
736
    sb.append(")");
819
    sb.append(")");
737
    return sb.toString();
820
    return sb.toString();
738
  }
821
  }
739
 
822
 
740
  public void validate() throws org.apache.thrift.TException {
823
  public void validate() throws org.apache.thrift.TException {