Subversion Repositories SmartDukaan

Rev

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

Rev 553 Rev 571
Line 382... Line 382...
382
            }
382
            }
383
            break;
383
            break;
384
          case RATINGS:
384
          case RATINGS:
385
            if (field.type == TType.MAP) {
385
            if (field.type == TType.MAP) {
386
              {
386
              {
387
                TMap _map16 = iprot.readMapBegin();
387
                TMap _map12 = iprot.readMapBegin();
388
                this.ratings = new HashMap<RatingType,Double>(2*_map16.size);
388
                this.ratings = new HashMap<RatingType,Double>(2*_map12.size);
389
                for (int _i17 = 0; _i17 < _map16.size; ++_i17)
389
                for (int _i13 = 0; _i13 < _map12.size; ++_i13)
390
                {
390
                {
391
                  RatingType _key18;
391
                  RatingType _key14;
392
                  double _val19;
392
                  double _val15;
393
                  _key18 = RatingType.findByValue(iprot.readI32());
393
                  _key14 = RatingType.findByValue(iprot.readI32());
394
                  _val19 = iprot.readDouble();
394
                  _val15 = iprot.readDouble();
395
                  this.ratings.put(_key18, _val19);
395
                  this.ratings.put(_key14, _val15);
396
                }
396
                }
397
                iprot.readMapEnd();
397
                iprot.readMapEnd();
398
              }
398
              }
399
            } else { 
399
            } else { 
400
              TProtocolUtil.skip(iprot, field.type);
400
              TProtocolUtil.skip(iprot, field.type);
Line 425... Line 425...
425
    oprot.writeFieldEnd();
425
    oprot.writeFieldEnd();
426
    if (this.ratings != null) {
426
    if (this.ratings != null) {
427
      oprot.writeFieldBegin(RATINGS_FIELD_DESC);
427
      oprot.writeFieldBegin(RATINGS_FIELD_DESC);
428
      {
428
      {
429
        oprot.writeMapBegin(new TMap(TType.I32, TType.DOUBLE, this.ratings.size()));
429
        oprot.writeMapBegin(new TMap(TType.I32, TType.DOUBLE, this.ratings.size()));
430
        for (Map.Entry<RatingType, Double> _iter20 : this.ratings.entrySet())
430
        for (Map.Entry<RatingType, Double> _iter16 : this.ratings.entrySet())
431
        {
431
        {
432
          oprot.writeI32(_iter20.getKey().getValue());
432
          oprot.writeI32(_iter16.getKey().getValue());
433
          oprot.writeDouble(_iter20.getValue());
433
          oprot.writeDouble(_iter16.getValue());
434
        }
434
        }
435
        oprot.writeMapEnd();
435
        oprot.writeMapEnd();
436
      }
436
      }
437
      oprot.writeFieldEnd();
437
      oprot.writeFieldEnd();
438
    }
438
    }