Subversion Repositories SmartDukaan

Rev

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

Rev 6188 Rev 6190
Line 26... Line 26...
26
  private static final org.apache.thrift.protocol.TField STATUS_COUNTS_FIELD_DESC = new org.apache.thrift.protocol.TField("statusCounts", org.apache.thrift.protocol.TType.MAP, (short)1);
26
  private static final org.apache.thrift.protocol.TField STATUS_COUNTS_FIELD_DESC = new org.apache.thrift.protocol.TField("statusCounts", org.apache.thrift.protocol.TType.MAP, (short)1);
27
  private static final org.apache.thrift.protocol.TField OPERATOR_COUNTS_FIELD_DESC = new org.apache.thrift.protocol.TField("operatorCounts", org.apache.thrift.protocol.TType.MAP, (short)2);
27
  private static final org.apache.thrift.protocol.TField OPERATOR_COUNTS_FIELD_DESC = new org.apache.thrift.protocol.TField("operatorCounts", org.apache.thrift.protocol.TType.MAP, (short)2);
28
  private static final org.apache.thrift.protocol.TField CURRENT_ORDERS_FIELD_DESC = new org.apache.thrift.protocol.TField("currentOrders", org.apache.thrift.protocol.TType.MAP, (short)3);
28
  private static final org.apache.thrift.protocol.TField CURRENT_ORDERS_FIELD_DESC = new org.apache.thrift.protocol.TField("currentOrders", org.apache.thrift.protocol.TType.MAP, (short)3);
29
  private static final org.apache.thrift.protocol.TField AMOUNTS_FIELD_DESC = new org.apache.thrift.protocol.TField("amounts", org.apache.thrift.protocol.TType.MAP, (short)4);
29
  private static final org.apache.thrift.protocol.TField AMOUNTS_FIELD_DESC = new org.apache.thrift.protocol.TField("amounts", org.apache.thrift.protocol.TType.MAP, (short)4);
30
 
30
 
31
  private Map<RechargeOrderStatus,Long> statusCounts; // required
31
  private Map<Long,Long> statusCounts; // required
32
  private Map<String,Long> operatorCounts; // required
32
  private Map<Long,Long> operatorCounts; // required
33
  private Map<String,List<RechargeOrder>> currentOrders; // required
33
  private Map<String,List<RechargeOrder>> currentOrders; // required
34
  private Map<String,Long> amounts; // required
34
  private Map<String,Long> amounts; // required
35
 
35
 
36
  /** 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. */
37
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
37
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
Line 105... Line 105...
105
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
105
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
106
  static {
106
  static {
107
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
107
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
108
    tmpMap.put(_Fields.STATUS_COUNTS, new org.apache.thrift.meta_data.FieldMetaData("statusCounts", org.apache.thrift.TFieldRequirementType.DEFAULT, 
108
    tmpMap.put(_Fields.STATUS_COUNTS, new org.apache.thrift.meta_data.FieldMetaData("statusCounts", org.apache.thrift.TFieldRequirementType.DEFAULT, 
109
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
109
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
110
            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, RechargeOrderStatus.class), 
110
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), 
111
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
111
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
112
    tmpMap.put(_Fields.OPERATOR_COUNTS, new org.apache.thrift.meta_data.FieldMetaData("operatorCounts", org.apache.thrift.TFieldRequirementType.DEFAULT, 
112
    tmpMap.put(_Fields.OPERATOR_COUNTS, new org.apache.thrift.meta_data.FieldMetaData("operatorCounts", org.apache.thrift.TFieldRequirementType.DEFAULT, 
113
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
113
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
114
            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.I64), 
115
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
115
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
116
    tmpMap.put(_Fields.CURRENT_ORDERS, new org.apache.thrift.meta_data.FieldMetaData("currentOrders", org.apache.thrift.TFieldRequirementType.DEFAULT, 
116
    tmpMap.put(_Fields.CURRENT_ORDERS, new org.apache.thrift.meta_data.FieldMetaData("currentOrders", org.apache.thrift.TFieldRequirementType.DEFAULT, 
117
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
117
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
118
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
118
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
119
            new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
119
            new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
Line 128... Line 128...
128
 
128
 
129
  public RechargeStatistics() {
129
  public RechargeStatistics() {
130
  }
130
  }
131
 
131
 
132
  public RechargeStatistics(
132
  public RechargeStatistics(
133
    Map<RechargeOrderStatus,Long> statusCounts,
133
    Map<Long,Long> statusCounts,
134
    Map<String,Long> operatorCounts,
134
    Map<Long,Long> operatorCounts,
135
    Map<String,List<RechargeOrder>> currentOrders,
135
    Map<String,List<RechargeOrder>> currentOrders,
136
    Map<String,Long> amounts)
136
    Map<String,Long> amounts)
137
  {
137
  {
138
    this();
138
    this();
139
    this.statusCounts = statusCounts;
139
    this.statusCounts = statusCounts;
Line 145... Line 145...
145
  /**
145
  /**
146
   * Performs a deep copy on <i>other</i>.
146
   * Performs a deep copy on <i>other</i>.
147
   */
147
   */
148
  public RechargeStatistics(RechargeStatistics other) {
148
  public RechargeStatistics(RechargeStatistics other) {
149
    if (other.isSetStatusCounts()) {
149
    if (other.isSetStatusCounts()) {
150
      Map<RechargeOrderStatus,Long> __this__statusCounts = new HashMap<RechargeOrderStatus,Long>();
150
      Map<Long,Long> __this__statusCounts = new HashMap<Long,Long>();
151
      for (Map.Entry<RechargeOrderStatus, Long> other_element : other.statusCounts.entrySet()) {
151
      for (Map.Entry<Long, Long> other_element : other.statusCounts.entrySet()) {
152
 
152
 
153
        RechargeOrderStatus other_element_key = other_element.getKey();
153
        Long other_element_key = other_element.getKey();
154
        Long other_element_value = other_element.getValue();
154
        Long other_element_value = other_element.getValue();
155
 
155
 
156
        RechargeOrderStatus __this__statusCounts_copy_key = other_element_key;
156
        Long __this__statusCounts_copy_key = other_element_key;
157
 
157
 
158
        Long __this__statusCounts_copy_value = other_element_value;
158
        Long __this__statusCounts_copy_value = other_element_value;
159
 
159
 
160
        __this__statusCounts.put(__this__statusCounts_copy_key, __this__statusCounts_copy_value);
160
        __this__statusCounts.put(__this__statusCounts_copy_key, __this__statusCounts_copy_value);
161
      }
161
      }
162
      this.statusCounts = __this__statusCounts;
162
      this.statusCounts = __this__statusCounts;
163
    }
163
    }
164
    if (other.isSetOperatorCounts()) {
164
    if (other.isSetOperatorCounts()) {
165
      Map<String,Long> __this__operatorCounts = new HashMap<String,Long>();
165
      Map<Long,Long> __this__operatorCounts = new HashMap<Long,Long>();
166
      for (Map.Entry<String, Long> other_element : other.operatorCounts.entrySet()) {
166
      for (Map.Entry<Long, Long> other_element : other.operatorCounts.entrySet()) {
167
 
167
 
168
        String other_element_key = other_element.getKey();
168
        Long other_element_key = other_element.getKey();
169
        Long other_element_value = other_element.getValue();
169
        Long other_element_value = other_element.getValue();
170
 
170
 
171
        String __this__operatorCounts_copy_key = other_element_key;
171
        Long __this__operatorCounts_copy_key = other_element_key;
172
 
172
 
173
        Long __this__operatorCounts_copy_value = other_element_value;
173
        Long __this__operatorCounts_copy_value = other_element_value;
174
 
174
 
175
        __this__operatorCounts.put(__this__operatorCounts_copy_key, __this__operatorCounts_copy_value);
175
        __this__operatorCounts.put(__this__operatorCounts_copy_key, __this__operatorCounts_copy_value);
176
      }
176
      }
Line 225... Line 225...
225
 
225
 
226
  public int getStatusCountsSize() {
226
  public int getStatusCountsSize() {
227
    return (this.statusCounts == null) ? 0 : this.statusCounts.size();
227
    return (this.statusCounts == null) ? 0 : this.statusCounts.size();
228
  }
228
  }
229
 
229
 
230
  public void putToStatusCounts(RechargeOrderStatus key, long val) {
230
  public void putToStatusCounts(long key, long val) {
231
    if (this.statusCounts == null) {
231
    if (this.statusCounts == null) {
232
      this.statusCounts = new HashMap<RechargeOrderStatus,Long>();
232
      this.statusCounts = new HashMap<Long,Long>();
233
    }
233
    }
234
    this.statusCounts.put(key, val);
234
    this.statusCounts.put(key, val);
235
  }
235
  }
236
 
236
 
237
  public Map<RechargeOrderStatus,Long> getStatusCounts() {
237
  public Map<Long,Long> getStatusCounts() {
238
    return this.statusCounts;
238
    return this.statusCounts;
239
  }
239
  }
240
 
240
 
241
  public void setStatusCounts(Map<RechargeOrderStatus,Long> statusCounts) {
241
  public void setStatusCounts(Map<Long,Long> statusCounts) {
242
    this.statusCounts = statusCounts;
242
    this.statusCounts = statusCounts;
243
  }
243
  }
244
 
244
 
245
  public void unsetStatusCounts() {
245
  public void unsetStatusCounts() {
246
    this.statusCounts = null;
246
    this.statusCounts = null;
Line 259... Line 259...
259
 
259
 
260
  public int getOperatorCountsSize() {
260
  public int getOperatorCountsSize() {
261
    return (this.operatorCounts == null) ? 0 : this.operatorCounts.size();
261
    return (this.operatorCounts == null) ? 0 : this.operatorCounts.size();
262
  }
262
  }
263
 
263
 
264
  public void putToOperatorCounts(String key, long val) {
264
  public void putToOperatorCounts(long key, long val) {
265
    if (this.operatorCounts == null) {
265
    if (this.operatorCounts == null) {
266
      this.operatorCounts = new HashMap<String,Long>();
266
      this.operatorCounts = new HashMap<Long,Long>();
267
    }
267
    }
268
    this.operatorCounts.put(key, val);
268
    this.operatorCounts.put(key, val);
269
  }
269
  }
270
 
270
 
271
  public Map<String,Long> getOperatorCounts() {
271
  public Map<Long,Long> getOperatorCounts() {
272
    return this.operatorCounts;
272
    return this.operatorCounts;
273
  }
273
  }
274
 
274
 
275
  public void setOperatorCounts(Map<String,Long> operatorCounts) {
275
  public void setOperatorCounts(Map<Long,Long> operatorCounts) {
276
    this.operatorCounts = operatorCounts;
276
    this.operatorCounts = operatorCounts;
277
  }
277
  }
278
 
278
 
279
  public void unsetOperatorCounts() {
279
  public void unsetOperatorCounts() {
280
    this.operatorCounts = null;
280
    this.operatorCounts = null;
Line 363... Line 363...
363
    switch (field) {
363
    switch (field) {
364
    case STATUS_COUNTS:
364
    case STATUS_COUNTS:
365
      if (value == null) {
365
      if (value == null) {
366
        unsetStatusCounts();
366
        unsetStatusCounts();
367
      } else {
367
      } else {
368
        setStatusCounts((Map<RechargeOrderStatus,Long>)value);
368
        setStatusCounts((Map<Long,Long>)value);
369
      }
369
      }
370
      break;
370
      break;
371
 
371
 
372
    case OPERATOR_COUNTS:
372
    case OPERATOR_COUNTS:
373
      if (value == null) {
373
      if (value == null) {
374
        unsetOperatorCounts();
374
        unsetOperatorCounts();
375
      } else {
375
      } else {
376
        setOperatorCounts((Map<String,Long>)value);
376
        setOperatorCounts((Map<Long,Long>)value);
377
      }
377
      }
378
      break;
378
      break;
379
 
379
 
380
    case CURRENT_ORDERS:
380
    case CURRENT_ORDERS:
381
      if (value == null) {
381
      if (value == null) {
Line 557... Line 557...
557
      switch (field.id) {
557
      switch (field.id) {
558
        case 1: // STATUS_COUNTS
558
        case 1: // STATUS_COUNTS
559
          if (field.type == org.apache.thrift.protocol.TType.MAP) {
559
          if (field.type == org.apache.thrift.protocol.TType.MAP) {
560
            {
560
            {
561
              org.apache.thrift.protocol.TMap _map8 = iprot.readMapBegin();
561
              org.apache.thrift.protocol.TMap _map8 = iprot.readMapBegin();
562
              this.statusCounts = new HashMap<RechargeOrderStatus,Long>(2*_map8.size);
562
              this.statusCounts = new HashMap<Long,Long>(2*_map8.size);
563
              for (int _i9 = 0; _i9 < _map8.size; ++_i9)
563
              for (int _i9 = 0; _i9 < _map8.size; ++_i9)
564
              {
564
              {
565
                RechargeOrderStatus _key10; // required
565
                long _key10; // required
566
                long _val11; // required
566
                long _val11; // required
567
                _key10 = RechargeOrderStatus.findByValue(iprot.readI32());
567
                _key10 = iprot.readI64();
568
                _val11 = iprot.readI64();
568
                _val11 = iprot.readI64();
569
                this.statusCounts.put(_key10, _val11);
569
                this.statusCounts.put(_key10, _val11);
570
              }
570
              }
571
              iprot.readMapEnd();
571
              iprot.readMapEnd();
572
            }
572
            }
Line 576... Line 576...
576
          break;
576
          break;
577
        case 2: // OPERATOR_COUNTS
577
        case 2: // OPERATOR_COUNTS
578
          if (field.type == org.apache.thrift.protocol.TType.MAP) {
578
          if (field.type == org.apache.thrift.protocol.TType.MAP) {
579
            {
579
            {
580
              org.apache.thrift.protocol.TMap _map12 = iprot.readMapBegin();
580
              org.apache.thrift.protocol.TMap _map12 = iprot.readMapBegin();
581
              this.operatorCounts = new HashMap<String,Long>(2*_map12.size);
581
              this.operatorCounts = new HashMap<Long,Long>(2*_map12.size);
582
              for (int _i13 = 0; _i13 < _map12.size; ++_i13)
582
              for (int _i13 = 0; _i13 < _map12.size; ++_i13)
583
              {
583
              {
584
                String _key14; // required
584
                long _key14; // required
585
                long _val15; // required
585
                long _val15; // required
586
                _key14 = iprot.readString();
586
                _key14 = iprot.readI64();
587
                _val15 = iprot.readI64();
587
                _val15 = iprot.readI64();
588
                this.operatorCounts.put(_key14, _val15);
588
                this.operatorCounts.put(_key14, _val15);
589
              }
589
              }
590
              iprot.readMapEnd();
590
              iprot.readMapEnd();
591
            }
591
            }
Line 656... Line 656...
656
 
656
 
657
    oprot.writeStructBegin(STRUCT_DESC);
657
    oprot.writeStructBegin(STRUCT_DESC);
658
    if (this.statusCounts != null) {
658
    if (this.statusCounts != null) {
659
      oprot.writeFieldBegin(STATUS_COUNTS_FIELD_DESC);
659
      oprot.writeFieldBegin(STATUS_COUNTS_FIELD_DESC);
660
      {
660
      {
661
        oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.I64, this.statusCounts.size()));
661
        oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.I64, this.statusCounts.size()));
662
        for (Map.Entry<RechargeOrderStatus, Long> _iter27 : this.statusCounts.entrySet())
662
        for (Map.Entry<Long, Long> _iter27 : this.statusCounts.entrySet())
663
        {
663
        {
664
          oprot.writeI32(_iter27.getKey().getValue());
664
          oprot.writeI64(_iter27.getKey());
665
          oprot.writeI64(_iter27.getValue());
665
          oprot.writeI64(_iter27.getValue());
666
        }
666
        }
667
        oprot.writeMapEnd();
667
        oprot.writeMapEnd();
668
      }
668
      }
669
      oprot.writeFieldEnd();
669
      oprot.writeFieldEnd();
670
    }
670
    }
671
    if (this.operatorCounts != null) {
671
    if (this.operatorCounts != null) {
672
      oprot.writeFieldBegin(OPERATOR_COUNTS_FIELD_DESC);
672
      oprot.writeFieldBegin(OPERATOR_COUNTS_FIELD_DESC);
673
      {
673
      {
674
        oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, this.operatorCounts.size()));
674
        oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.I64, this.operatorCounts.size()));
675
        for (Map.Entry<String, Long> _iter28 : this.operatorCounts.entrySet())
675
        for (Map.Entry<Long, Long> _iter28 : this.operatorCounts.entrySet())
676
        {
676
        {
677
          oprot.writeString(_iter28.getKey());
677
          oprot.writeI64(_iter28.getKey());
678
          oprot.writeI64(_iter28.getValue());
678
          oprot.writeI64(_iter28.getValue());
679
        }
679
        }
680
        oprot.writeMapEnd();
680
        oprot.writeMapEnd();
681
      }
681
      }
682
      oprot.writeFieldEnd();
682
      oprot.writeFieldEnd();